Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By unblocked Verified Orgv0.7.1MIT
Queries the coding rules scattered across CLAUDE.md, AGENTS.md and .cursorrules so an agent applies only the rules relevant to the task at hand. Defaults to a local Ollama model with no API key; OpenAI or Anthropic are optional and recommended for better extraction.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
coding-rules, claude-md, agents-md, cursorrules, code-standards, rules-index, code-review
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Extract and index AI coding instructions from rules files (CLAUDE.md, AGENTS.md, .cursorrules, etc.).
You've written the rules. There's a CLAUDE.md at the root, an AGENTS.md for Codex, a .cursorrules file, and whatever else lives under .cursor/rules/ or .github/instructions/. But when you open an agent session and say "review this PR," it doesn't see all of them.
repo-rules-agent builds one queryable index from every rules file in your repo. A query scoped to the work in front of you — e.g. --task code-review --lang py --severity must — returns the ~15 rules that actually apply, not 8,000 tokens of rules files.
Four stages: discover → extract → index → query.
** tier. It resolves @include-style directives, so a CLAUDE.md that's just a pointer to AGENTS.md counts as one source, not two.uv — Python package managergit — used for blob SHA computation during indexing# Install dependencies
uv sync
The tool works with any OpenAI-compatible API provider. By default, it connects to a local Ollama instance; OpenAI and Anthropic are also supported.
Copy .env.example to .env and uncomment the provider you want to use:
cp .env.example .env
# Edit .env with your API keys
The .env file is gitignored and loaded automatically at startup via python-dotenv. Shell environment variables take precedence over .env values, so you can always override a .env setting with an explicit export.
Local (Ollama — default, no API key needed):
ollama pull glm-4.7-flash:latest
uv run repo-rules-agent index /path/to/repo
Local models vary in tool-calling reliability; for the highest-quality extraction, use OpenAI or Anthropic.
Anthropic (add to .env):
RULES_AGENT_LLM__BASE_URL=https://api.anthropic.com/v1
RULES_AGENT_LLM__API_KEY_ENV=ANTHROPIC_API_KEY
RULES_AGENT_LLM__EXTRACTION_MODEL=claude-haiku-4-5
ANTHROPIC_API_KEY=sk-ant-...
OpenAI (add to .env):
RULES_AGENT_LLM__BASE_URL=https://api.openai.com/v1
RULES_AGENT_LLM__API_KEY_ENV=OPENAI_API_KEY
RULES_AGENT_LLM__EXTRACTION_MODEL=gpt-4o-mini
OPENAI_API_KEY=sk-proj-...
All LLM settings can also be changed in src/rules_agent/config.toml.
Check which files would be processed without extracting:
uv run repo-rules-agent discover /path/to/repo
Extract rules from all discovered files. The index is written to a per-user cache directory by default (invisible to the repo), and query reads from the same place.
# Index the current repo (writes to the cache; prints the resolved path)
uv run repo-rules-agent index /path/to/repo
# Override the output path
uv run repo-rules-agent index /path/to/repo -o rules-index.json
Filter and format rules from the cached index. With no positional argument, query reads the cached index for the current directory.
# Table format (default)
uv run repo-rules-agent query --task code-review
# JSON format
uv run repo-rules-agent query --task code-review --format json
# Prompt format (for injection into LLM prompts)
uv run repo-rules-agent query --task code-review --format prompt
# Filter by language
uv run repo-rules-agent query --task code-review --lang py
# Filter by severity
uv run repo-rules-agent query --severity must
# Query an explicit index file instead of the cache
uv run repo-rules-agent query rules-index.json --task code-review
Print rule counts per file plus breakdowns by severity, task, and language. Use this for overview questions instead of piping query into a script.
# Summary for the cached index of the current directory
uv run repo-rules-agent stats
# Or pass an explicit index file
uv run repo-rules-agent stats rules-index.json
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (unblocked/repo-rules-agent) — no native marketplace selected
npx claudepluginhub p/unblocked-repo-rulesPlugins from other owners that cover similar ground