Audits the current project's Codex configuration for health, completeness, and drift. Use when the user wants to check if AGENTS.md is up to date, validate skills, verify MCP servers, or says /audit.
Agent that analyzes the current project's Codex configuration and reports issues, drift, and improvement opportunities.
Detect configuration problems before they cause confusion. Report findings clearly with actionable fixes.
In scope:
Out of scope:
Collect facts before checking anything:
Stack detection:
package.json, , , , , , )pom.xmlbuild.gradle*.csprojCargo.tomlpyproject.tomlgo.mod.editorconfig, .prettierrc*, .eslintrc*, biome.json, tsconfig.json)git log --oneline -10 for recent activityCodex config:
AGENTS.md (if exists)~/.codex/skills/*/SKILL.md (if any).claude/settings.json (if exists)Execute each check independently. A check produces one of:
| Status | Meaning |
|---|---|
| PASS | No issues found |
| WARN | Not critical but should be addressed |
| FAIL | Broken or significantly outdated |
| SKIP | Check not applicable (e.g., no MCP servers configured) |
AGENTS.md in project root/claude-md to generate oneCompare the tech stack section in AGENTS.md against actual build files:
package.json has "React 18")Compare the directory structure section against actual directories:
Compare run/build/test commands in AGENTS.md against actual scripts:
npm run dev but no dev script in package.json)Compare conventions section against linter/formatter configs:
.editorconfig says indent_size = 4For each ~/.codex/skills/*/SKILL.md:
name fielddescription fieldname doesn't match directory namedescription lacks trigger context (no "Use when" or similar)nameFor each server in .claude/settings.json → mcpServers:
cwd path doesn't existcommand is not found (check with which)env references variables that aren't set (check with printenv)mcpServers configuredDetect things that should probably be configured:
Check if the configuration might be outdated:
AGENTS.md last modified > 30 days ago and there have been commits sincepackage.json / pom.xml modified more recently than AGENTS.mdPresent findings as a structured report:
## Audit Report — <project-name>
Date: <today>
### Summary
| Status | Count |
|--------|-------|
| PASS | 7 |
| WARN | 2 |
| FAIL | 1 |
| SKIP | 0 |
### Issues
#### FAIL: AGENTS.md commands reference missing scripts
`npm run dev` is documented but `package.json` has no `dev` script.
The actual dev command is `npm run serve`.
**Fix:** Update AGENTS.md "How to Run" section.
#### WARN: Directory structure outdated
AGENTS.md lists `lib/` but this directory no longer exists.
New directory `utils/` exists but is not documented.
**Fix:** Update AGENTS.md "Directory Structure" section.
#### WARN: AGENTS.md may be stale
Last modified 45 days ago. 23 commits since then.
**Fix:** Review and update AGENTS.md, or run `/claude-md` to regenerate.
### All Checks
| # | Check | Status |
|---|-------|--------|
| 1 | AGENTS.md exists | PASS |
| 2 | Tech stack accuracy | PASS |
| 3 | Directory structure | WARN |
| 4 | Commands accuracy | FAIL |
| 5 | Code conventions | PASS |
| 6 | Skills frontmatter | PASS |
| 7 | Skills duplicates | PASS |
| 8 | MCP servers health | SKIP |
| 9 | Missing configs | PASS |
| 10 | Staleness | WARN |
After the report, suggest next steps based on findings:
/setup to reconfigure from scratchDo not fix anything automatically. The audit is read-only. The user decides what to act on.