From repo-rules
Extract and query AI coding rules (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.) from the current repository.
How this skill is triggered — by the user, by Claude, or both
Slash command
/repo-rules:repo-rulesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extract and query AI coding rules (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.) from the current repository.
Extract and query AI coding rules (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.) from the current repository.
When you need to consult the rules for a task, go straight to query (or stats for overview questions). Don't pre-check whether the index exists — the commands print a clear error with the exact remedy if it doesn't.
If a subsequent command reports "no index found at …", build the index (one-time per repo, or after a rules file changes):
repo-rules-agent index .
The index is written to a per-user cache directory (not the repo). The command prints the exact path.
Query the index scoped to the current task:
repo-rules-agent query \
--task <code-review|code-generation|code-questions> \
[--lang py|ts|go|...] \
[--severity must|should|can] \
--format prompt
Use --format prompt when injecting rules into your own context. Use --format table when showing them to the user.
Use stats — it reads the cached index and prints rule counts per file plus breakdowns by severity, task, and language. Do NOT pipe query into a custom script for this.
repo-rules-agent stats
repo-rules-agent index <repo-path> [-o output.json] [-v]
-o path: override the output path.glm-4.7-flash:latest); configure provider via RULES_AGENT_LLM__BASE_URL and RULES_AGENT_LLM__API_KEY_ENV.repo-rules-agent stats [index.json] [-v]
Reads the cached index (or a path you give) and prints total rule count, rules per file, and breakdowns by severity, task, and language. Use this for overview questions instead of piping query output into a script.
repo-rules-agent query [index.json] [options]
With no positional argument, reads the cached index for the current directory.
Options:
-t, --task: Filter by task type (code-review, code-generation, code-questions)-l, --lang: Filter by language (py, ts, go, java, rust, etc.)-s, --scope: Filter by scope (repo, directory, file-pattern)--severity: Filter by severity (must, should, can)-f, --format: Output format (table, json, prompt)repo-rules-agent discover <repo-path> [-v]
Lists all rules files found in a repository with their priority tiers and sizes.
repo-rules-agent cache path [repo-path] # print where this repo's index lives
repo-rules-agent cache list # list every cached index, most recent first
repo-rules-agent cache clear <repo-path> # remove one repo's cache
repo-rules-agent cache clear --all # wipe the whole cache
repo-rules-agent eval <source> [--repo <path>] [-o results.json] [--judge-model <model>] [-v]
<source>: index JSON path or a repository directory (directory runs the full pipeline).--judge-model: model used as judge (default: qwen3-coder:30b).repo-rules-agent install-skill [--target claude|codex|cursor|all] [--scope project|user] [--force]
The same SKILL.md works across Claude Code, Codex CLI, and Cursor. Only the destination directory differs:
| Target | Project scope | User scope |
|---|---|---|
claude (default) | .claude/skills/repo-rules/SKILL.md | ~/.claude/skills/repo-rules/SKILL.md |
codex | n/a (use --scope user) | ~/.codex/skills/repo-rules/SKILL.md |
cursor | .cursor/skills/repo-rules/SKILL.md | ~/.cursor/skills/repo-rules/SKILL.md |
all | claude + cursor (codex skipped) | claude + codex + cursor |
--force: overwrite any existing SKILL.md without confirmation.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub unblocked/repo-rules-agent