ccmds

A rule for searching Markdown documentation with the ccmds command-line tool. Markdown is a plain-text format commonly used for project documentation.

In plain words
What is it for?
It is for searching, listing, filtering, and extracting sections from guides, references, setup notes, and other Markdown files.
Why use it?
It provides a consistent way to find relevant documentation without manually opening every file.

Cursor rule

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.

agentmods
npx agentmods add rules/bjeber/cc-md-search-cli/ccmds
Clone the repo
git clone --depth 1 https://github.com/bjeber/cc-md-search-cli
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.03552
Opus 5 $0.00000 $0.01776
Sonnet 5 $0.00000 $0.00710
Haiku 4.5 $0.00000 $0.00355

Measured yesterday against content hash 73300ec2c727, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ccmds 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.

rules/ccmds.mdc · 531 lines

How it starts

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

Markdown Documentation Search Rule

PRIORITY: Use this rule FIRST when the user asks anything about documentation, guides, references, or markdown files. This is more efficient than reading files directly.


Configuration

Projects using ccmds should have a .ccmdsrc configuration file in the project root. This file defines default directories, exclude patterns, and other settings.

Check if Config Exists

# View current configuration
ccmds config

# Show config file path
ccmds config --path

Create Config File (if missing)

# Create default config
ccmds init

# Create with specific directories
ccmds init -d ./docs ./api/docs

Example .ccmdsrc Configuration

{
  "documentDirectories": ["./docs", "./api/docs"],
  "exclude": ["**/node_modules/**", "**/.*/**"],
  "outputMode": "json",
  "limit": 10
}

When a config file exists, you don't need to specify directories in commands - they use the configured defaults automatically.

Named Documentation

If the project has named documentation entries in .ccmdsrc:

ccmds find "query" --doc api      # Search only "api" docs
ccmds list --doc guides           # List only "guides" docs
ccmds grep "TODO" --doc api       # Grep only in API docs

This is useful for projects with multiple doc sets (API, guides, tutorials).


Trigger Patterns

Always activate this rule when the user:

  • Asks "what do the docs say about..."
  • Says "check the documentation" or "check the docs"
  • Asks "how do I..." (likely needs setup/config docs)
  • Wants to "find in documentation" or "search docs"
  • References guides, references, README, or API docs
  • Asks about setup, configuration, installation, or troubleshooting
  • Says "look up", "find", or "search" with documentation context
  • Asks "where is ... documented?"
  • Needs to understand project structure or conventions

When to Use (Prefer Over Direct File Reading)

User Intent Action Why This Rule
"What do the docs say about X?" ccmds find "X" Searches all docs instantly
"How do I set up Y?" ccmds find "setup Y" Finds relevant guides
"Find error code E404" ccmds grep "E404" Exact pattern match
"What's in the documentation?" ccmds outline Shows structure, minimal context
"Show me the auth section" ccmds section file.md "Auth" Extracts only what's needed

Read the full file on GitHub · 531 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 · 531 lines · 0 tokens per session scan A 73300ec2c727

Subscribe to this mod's changes

ccmds is a cursor rule published in the GitHub repository bjeber/cc-md-search-cli (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,552 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-08-31.