Audit and improve AGENTS.md and CLAUDE.md files across project and user scopes.
npx claudepluginhub pgoell/pgoell-claude-tools --plugin agent-system-managementThis skill uses the workspace's default tool permissions.
Audit, evaluate, and improve agent-instruction files (AGENTS.md, CLAUDE.md, and variants) across a codebase to ensure the host agent has optimal project context.
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.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Audit, evaluate, and improve agent-instruction files (AGENTS.md, CLAUDE.md, and variants) across a codebase to ensure the host agent has optimal project context.
This skill can write to agent-instruction files. After presenting a quality report and getting user approval, it updates files with targeted improvements.
| Capability | Claude Code | Codex |
|---|---|---|
| Find files | Glob / Grep | shell (find, grep) |
| Read a file | Read | shell (cat) |
| Edit a file | Edit | apply_patch / shell heredoc |
| User confirmation | AskUserQuestion | ask_user / built-in approval prompt |
| Shell commands | Bash | shell |
The skill body refers to actions abstractly ("read the file", "apply the diff"). The host agent maps to its own tool inventory.
Find every agent-instruction file in scope (project + user-global), dedupe symlinked pairs via realpath:
{
find . \( \
-name "AGENTS.md" \
-o -name "AGENTS.local.md" \
-o -name "CLAUDE.md" \
-o -name "CLAUDE.local.md" \
-o -name ".claude.md" \
-o -name ".claude.local.md" \
\) -not -path '*/node_modules/*' -not -path '*/.git/*' 2>/dev/null
ls ~/.claude/CLAUDE.md ~/.codex/AGENTS.md 2>/dev/null
} | xargs -I{} realpath {} | sort -u
File Types & Locations:
| Type | Location | Purpose |
|---|---|---|
| Project-shared | ./AGENTS.md, ./CLAUDE.md, ./.claude.md | Primary project context, in git, shared with team |
| Project-local | ./AGENTS.local.md, ./CLAUDE.local.md, ./.claude.local.md | Personal overrides, gitignored |
| User-global | ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md | User-wide defaults across all projects |
| Package-specific | ./packages/*/AGENTS.md, ./packages/*/CLAUDE.md | Module-level context in monorepos |
| Subdirectory | Any nested location | Feature/domain-specific context |
Note: The host agent auto-discovers agent-instruction files in parent directories, making monorepo setups work automatically. When two paths share the same realpath (typical when CLAUDE.md is a symlink to AGENTS.md), audit them as one logical file and edit the canonical realpath target.
For each unique file, evaluate against quality criteria. See references/quality-criteria.md for detailed rubrics.
Scope-aware lens: the assessment lens shifts per scope. For project files: "is this codebase well-documented for an agent?". For user-global files: "are these rules organized, non-contradictory, at the right abstraction level, and not duplicated across projects?".
Quick Assessment Checklist:
| Criterion | Weight | Check |
|---|---|---|
| Commands/workflows documented | High | Are build/test/deploy commands present? |
| Architecture clarity | High | Can the host agent understand the codebase structure? |
| Non-obvious patterns | Medium | Are gotchas and quirks documented? |
| Conciseness | Medium | No verbose explanations or obvious info? |
| Currency | High | Does it reflect current codebase state? |
| Actionability | High | Are instructions executable, not vague? |
Quality Scores:
ALWAYS output the quality report BEFORE making any updates.
Format:
## Agents.md Quality Report
### Summary
- Files found: X (Y unique after realpath dedup)
- Average score: X/100
- Files needing update: X
### File-by-File Assessment
#### 1. ./AGENTS.md (Project-shared, also reachable as ./CLAUDE.md symlink)
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands/workflows | X/20 | ... |
| Architecture clarity | X/20 | ... |
| Non-obvious patterns | X/15 | ... |
| Conciseness | X/15 | ... |
| Currency | X/15 | ... |
| Actionability | X/15 | ... |
**Issues:**
- [List specific problems]
**Recommended additions:**
- [List what should be added]
#### 2. ./packages/api/AGENTS.md (Package-specific)
...
After outputting the quality report, ask user for confirmation before updating.
Update Guidelines (Critical):
Propose targeted additions only: focus on genuinely useful info:
Keep it minimal: avoid:
Show diffs: for each change, show:
Diff Format:
### Update: ./AGENTS.md
**Why:** Build command was missing, causing confusion about how to run the project.
```diff
+ ## Quick Start
+
+ ```bash
+ npm install
+ npm run dev # Start development server on port 3000
+ ```
```
After user approval, apply changes (see Platform Adaptation for the right edit tool). Preserve existing content structure. Edit the canonical realpath target only; symlinks update automatically.
See references/templates.md for templates by project type.
See references/update-guidelines.md for full do's and don'ts.
When presenting recommendations, remind users:
# key shortcut (Claude Code): during a Claude Code session, press # to have Claude auto-incorporate learnings into the project memory file*.local.md: for personal preferences not shared with team (add to .gitignore)~/.claude/CLAUDE.md or ~/.codex/AGENTS.mdCLAUDE.md → AGENTS.md so a single file serves bothKey principles:
Recommended sections (use only what's relevant):