skills/agent-config/SKILL.md
Create or update CLAUDE.md and AGENTS.md files following official best practices. Use when asked to create, audit, or improve agent config files (CLAUDE.md, AGENTS.md). Don't use for README/contributor docs or non-Claude IDE plugins.
npx skillsauth add luongnv89/skills agent-configInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use when the user asks to create, update, audit, or improve CLAUDE.md or AGENTS.md. Skip for generic README or contributor-doc work.
origin set; the skill requires a clean tree before destructive edits.git, file write access to the target path.CLAUDE.md, AGENTS.md, or both before writing.Sync the current branch with remote before any create/update/delete. This is a destructive workflow — always dry-run first with git fetch (read-only) and inspect status before pulling.
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin # dry-run: read-only preview
git status # validate clean tree
git pull --rebase origin "$branch" # only after confirmation
If the working tree is dirty, back up via stash before syncing:
git stash push -u -m "pre-sync-backup" # backup
git fetch origin && git pull --rebase origin "$branch"
git stash pop # restore
If origin is missing, rebase conflicts occur, or stash pop fails, stop and confirm with the user before continuing. Never overwrite an existing CLAUDE.md / AGENTS.md without first reading it and showing a diff.
$ARGUMENTS
Recognised inputs: create, update, audit, or a path (e.g., src/api/CLAUDE.md).
If unspecified, ask which file:
CLAUDE.md gives Claude persistent context it cannot infer from code alone.
| Include | Exclude | |-----------|-----------| | Bash commands Claude cannot guess | Anything Claude can figure out from code | | Code style rules that differ from defaults | Standard language conventions | | Testing instructions and preferred runners | Detailed API docs (link instead) | | Repository etiquette (branch naming, PRs) | Information that changes frequently | | Architectural decisions specific to project | Long explanations or tutorials | | Developer environment quirks (env vars) | File-by-file codebase descriptions | | Common gotchas or non-obvious behaviors | Self-evident practices like "write clean code" |
See references/anti-patterns.md for the full quality test and failure modes, and references/claude-md-checklist.md for the structural audit checklist (length budget, hierarchy, 5 required sections).
# Code style
- Use ES modules (import/export), not CommonJS (require)
- Destructure imports when possible
# Workflow
- Typecheck after a series of code changes
- Prefer single-test runs over the full suite for performance
~/.claude/CLAUDE.md — applies to all sessions./CLAUDE.md — checked into git, shared with teamCLAUDE.local.md — gitignored personal overridesSee @README.md and @package.json.
- Git workflow: @docs/git-instructions.md
Add IMPORTANT or YOU MUST for critical rules to improve adherence.
Subagents run in their own context with restricted tools.
---
name: security-reviewer
description: Reviews code for security vulnerabilities
tools: Read, Grep, Glob, Bash
model: opus
---
You are a senior security engineer. Review for:
- Injection vulnerabilities (SQL, XSS, command injection)
- Auth/authorization flaws
- Secrets in code
Provide line references and concrete fixes.
Required: name, description, tools. Optional: model.
Best practices: single-domain focus, specific scope, concrete output format, minimum tool surface.
Always append the block from references/token-efficiency-block.md to every generated CLAUDE.md / AGENTS.md. This is non-negotiable — it protects the agent's context window and budget.
If the user asks for orchestration rigor or stricter coding rules, copy verbatim the relevant block from references/optional-blocks.md (Workflow Orchestration / Mandatory Coding Discipline). Do not inject blindly.
create (default)updateauditreferences/claude-md-checklist.md (length budget, content quality, hierarchy, 5 required sections, final quality checks). Report each as pass / fail / N/A with a one-line reason.references/anti-patterns.md.After each major step, output:
◆ [Step Name] ([step N of M])
··································································
[Check 1]: √ pass
[Check 2]: × fail — [reason]
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIAL
Use √ for pass, × for fail. Adapt check names per step.
A run passes when all of the following are true:
## Token Efficiency).references/anti-patterns.md appears in the new content.create / update: result passes every section of references/claude-md-checklist.md (length budget, content quality, hierarchy, 5 required sections).audit: every checklist item is reported with pass / fail / N/A, and no file was modified (verify with git diff --stat).Result: PASS.For create / update: writes one file at the chosen path. Example tail of the file:
## Token Efficiency
- Never re-read files you just wrote or edited. You know the contents.
- Never re-run commands to "verify" unless the outcome was uncertain.
... (rest of token-efficiency block)
Followed by a step-completion report ending in Result: PASS.
For audit: prints a markdown report (no file writes) covering every checklist section, e.g.:
◆ Audit (step 1 of 1)
Length budget: √ pass — 64 lines
Content quality: × fail — 3 fluff lines ("be a senior engineer", motivational)
Hierarchy split: √ pass — global / project / local in use
5 required sections: × fail — missing "Hard rules" and "Workflow preferences"
Anti-patterns: × fail — found 2 (generic style rules)
Token block: × fail — missing
Result: PARTIAL
update requested → fall back to create, confirm with user first.CLAUDE.md exist → ask which scope to edit; never silently overwrite both.stash pop conflicts, stop and ask.origin → skip sync, warn user, require explicit confirmation to proceed.$ARGUMENTS with no recognised verb → ask which mode (create/update/audit).See references/anti-patterns.md for the full list (style rules linters cover, generic advice, file-by-file dumps, etc.).
documentation
Manage software releases end-to-end: bump version, generate changelog, tag, push, GitHub release, publish to PyPI/npm. Use when user asks to ship, cut a release, tag a version, or list changes since last tag. Skip routine commits and marketplace publishing.
development
Review UI for usability issues using Steve Krug's principles and produce a scannable report. Use when asked for a usability audit, UX review, or UI feedback on screenshots, URLs, or code. Don't use for visual/brand design critique, accessibility (WCAG) audits, or backend/API review.
development
Validate app/startup ideas with market, feasibility, commercial, and open-source competitor analysis. Use when asked to evaluate, validate, or score a product idea. Don't use for PRDs, go-to-market plans, or investor decks.
testing
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.