agent-rules — Claude Code skill: what it does, how to install
Generates and verifies AGENTS.md instruction files for AI coding agents. Keeps project guidelines structured and under strict line limits.
npx skills add netresearch/agent-rules-skill --skill agent-rules -a claude-codeWhat agent-rules does
This skill creates machine-oriented documentation following the AGENTS.md convention. It inspects the repository, identifies languages and build tools across Go, PHP, TypeScript, or Python, and extracts CI quality gates. It can also link CLAUDE.md and GEMINI.md automatically.
Under the hood, several bash utilities inspect scopes, score files, and verify that documented shell commands execute properly. Scripts must be invoked via their full ${CLAUDE_SKILL_DIR} path. Relative paths trigger security permission prompts on every call.
Execution requires bash 4.3+, jq 1.7+, and git 2.0+. The root AGENTS.md must stay under 150 lines, or CI harness validation checks fail.
What it helps with
- scaffold AGENTS.md files for new or existing codebases
- verify documented commands and paths against actual code
- audit and grade existing AI agent documentation
- create symlinks for CLAUDE.md and GEMINI.md automatically
Example prompts for the agent
- Generate an AGENTS.md file for this project
- Verify that all commands in AGENTS.md are working
- Score the quality of existing agent rule files
How to install agent-rules
1Skills CLI (Vercel)
npx skills add netresearch/agent-rules-skill --skill agent-rules -a claude-code2Manually: put the files in place
~/.claude/skills/agent-rules/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agent-rules/
1Skills CLI (Vercel)
npx skills add netresearch/agent-rules-skill --skill agent-rules -a codex2Manually: put the files in place
.agents/skills/agent-rules/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add netresearch/agent-rules-skill --skill agent-rules -a cursor2Manually: put the files in place
.cursor/skills/agent-rules/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install netresearch/agent-rules-skill agent-rules2Manually: put the files in place
.github/skills/agent-rules/SKILL.md1Skills CLI (Vercel)
npx skills add netresearch/agent-rules-skill --skill agent-rules -a gemini-cli2Platform CLI
gemini skills install https://github.com/netresearch/agent-rules-skill --path skills/agent-rulesManually: put the files in place
.devin/skills/agent-rules/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add netresearch/agent-rules-skill --skill agent-rules -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agent-rules
How to install agent-rules in Claude Code?
Run npx skills add netresearch/agent-rules-skill --skill agent-rules -a claude-code. The skill file will be placed in ~/.claude/skills/agent-rules/SKILL.md.
What does the agent-rules skill do?
It detects your project configuration, extracts build commands, and generates structured AGENTS.md guidelines for coding assistants.
What dependencies does agent-rules require?
You need bash 4.3+, jq 1.7+, and git 2.0+. The generated root file must also stay strictly under 150 lines to pass harness checks.