unblocked/repo-rules-agent/repo-rules
Claude Code and agent skill by unblocked/repo-rules-agent
- community
Checking that the SKILL.md file is still in the repository.
Query AI coding rules for this repo (extracted from CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md, and ~40 other rules-file conventions). Invoke when the user asks about team rules, coding standards, or conventions — or when reviewing, generating, or refactoring code and you need to know which rules apply. Builds a fresh index if one doesn't exist yet.
Install
npx vskill@latest install unblocked/repo-rules-agent/repo-rulesSKILL.md
repo-rules-agent
Extract and query AI coding rules (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.) from the current repository.
Default workflow
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):
``bash 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:
``bash 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.
Overview questions ("what rules does this repo have?", "how many rules per file?")
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.
Commands
index — Extract rules and build a JSON index
- Discovers rules files, extracts individual rules via any OpenAI-compatible LLM, and writes a JSON index.
- Default output location is a per-user cache directory keyed by the absolute repo path.
-o path: override the output path.- Defaults to local Ollama (
glm-4.7-flash:latest); configure provider viaRULES_AGENT_LLM__BASE_URLandRULES_AGENT_LLM__API_KEY_ENV.
stats — Summarize a rules index
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.
query — Filter and retrieve rules from an index
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)
discover — Find rules files without extracting
Lists all rules files found in a repository with their priority tiers and sizes.
cache — Manage the per-repo index cache
eval — Evaluate extraction quality with LLM judge
<source>: index JSON path or a repository directory (directory runs the full pipeline).--judge-model: model used as judge (default:qwen3-coder:30b).- Reports precision, recall, and F1 per file and overall.
install-skill — Install this skill
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.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/repo-rules/SKILL.md
Popularity
- Repository stars
- 67
- Repository forks
- 5
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/unblocked/repo-rules-agent/repo-rules)