
Agent Rules
Install and maintain a Claude Code agent-rules plugin that generates AGENTS.md structure, file maps, and verification scripts so repo conventions stay consistent for every agent session.
Overview
agent-rules is a journey-wide agent skill that maintains AGENTS.md and Claude plugin scaffolding with generated file maps and verification scripts—usable whenever a solo builder needs consistent agent instructions before
Install
npx skills add https://github.com/netresearch/agent-rules-skill --skill agent-rulesWhat is this skill?
- Claude Code plugin packaging with skills/ layout and .claude-plugin/plugin.json manifest.
- Bundled bash scripts: verify-commands, generate-file-map, analyze-git-history, detect-utilities, extract-platform-files.
- AGENTS.md managed sections with generated overview, filemap, golden samples, setup, and structure blocks.
- Composer install path: netresearch/agent-rules-skill for PHP ecosystems adopting the plugin.
- Golden sample pointer to skills/agent-rules/SKILL.md as the reference implementation pattern.
- 5 bundled bash scripts under skills/agent-rules/scripts/ (verify-commands, generate-file-map, analyze-git-history, detec
- Documented plugin version agents v2.8.0 in AGENTS.md setup block.
Adoption & trust: 1 installs on skills.sh; 49 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your repo has no stable AGENTS.md or plugin manifest, so every agent session rediscovers layout, commands, and patterns from scratch.
Who is it for?
Solo builders standardizing Claude Code plugins across PHP or polyglot repos who want generated maps and golden-sample pointers.
Skip if: Teams that only need a one-off .cursorrules file with no git-aware maintenance scripts or Composer-based plugin distribution.
When should I use this skill?
Setting up or refreshing Claude Code agent rules, AGENTS.md generated sections, or the netresearch agent-rules plugin in a repository.
What do I get? / Deliverables
You get a managed AGENTS.md structure, runnable analysis scripts, and a plugin-ready skills/agent-rules layout agents can follow across phases.
- Maintained AGENTS.md with generated section blocks
- Updated file map and golden-sample references
- Verified command and utility inventory from bundled scripts
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Generate an initial file map so research agents know where specs and docs live.
Add skills/agent-rules/SKILL.md as the golden sample and wire plugin.json for the team.
Run verify-commands.sh before release to ensure documented npm or composer scripts still match AGENTS.md.
Re-run analyze-git-history and detect-utilities after refactors so AGENTS-GENERATED blocks stay current.
Keep setup and directory structure sections accurate when new platform files land.
How it compares
Meta skill for repo-level agent governance—not a feature generator or an MCP server integration.
Common Questions / FAQ
Who is agent-rules for?
Developers using Claude Code who want a maintained AGENTS.md, plugin.json manifest, and helper scripts to keep agent context aligned with the real repo.
When should I use agent-rules?
At Idea when documenting discovery structure; in Build when adding skills/; in Ship during review to verify commands; in Operate when git history or utilities change and maps must refresh.
Is agent-rules safe to install?
Scripts run locally against your git and filesystem—review the Security Audits panel on this Prism page and inspect verify-commands.sh and related bash helpers before enabling in CI.
SKILL.md
READMESKILL.md - Agent Rules
<!-- Managed by agent: keep sections and order; edit content, not structure. Last updated: 2026-02-05 --> # AGENTS.md — agents <!-- AGENTS-GENERATED:START overview --> ## Overview Claude Code skill/plugin providing AI agent capabilities <!-- AGENTS-GENERATED:END overview --> <!-- AGENTS-GENERATED:START filemap --> ## Key Files | File | Purpose | |------|---------| | `skills/agent-rules/scripts/verify-commands.sh` | !/usr/bin/env bash | | `skills/agent-rules/scripts/generate-file-map.sh` | !/usr/bin/env bash | | `skills/agent-rules/scripts/analyze-git-history.sh` | !/usr/bin/env bash | | `skills/agent-rules/scripts/detect-utilities.sh` | !/usr/bin/env bash | | `skills/agent-rules/scripts/extract-platform-files.sh` | !/usr/bin/env bash | <!-- AGENTS-GENERATED:END filemap --> <!-- AGENTS-GENERATED:START golden-samples --> ## Golden Samples (follow these patterns) | Pattern | Reference | |---------|-----------| | Standard implementation | `skills/agent-rules/SKILL.md` | <!-- AGENTS-GENERATED:END golden-samples --> <!-- AGENTS-GENERATED:START setup --> ## Setup & environment - Plugin: agents v2.8.0 - Skills: 1 skill(s) in `skills/` - Install: `composer require netresearch/agent-rules-skill` <!-- AGENTS-GENERATED:END setup --> <!-- AGENTS-GENERATED:START structure --> ## Directory structure ``` .claude-plugin/ plugin.json → Plugin manifest (name, version, skills) skills/ <skill-name>/ SKILL.md → Skill definition and instructions assets/ → Templates, reference docs scripts/ → Shell scripts for automation references/ → Examples, golden samples ``` <!-- AGENTS-GENERATED:END structure --> <!-- AGENTS-GENERATED:START commands --> ## Build & tests - Lint scripts: `shellcheck skills/*/scripts/*.sh` - Validate plugin: `jq . .claude-plugin/plugin.json` <!-- AGENTS-GENERATED:END commands --> <!-- AGENTS-GENERATED:START code-style --> ## Code style & conventions - SKILL.md: Clear, actionable instructions for AI agents - Shell scripts: Follow ShellCheck recommendations - Templates: Use `` syntax for variables - Keep skills focused on one domain/task - Include checkpoints for verification - Provide golden samples for pattern demonstration <!-- AGENTS-GENERATED:END code-style --> <!-- AGENTS-GENERATED:START skill-design --> ## Skill design principles - **Actionable**: Tell agents WHAT to do, not just WHAT things are - **Verifiable**: Include checkpoints agents can run to verify work - **Scoped**: One skill = one domain (don't mix concerns) - **Referenced**: Point to golden samples, not generic examples - **Minimal**: Include only what agents need; avoid documentation bloat <!-- AGENTS-GENERATED:END skill-design --> <!-- AGENTS-GENERATED:START security --> ## Security & safety - Never include secrets or credentials in skills - Validate all user inputs in scripts - Use placeholder values in examples: `your-api-key`, `example.com` - Review generated content for sensitive information <!-- AGENTS-GENERATED:END security --> <!-- AGENTS-GENERATED:START checklist --> ## PR/commit checklist - [ ] ShellCheck passes: `shellcheck skills/*/scripts/*.sh` - [ ] SKILL.md instructions are clear and actionable - [ ] Templates use whole-line placeholders (not inline) - [ ] Golden samples exist for key patterns - [ ] Checkpoints are verifiable - [ ] plugin.json version updated if releasing <!-- AGENTS-GENERATED:END checklist --> <!-- AGENTS-GENERATED:START examples --> ## Patterns to Follow > **Prefer looking at real code in this repo over generic examples.** > See **Golden Samples** section above for files that demonstrate correct patterns. <!-- AGENTS-GENERATED:END examples --> <!-- AGENTS-GENERATED:START help --> ## When stuck - Check existing skills for patterns - Review Claude Code documentation - Test skills with `claude --skill <name>` - Check root AGENTS.md for project conventions <!-- AGENTS-GENERATED:END help --> # Example GitHub Actions workflow for validating AGENTS.md file