shard-doc

shard-doc is a cursor rule for Cursor from rweisssieker-xp/GBL-CREO-WINDCHILL-MCP. It costs 8 tokens per session (1,334 once invoked), scanned A, original, MIT.

A tool for splitting a large Markdown document into smaller files based on its level-two sections. Markdown is a text format commonly used for documentation and project notes.

In plain words
What is it for?
Use it to break documents such as architecture plans into organized section files in a destination folder.
Why use it?
It makes long documents easier to navigate, maintain, and load in smaller pieces.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to break documents such as architecture plans into organized section files in a destination folder.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/rweisssieker-xp/GBL-CREO-WINDCHILL-MCP

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for shard-doc

README.md
[![agentmods](https://agentmods.dev/badge/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc/github.svg)](https://agentmods.dev/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc)
Your own site
<a href="https://agentmods.dev/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc"><img src="https://agentmods.dev/badge/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for shard-doc

Your own site · 80×15
<a href="https://agentmods.dev/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc"><img src="https://agentmods.dev/badge/rules/rweisssieker-xp/gbl-creo-windchill-mcp/shard-doc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.01334
Opus 5 $0.00004 $0.00667
Sonnet 5 $0.00002 $0.00267
Haiku 4.5 $0.00001 $0.00133

Measured 8d ago against content hash 2be75a3de0de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

shard-doc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/bmad/core/tools/shard-doc.mdc · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Split large markdown documents into smaller, organized files based on level 2 sections using @kayvan/markdown-tree-parser tool

<step n="2" title="Get Destination Folder">
  <action>Determine default destination: same location as source file, folder named after source file without .md extension</action>
  <action>Example: /path/to/architecture.md → /path/to/architecture/</action>
  <action>Ask user for the destination folder path ([y] to confirm use of default: [suggested-path], else enter a new path)</action>
  <action if="user accepts default">Use the suggested destination path</action>
  <action if="user provides custom path">Use the custom destination path</action>
  <action>Verify destination folder exists or can be created</action>
  <action>Check write permissions for destination</action>
  <action if="permission denied">HALT with error message</action>
</step>

<step n="3" title="Execute Sharding">
  <action>Inform user that sharding is beginning</action>
  <action>Execute command: `npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]`</action>
  <action>Capture command output and any errors</action>
  <action if="command fails">HALT and display error to user</action>
</step>

<step n="4" title="Verify Output">
  <action>Check that destination folder contains sharded files</action>
  <action>Verify index.md was created in destination folder</action>
  <action>Count the number of files created</action>
  <action if="no files created">HALT with error message</action>
</step>

<step n="5" title="Report Completion">
  <action>Display completion report to user including:</action>
  <i>- Source document path and name</i>
  <i>- Destination folder path</i>
  <i>- Number of section files created</i>
  <i>- Confirmation that index.md was created</i>
  <i>- Any tool output or warnings</i>
  <action>Inform user that sharding completed successfully</action>
</step>

<step n="6" title="Handle Original Document">
  <critical>Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion</critical>
  <action>Present user with options for the original document:</action>

  <ask>What would you like to do with the original document `[source-document-name]`?

Options: [d] Delete - Remove the original (recommended - shards can always be recombined) [m] Move to archive - Move original to a backup/archive location [k] Keep - Leave original in place (NOT recommended - defeats sharding purpose)

Your choice (d/m/k):

  <check if="user selects 'd' (delete)">
    <action>Delete the original source document file</action>
    <action>Confirm deletion to user: "✓ Original document deleted: [source-document-path]"</action>
    <note>The document can be reconstructed from shards by concatenating all section files in order</note>
  </check>

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 116 lines · 1,334 tokens per session scan A 2be75a3de0de

Subscribe to this mod's changes

shard-doc is a cursor rule published in the GitHub repository rweisssieker-xp/GBL-CREO-WINDCHILL-MCP (4 stars, last pushed 9mo ago), licensed MIT. It adds 8 tokens to every session and 1,334 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.