一键导入
audit
Minimal codex-native audit loop. Use to scan codex configuration/workflow drift and emit ranked gaps with measurable gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Minimal codex-native audit loop. Use to scan codex configuration/workflow drift and emit ranked gaps with measurable gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Adapter over `codemap-py integrate` — audit, plan, source-wire, locally sync, and demonstrate the codemap-py integration with its supported consumers. Trigger with `/codemap-py:integration check|plan|apply|sync|demo [--runtime {claude,codex,both}] ...`. Default (no args) is `check`. Skip for: running a structural query (use `/codemap-py:query-code`); explicit standalone index rebuild (use `/codemap-py:scan-codebase`).
Scan the Python codebase and build a structural JSON index (import graph + blast-radius metrics). TRIGGER when: user asks to build, refresh, or rebuild the codemap index; user mentions stale index, missing symbols, or re-indexing after significant project changes; phrases: "build codemap", "scan codebase", "refresh structural index", "rebuild import graph".
Read local codemap telemetry logs and produce a diagnostic/usage report. Supports date filtering, session filtering, and optional anonymization before sharing. Trigger with `$codemap-py:debrief-coding [--since <YYYY-MM-DD>] [--session <id>] [--anonymize] [--output <path>]` to analyse recent codemap usage, debug query patterns, investigate errors, or prepare a shareable anonymized report of how codemap skills and the CLI are being used.
Adapter over `codemap-py integrate` — audit, plan, source-wire, locally sync, and demonstrate the codemap-py integration with its supported consumers. Trigger with `$codemap-py:integration check|plan|apply|sync|demo [--runtime {claude,codex,both}] ...`. Default (no args) is `check`. Skip for: running a structural query (use `$codemap-py:query-code`); explicit standalone index rebuild (use `$codemap-py:scan-codebase`).
Query the codemap structural index — module deps/rdeps/central/coupled/path, symbol-level source extraction, function call graph (fn-deps, fn-rdeps, fn-central, fn-blast), plus quality/coverage queries. Trigger with `$codemap-py:query-code <subcommand> ...` for: "what depends on", "who calls", "imports of", "dependency graph", "blast radius of", "list central modules". Skip for: rename intent (use `$codemap-py:rename-refs`); simple grep suffices; non-Python repo. Missing/stale index auto-builds — no manual scan-codebase needed.
Atomic rename of Python symbols or modules via the structural index — static callers, import sites, `__all__` re-exports, Sphinx cross-refs; optional deprecated alias (`--deprecate`) or hard-delete (`--remove-if-no-callers`). Trigger with `$codemap-py:rename-refs symbol <old> <new> [flags]` or `$codemap-py:rename-refs module <old_path> <new_path> [--dry-run]` for: "rename X to Y" (function/class/method/ module), "move module X to Y", "update all references to X". Skip for: non-Python; index not built (run `$codemap-py:scan-codebase` first); local-variable rename; grep-only rename wanted; 1:N symbol splits; package directory rename (use `git mv` directly).
| name | audit |
| description | Minimal codex-native audit loop. Use to scan codex configuration/workflow drift and emit ranked gaps with measurable gates. |
Run linear configuration/workflow audit.
{
"scope": "config|skills|roles|all",
"target": "optional path",
"mode": "upgrade|adversarial",
"skip_gate": false,
"done_when": "drift and broken references are ranked with gate result; fix level chosen interactively unless skip_gate=true"
}
Run python PLUGIN_ROOT/shared/create_run.py --skill audit once. Retain its single printed path as
<run-directory> and substitute that literal path into every later artifact path and helper argument. Never store or
reuse the path through a shell variable; shell variables do not persist across tool calls.
Scopes:
config: project .codex/config.toml, AGENTS.md layers, permissions, and routing.skills: repository/user-authored .agents/skills/** plus declared calibration coverage.roles: role-routing instructions and an explicitly supplied plugin/package role-card root.all: every applicable surface above. Missing optional local skills or roles is not-configured, not drift.Run rg --files with the AGENTS.md, .codex/config.toml, and .agents/skills/** globs as argv. When target is
supplied and exists, enumerate regular files under it to depth four with a platform-native filesystem walk. Sort and
deduplicate both result sets into <run-directory>/inventory.txt; record unavailable inputs or collection failures.
Write <run-directory>/audit-ledger.md with these sections:
Inventory: configured/present policy, skills, and role-routing surfaces.Broken References: missing files, stale paths, unresolved shared resources.Runtime Leaks: non-native runner fields/external runtime assumptions.Coverage: calibration benchmark/behavior.Overlap: duplicate/fuzzy ownership decisions.Recommendations: ranked fixes.For scope=all, mode=adversarial, or audits crossing skills, agents, CI/config, apply ../../shared/specialist-orchestration.md. Write <run-directory>/specialist-audit-plan.md packs for:
curator: skill/agent/config drift, duplication, calibration hygiene.linting-expert: Markdown, Python, shell, ruff/mypy/pre-commit references.cicd-steward: CI harness, workflow permissions, artifact behavior.challenger: adversarial check of no-finding or low-risk conclusions.Stay single-agent for narrow scope=config, scope=skills, or scope=agents audits where same inventory would go to every specialist.
Follow ../../shared/helper-cli-contract.md and python PLUGIN_ROOT/shared/run_gates.py --help. Use project-configured lint, format, type, and test commands for the discovered surfaces, explicit reasons for inapplicable gates, and clean diff review.
Run rg -n for config_file|skills/|roles/|quality-gates|run_gates.py|write-result.py over existing AGENTS.md,
.codex, .agents, and the optional target. Write results to <run-directory>/reference-scan.txt; record missing
inputs or command failure explicitly.
AGENTS.md (instruction-level check)Run two separate rg -n argv scans: delegat|specialist|spawn|role|\[agents\. over existing AGENTS.md and
.codex/config.toml, writing <run-directory>/spawn-sections.txt; then
Trigger and skip boundaries|TRIGGER when|SKIP when|NOT for over the supplied target or AGENTS.md, writing
<run-directory>/spawn-policy-sections.txt. Record missing inputs or command failure explicitly.
Each configured skill has:
Input SchemaWorkflowFail-Fast RulesQuality GatesCalibration HooksOutput ContractEach configured role or agent has:
## Scope or clear role boundary text## Evidence Standard## Boundaries## Output Contract or explicit output formatWhen a target is supplied, run rg -n for ^(role_id|name|model|description|developer_instructions) over that exact
target and write <run-directory>/role-roster-scan.txt; record scan failure. Without a target, create that artifact as
an empty file and classify the role roster as not configured.
Classify overlap as keep, sharpen, merge-prune:
keep: distinct decision surface.sharpen: role stays; tighten boundary.merge-prune: no distinct acceptance criterion.../../shared/severity-map.mdUse shared lifecycle/authoritative help. Write AUDIT_METADATA, validate audit, promote only validated candidate.
Required checks:
review: inventory, contract ledger, reference scan, overlap decisions, git diff --check.calibration: run the owning project's declared calibration command when audited workflow behavior changes; for Codex Rig source, use runtime/calibration/run.py --layout plugin.Conditional checks:
lint/format: when Python/TOML/shell/Markdown formatters available.tests: with executable probes/behavior-changing fixes.Update calibration when audit scope, contract requirements, or routing checks change:
audit, every configured skill, every configured agentUse shared gate schema from ../../shared/quality-gates.md.
Minimum artifact payload template: result-template.json.