auditlisted
Install: claude install-skill Borda/AI-Rig
# Audit
Run a linear configuration and workflow audit loop.
## Input Schema
```json
{
"scope": "config|skills|agents|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"
}
```
## Workflow (Exact Commands)
1. Create run directory.
```bash
TS=$(date -u +%Y-%m-%dT%H-%M-%SZ)
OUT_DIR=".reports/codex/audit/$TS"
mkdir -p "$OUT_DIR"
```
2. Collect inventory.
```bash
find .codex -maxdepth 4 -type f | sort >"$OUT_DIR/inventory.txt"
```
3. Run shared quality gates.
```bash
.codex/skills/_shared/run-gates.sh \
--out "$OUT_DIR" \
--lint "${LINT_CMD:-bash -lc 'if command -v ruff >/dev/null 2>&1; then ruff check .codex; else UV_CACHE_DIR=${UV_CACHE_DIR:-/tmp/codex-uv-cache} uv run --no-sync ruff check .codex; fi'}" \
--format "${FORMAT_CMD:-bash -lc 'if command -v ruff >/dev/null 2>&1; then ruff format --check .codex; else UV_CACHE_DIR=${UV_CACHE_DIR:-/tmp/codex-uv-cache} uv run --no-sync ruff format --check .codex; fi'}" \
--types "${TYPES_CMD:-true}" \
--tests "${TESTS_CMD:-true}" \
--review "${REVIEW_CMD:-git diff --check}"
```
4. Detect drift and broken references.
```bash
rg -n "config_file|skills/|quality-gates|run-gates.sh|write-result.sh" .codex >"$OUT_DIR/reference-scan.txt"
```
5. Audit spawn-pattern coverage and overlap i