content/skills/developer-tools-integrations/agents-md-improver/SKILL.md
Audit and improve Codex AGENTS.md guidance files in repositories. Use when the user asks to check, audit, update, optimize, or fix AGENTS.md files; asks for Codex project guidance maintenance; mentions nested AGENTS.md conflicts, stale commands, scoped instructions, sandbox or approval boundaries; or says "优化 AGENTS.md", "审计 AGENTS.md", "检查 nested AGENTS.md", or "更新 Codex 项目指导".
npx skillsauth add bahayonghang/my-claude-code-settings agents-md-improverInstall 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.
Audit and improve Codex AGENTS.md guidance files so future Codex CLI, Codex App, and native subagent sessions receive concise, accurate, scoped project instructions.
Default mode is report-first. Output a quality report and proposed diff before writing. If the user explicitly asks to implement an approved plan, continue directly to targeted edits and verification.
AGENTS.md file governs the directory that contains it and every descendant directory.AGENTS.md adds or overrides guidance for its subtree.AGENTS.md content.AGENTS.md files are project guidance. User-level ~/.codex/AGENTS.md is global preference guidance and should not be edited unless explicitly requested.<!-- OMX:RUNTIME:START --> ... <!-- OMX:RUNTIME:END --> and <!-- OMX:TEAM:WORKER:START --> ... <!-- OMX:TEAM:WORKER:END -->.Find scoped guidance files:
# POSIX shells
find . -name AGENTS.md -not -path './.git/*' -not -path './node_modules/*' -not -path './target/*'
# PowerShell
Get-ChildItem -Recurse -Force -Filter AGENTS.md |
Where-Object { $_.FullName -notmatch '\\.git|node_modules|target' } |
Select-Object -ExpandProperty FullName
Also note, but do not edit by default:
~/.codex/AGENTS.md
.codex/agents/
.codex/skills/
Classify each file:
| Type | Location | Purpose |
|---|---|---|
| root guidance | ./AGENTS.md | repo-wide commands, architecture, gates, safety boundaries |
| nested scoped guidance | ./<subtree>/AGENTS.md | local commands, ownership, generated files, conventions |
| user global guidance | ~/.codex/AGENTS.md | user-wide preferences, outside repo scope |
| generated/runtime guidance | .omx/.../AGENTS.md or similar | runtime state; usually read-only/no-edit |
For every repo guidance file, verify claims against the repository:
package.json, justfile, Cargo.toml, pyproject.toml, Makefile, CI files.codex/skills, .codex/agents, AGENTS.md scope rules, sandbox/approval notesUse references/quality-criteria.md for detailed scoring.
Quick checklist:
| Criterion | Weight | Check | |---|---:|---| | scope and override clarity | 20 | file explains what subtree it governs and how it relates to parent guidance | | executable commands and gates | 20 | build/test/lint/typecheck commands are real and scoped | | architecture and ownership | 15 | enough map to route future edits without restating obvious code | | safety and permissions | 15 | sandbox, approvals, secrets, destructive operations, external services are clear | | Codex workflow fit | 15 | skills/subagents/plugins/OMX guidance is accurate and not overpromised | | conciseness and currency | 15 | current, dense, non-duplicative, no stale file paths |
Grades:
Always provide this report before edits unless the user already approved an implementation plan.
## AGENTS.md Quality Report
### Summary
- Files found: X
- Root guidance: present/missing
- Nested scoped files: X
- Average score: X/100
- Files needing update: X
### Scope Map
| File | Governs | Parent guidance | Notes |
|---|---|---|---|
| `AGENTS.md` | repo root | none | ... |
| `packages/api/AGENTS.md` | `packages/api/**` | root | ... |
### File-by-File Assessment
#### 1. `AGENTS.md`
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|---|---:|---|
| scope and override clarity | X/20 | ... |
| executable commands and gates | X/20 | ... |
| architecture and ownership | X/15 | ... |
| safety and permissions | X/15 | ... |
| Codex workflow fit | X/15 | ... |
| conciseness and currency | X/15 | ... |
**Issues**
- ...
**Proposed changes**
- ...
When approved or already authorized by a plan:
AGENTS.md instead of duplicating it everywhere.Run the smallest checks that prove the edits:
git diff --checkIf a documented full gate is expensive, state whether it was run or why it was not.
references/quality-criteria.md — scoring rubric and red flagsreferences/templates.md — root, monorepo package, frontend/backend/docs templatesreferences/update-guidelines.md — what to add, avoid, and preserveAGENTS.md missing commands required by CI or local developmentAGENTS.md contradicts parent guidance without saying why## AGENTS.md Update Summary
### Files changed
- `AGENTS.md` — ...
- `packages/api/AGENTS.md` — ...
### What improved
- scope/override clarity
- command/gate accuracy
- safety boundaries
### Verification
- `git diff --check` — passed
- `<targeted command>` — passed/failed/skipped with reason
### Remaining risks
- ...
development
Turn vague or complex Codex tasks into strong `/goal` commands with outcome, verification, constraints, boundaries, iteration policy, completion evidence, and pause/block conditions. Use when the user asks for Codex goal instructions, Goal 指令, 目标指令, `/goal` prompts, 中文 Goal 模板, plan-to-goal interviews, success criteria, verification commands, or bounded agent work definitions.
tools
Write, debug, and validate ast-grep structural code search rules. Use this skill when the user needs syntax-aware code search, AST pattern matching, structural refactor discovery, language-construct queries, or searches that plain text tools like rg can miss, such as finding functions with particular descendants, calls inside specific contexts, missing error handling, React hook shapes, decorators, or other Tree-sitter-backed code structures.
development
Use when the user asks to ground an ambitious proposal, avoid over-grand designs, make a bold direction executable, pressure-test feasibility, prevent "too much vision and too little landing", or turn a strategy/refactor/product idea into the smallest verifiable first move with stop rules. Trigger for requests such as 落地, 先落地, 别太飘, 收一收, 可执行, 可验证, 止损, and for follow-ups after geju-style big-picture thinking. Do not trigger for ordinary code review or implementation unless the user explicitly asks to ground or shrink the plan first.
development
Use when the user explicitly asks to think bigger, open up the design space, challenge conservative design, avoid over-indexing on backward compatibility, escape local-detail fixation, or make a bold high-level product or architecture direction call. Use for strategic reframing, not for ordinary code review, PRD writing, implementation planning, or adversarial risk review.