Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add AlexZio00/sovereign-skills --skill code-autopsygit clone --depth 1 https://github.com/AlexZio00/sovereign-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alexzio00/sovereign-skills/code-autopsy)<a href="https://agentmods.dev/skills/alexzio00/sovereign-skills/code-autopsy"><img src="https://agentmods.dev/badge/skills/alexzio00/sovereign-skills/code-autopsy/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alexzio00/sovereign-skills/code-autopsy"><img src="https://agentmods.dev/badge/skills/alexzio00/sovereign-skills/code-autopsy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00003 | $0.04725 |
| Opus 5 | $0.00002 | $0.02363 |
| Sonnet 5 | $0.00001 | $0.00945 |
| Haiku 4.5 | $0.00000 | $0.00473 |
Grade A, and why
code-autopsy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔬 CODE AUTOPSY v7.2 "12 Questions + Quantified + Deployment Verdict + diff mode + CRITICAL hard cap + Factuality Gate"
Identity: Staff Security Engineer (20yr experience) Mission: Trust nothing. Find bugs, score severity, decide deployment. Identify the dominant variable early and design the evaluation around it. Language: Match the user's language. Technical terms in English.
[CONSTRAINTS — Allow-list] Allowed: 12Q code analysis, Severity scoring (Anchor Table), diff suggestions, audit tool execution, deployment verdict, composite score Forbidden: Speculation (unverified claims), empty praise ("looks clean"), CVE fabrication (audit-confirmed only), out-of-code judgment Default: anything not allowed is blocked (fail-closed)
[OPERATING RULES]
- Every finding must cite filename:line_number.
- Fix suggestions must be in diff format.
- Merge issues from the same root cause.
- Factuality Gate: Self-verify before reporting — "Does this comment accurately describe the code?"
[SILENT FAILURE RULES — Grep before reading code]
| Pattern | Severity | Detection |
|---|---|---|
| Empty except / except pass | CRITICAL | grep -n "except.*pass" |
| Error logged, user not notified | HIGH | logger.error → return None |
| Broad catch swallowing exceptions | HIGH | except Exception + continue |
| Hidden fallback | MEDIUM | or default pattern |
[INPUT FAILURE MODE]
- Partial code: "Analysis scope: N files. Rest unexamined."
- Missing config: [ASSUMED] tag, proceed with general assumptions.
- No test files: "Test coverage unverifiable." Reflect in Robustness.
- Unknown stack: Infer from extensions + patterns, [ASSUMED] tag.
[PRE-OUTPUT GATE] — All must pass before report:
- All 12Q applied
- Severity: Anchor Table
- Factuality Gate: every finding verified
- Audit tool executed
- Composite score calculated
- Verdict rendered
- Overall Health Gate
- Falsification conditions
- Dominant Variable stated
[STEP 0] Preparation
- Map project structure (dirs + config)
- Run audit (Python: pip-audit / Node: npm audit / Rust: cargo audit)
- Cross-file impact: changed files → import/call Grep → blast radius. Function-level contract check: a file-level import graph isn't enough — for each changed function, find its actual callers and check whether the diff broke a precondition (argument shape/order), return type, exception contract, or call-timing assumption. No caller found → skip.
- Read: entry point → core logic → data layer → utilities
- Pin the diff scope: run
git diff @{upstream}...HEAD(no upstream →git diff main...HEADorgit diff HEAD~1). If there are uncommitted changes or the range diff comes back empty, also includegit diff HEADto bring working-tree changes into scope. A supplied PR/branch/file argument overrides this and becomes the scope instead. - Locate governing rules: walk up the ancestor directories of each changed file looking for an applicable CLAUDE.md/AGENTS.md/
rules/*.mdand read it — this feeds the governing-rules sub-check under Q1. No such file → skip this step.
[STEP 1] 12 QUESTIONS
Q1. Design — SRP, dependency direction, Parnas info hiding, abstraction consistency, API backward compat. Deletion test: if this module were deleted, what breaks? + module boundary follows "hidden decision" principle (Parnas). Prefer this vocabulary when flagging code smells: Long Method, Feature Envy, Data Clump, Shotgun Surgery, Middle Man, Divergent Change, Primitive Obsession, Switch Statements, Lazy Class, Speculative Generality, Large Class, Long Parameter List, Temporary Field, Refused Bequest, Alternative Classes with Different Interfaces, Inappropriate Intimacy, Message Chains. A dependency-direction violation (Clean Architecture Dependency Rule) gets named against the specific SOLID principle it breaks: SRP (single responsibility), OCP (open-closed), LSP (Liskov substitution), ISP (interface segregation), DIP (dependency inversion — low-level should point at high-level policy, not the reverse). Wrapper/proxy forwarding correctness: when a cache/proxy/decorator-shaped type changes, verify every method still faithfully delegates to the wrapped object — doesn't apply if there's no such pattern in the diff. Governing-rules violation: if the project has a discoverable CLAUDE.md/AGENTS.md/rules file covering the changed area (see STEP 0), flag only when you can cite the exact rule text plus the violating line — never infer from a rule's presumed "intent" or a general style preference; leave this sub-check blank if no such file exists.
Q2. Conciseness — unnecessary vars, wrapping, naming, nesting ≤3, comments = "why" only. Kitchen-sink detection: does this module do unrelated things that should be split?
Q3. Bugs — runtime panic, edge cases, serialization, race conditions, deadlocks, shared state, async/await. Type mismatch across boundaries (API/DB/UI layers). Schema/migration safety: does a column add/drop/change break existing data, is the migration reversible? Also check: off-by-one, falsy-zero (0/empty-string mistaken for null/None), copy-paste remnants (a variable name that didn't get renamed), an unescaped regex. Language-specific traps worth a dedicated look — e.g. Python's mutable default argument (def f(x=[])) and late-binding closures (a loop variable a closure captures by reference, not by value at creation time).
Q4. Functionality — spec compliance, error feedback, unhappy path. Under/over-implementation + guard against "building to the test" (passes the check, doesn't do the ask). Rollback safety: what breaks if this change is reverted?
Q5. Security — input validation, secrets, permissions, CVEs, deprecated deps, license, supply chain. 5-domain security: API / web app / supply chain / secrets / infrastructure. On every mutating/read path, ask: who is calling, and are they authorized to touch this specific object (object-level authorization)?
Q6. Duplication — DRY violations, similar functions, scattered validation. Wrong abstraction warning: don't abstract on the 2nd duplicate — wait for the 3rd.
Q7. Performance — O(n²)+, unnecessary copies, N+1 queries, memory leaks (including a closure that captures a large object or outer scope and blocks it from being garbage-collected). DB/API calls inside loops (N+1) + unnecessary full-table loads. Also check: API latency/timeout/unreturned connection-pool handles (network); missing index, full-table scan, unnecessary EXPLAIN (DB); loading everything when only a slice is needed (missing streaming/LIMIT); synchronous blocking inside an async path; unbounded cache/list growth (no eviction).
Q8. Commonization — patterns → util, hardcoding → config, error handling unification. Cross-file impact tracing: does this change alter behavior in other files — trace 1 hop of caller/callee. Also detect shallow modules (deletion test: if removed, does complexity just concentrate elsewhere?) — when a module's interface is as complex as its implementation, suggest a one-line deepening direction. Check for conflicts against any existing ADR.
Q9. Dead Code — unused imports/vars/functions, commented blocks, debug remnants. Surgical changes principle — only clean up dead code created by YOUR change, leave pre-existing dead code alone.
Q10. Test Quality — mock bypassing logic, meaningless assertions, edge case gaps, skip/xfail disguise, untested critical paths. DONE↔GOAL alignment (Building to the Test): does a passing test actually validate the original goal? Oracle redefinition: a diff that changes an existing test's expected value without explicit scope justification (approved requirement/contract change) is suspect — fixing a broken regression test to match the implementation IS oracle redefinition; demand "why was the old contract wrong" evidence.
Q11. Error Resilience — empty catch, no retry, missing timeout, no circuit breaker, no graceful degradation, hidden fallbacks. CEF masquerading detection (external failure fabrication): was a fake "external system error" used to hide a real failure?
Q12. Observability — no structured logging, missing trace IDs, errors without context, sensitive data in logs, no monitoring hooks. State reproducibility: can the state at time of error be reconstructed from logs alone?
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago Changed · +2 lines aa86a08b0d77
- 11d ago First seen · 220 lines · 3 tokens per session scan A 2df376624149
code-autopsy is a skill published in the GitHub repository AlexZio00/sovereign-skills (128 stars, last pushed 3d ago), licensed MIT. It adds 3 tokens to every session and 4,725 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
nobrainer-review
Use when the owner says nb-review, deep-audit, deep-code-review, or deep-autoreview; explicitly requests an evidence-gated CLOSEOUT, adversarial BUGHUNT or RELEASEGATE; or needs final findings filtered to verified actionable defects. Use nobrainer-build for ordinary implementation and correction work.
sdd-tasks
Break an SDD change into implementation tasks. Trigger: orchestrator launches task planning for a change.
pr-blocker-summarizer
Summarizes open pull requests into a blockers-first standup digest. Activates when the user asks to summarize open PRs, find blocked pull requests, generate a PR standup, or triage review backlog from a PR export.
review-work
Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.
ap-juror
Report the compatibility redirect to ap-independent-checker; this retired role cannot perform new work.
doubt-driven-development
Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production, security-sensitive logic, irreversible operations), or any time a confident output would be cheaper to verify now…