skills/developer-tools-integrations/agents-md-improver/SKILL.md
Audit and improve Codex AGENTS.md guidance files and companion code_map.md navigation maps 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, code maps, stale commands, scoped instructions, sandbox or approval boundaries; or says "优化 AGENTS.md", "审计 AGENTS.md", "检查 nested AGENTS.md", "更新 Codex 项目指导", or "生成 code_map.md".
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 and companion code_map.md navigation maps so future Codex CLI, Codex App, and native subagent sessions receive concise, accurate, scoped project instructions and fast code search entry points.
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.AGENTS.md carries durable behavioral constraints, commands, and safety rules. code_map.md carries navigational structure, search anchors, entry points, and generated/ignored directory notes.AGENTS.md should explicitly name the relative code_map.md path agents must read before broad grep or repo-wide search, for example See ./code_map.md before broad grep or For this subtree, start with platforms/codex/code_map.md.<!-- 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 -o -name code_map.md \) \
-not -path './.git/*' \
-not -path './node_modules/*' \
-not -path './target/*' \
-not -path './dist/*' \
-not -path './build/*' \
-not -path './.omx/state/*'
# PowerShell
Get-ChildItem -Recurse -Force -Include AGENTS.md,code_map.md |
Where-Object { $_.FullName -notmatch '\\.git|node_modules|target|dist|build|\\.omx\\state' } |
Select-Object -ExpandProperty FullName
Exclude generated, vendored, dependency, cache, and build-output directories from guidance creation scans, including .git/, node_modules/, target/, dist/, build/, .omx/state/, vendor/, generated docs output, coverage output, and language-specific package caches.
Discover candidate directories for new nested AGENTS.md plus local code_map.md before proposing writes. Score only real source subtrees that show one or more of:
package.json, Cargo.toml, pyproject.toml, go.mod, Makefile, justfile, or CI/workflow fragmentsAlso 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 |
| root code map | ./code_map.md | repo navigation, top-level routing, search anchors, ignored/generated paths |
| nested code map | ./<subtree>/code_map.md | subtree entry points, internal routing, upstream/downstream boundaries |
| 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 filescode_map.md files, map pointers in AGENTS.md, and whether map content is navigational rather than behavioral.codex/skills, .codex/agents, AGENTS.md scope rules, sandbox/approval notesUse references/quality-criteria.md for detailed scoring, including the nested AGENTS.md creation scorecard.
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 |
For each candidate nested subtree, record:
>=60), candidate only (40-59), or do not create (<40)code_map.md path and whether a local nested map should be createdGrades:
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
- Root code map: present/missing
- Nested scoped files: X
- Nested code maps: X
- Average score: X/100
- Files needing update: X
- Candidate nested guidance dirs: X create / X candidate-only / X skipped
### Scope Map
| File | Governs | Parent guidance | Notes |
|---|---|---|---|
| `AGENTS.md` | repo root | none | ... |
| `packages/api/AGENTS.md` | `packages/api/**` | root | ... |
### Code Map Coverage
| Map | Covers | Referenced by | Notes |
|---|---|---|---|
| `code_map.md` | repo root | `AGENTS.md` | ... |
### Nested Guidance Candidates
| Directory | Score | Decision | Evidence |
|---|---:|---|---|
| `packages/api/` | 75 | create `packages/api/AGENTS.md` + `packages/api/code_map.md` | independent tests, deploy boundary |
### 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:
code_map.md; keep behavioral rules, commands, and safety constraints in AGENTS.md.AGENTS.md instead of duplicating it everywhere.AGENTS.md names the exact relative code_map.md path agents should read first.Run the smallest checks that prove the edits:
git diff --checkAGENTS.md files reference an explicit relative code_map.md pathIf 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 missing an explicit ./code_map.md pointer when a root map exists or should existAGENTS.md contradicts parent guidance without saying whyAGENTS.md only says "read the code map" without naming the relative map pathAGENTS.md bloated with directory index content that belongs in code_map.md## AGENTS.md Update Summary
### Files changed
- `AGENTS.md` — ...
- `packages/api/AGENTS.md` — ...
- `code_map.md` — ...
- `packages/api/code_map.md` — ...
### What improved
- scope/override clarity
- command/gate accuracy
- safety boundaries
- map-first search flow with explicit relative `code_map.md` paths
### Verification
- `git diff --check` — passed
- `<targeted command>` — passed/failed/skipped with reason
### Remaining risks
- ...
tools
文献深度解读助手,像研究生导师一样交互式解读 Zotero 库中的学术论文,面向计算机科学、深度学习、自动化等方向(个人向)。当用户提供文献题目、DOI、PDF 或要求解读某篇论文时触发,通过 Zotero MCP 优先获取全文,并根据用户意图自动选择快速筛选、导师深读或研究复盘模式。完整深读时先完成叙事类型判断、阅读前预检、novelty 校准和作者思考路径重建,再整体概览,并基于图例、正文和表格逐图详细解读(Zotero MCP 无法提取 PDF 图片,解读基于文字信息,必要时提醒上传图片)。适用于:(1)快速判断文献是否值得深读 (2)深入理解某篇论文 (3)学习文章中的方法和技术 (4)批判性分析研究设计 (5)寻找研究灵感。需要多篇论文综合、对比或找研究空白,或 arXiv/DOI 批量规范化时,改用 paper-workbench。
development
Review Codex, Claude, OpenAI, or other agent skill directories as reusable capability packages. Use when asked to audit, review, improve, score, rewrite, debrand, package, or document a SKILL.md, skill package, marketplace skill, or agent skill directory, especially when the user wants a comprehensive findings-first report with concrete patch recommendations and validation steps.
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.