documentation-system

documentation-system is a cursor rule for Cursor from lacymorrow/paperclip-hub. It costs 0 tokens per session (1,674 once invoked), scanned A, original, MIT.

A file-based documentation system that loads Markdown and MDX files from a project’s `/docs` folder. MDX is Markdown that can also contain interactive code components; the system also validates paths and sanitizes content.

In plain words
What is it for?
It helps build documentation pages, topic sections, search, dynamic routes, and protected loading of Markdown or MDX content.
Why use it?
It provides one organized place for product and developer documentation while reducing risks such as malicious paths and unsafe HTML.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It helps build documentation pages, topic sections, search, dynamic routes, and protected loading of Markdown or MDX content.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lacymorrow/paperclip-hub/documentation-system
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/lacymorrow/paperclip-hub

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 documentation-system

README.md
[![agentmods](https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/documentation-system/github.svg)](https://agentmods.dev/rules/lacymorrow/paperclip-hub/documentation-system)
Your own site
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/documentation-system"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/documentation-system/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 documentation-system

Your own site · 80×15
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/documentation-system"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/documentation-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,674 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.00000 $0.01674
Opus 5.5 $0.00000 $0.00670
Sonnet 5.5 $0.00000 $0.00335
Haiku 4.5 $0.00000 $0.00167

Measured yesterday against content hash 399842025ae7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

documentation-system 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 yesterday.

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/documentation-system.mdc · 250 lines

How it starts

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

Documentation System

Overview

The Shipkit documentation system uses dynamic file-based loading from the /docs directory at the project root. It supports both .mdx and .md files with full production-ready security features.

Architecture

Core Components

File Structure

/docs/                          # Root documentation directory
├── index.mdx                   # Main documentation index
├── *.mdx, *.md                # Root level docs
├── content-management/         # Organized by topic
│   ├── index.mdx              # Section index
│   └── *.mdx, *.md            # Section documentation
├── development/
├── integrations/
└── snippets/

Security Features (Production-Ready)

Input Validation & Sanitization

  • Path Traversal Protection: All file paths validated using path.resolve()
  • Slug Validation: Regex patterns prevent malicious input
  • Content Sanitization: HTML sanitization prevents XSS attacks
  • Size Limits: Files limited to 5MB, content to 1MB

Rate Limiting & DoS Prevention

  • Maximum 100 documents total
  • Maximum 20 directories per level
  • Maximum 50 files per directory
  • Maximum depth of 5 levels
  • Input length limits enforced via Zod schemas

Error Handling

  • Comprehensive error logging without information leakage
  • Graceful degradation on missing files
  • Proper HTTP status codes
  • No stack trace exposure in production

File Format Support

MDX Files (.mdx)

  • Full React component support
  • Frontmatter metadata required
  • Dynamic imports supported
  • Processing via remark/rehype

Markdown Files (.md)

  • Standard markdown syntax
  • Frontmatter metadata required
  • Converted to React components
  • Syntax highlighting support

Read the full file on GitHub · 250 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. yesterday First seen · 250 lines · 0 tokens per session scan A 399842025ae7

Subscribe to this mod's changes

documentation-system is a cursor rule published in the GitHub repository lacymorrow/paperclip-hub (15 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,674 tokens. 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-11-10.

Related

documentation-system compared with cursor rules from other repositories

documentation-system next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
documentation-systemlacymorrow/paperclip-hubCursor rule15yesterdayMITA0Cursor
always-push-pritsmemeworks/adhxCursor rule195d agoMITA279Cursor
curriculum-docsrogerSuperBuilderAlpha/hult-cohort-programCursor rule416d agoMITA0Cursor
documentation-systemshipkit-io/bonesCursor rule21yesterdaynoneA0Cursor
expojimmypocock/cursor-rulesCursor rule81y agoMITA3Cursor
ponytailDietrichGebert/ponytailCursor rule188k13d agoMITA604Cursor
angular-20angular/angularCursor rule101ktodayMITA0Cursor