code-audit-deep-a6962d — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited code-audit-deep-a6962d (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Line-level audit. Companion to architectural-hotspots. Hotspots ranks files by structural shape (fan-in, fan-out, LOC, cycles); this skill reads files and emits specific, actionable findings with line numbers and fix sketches.
The core failure mode this skill exists to prevent: producing vague "consider refactoring X" advice instead of commit.rs:426 — NonceGen calls SystemTime::now() per nonce; hoist or seed-and-increment. The first is what a graph tool already said; the second is what the user actually wanted.
Use whenever the user wants findings inside code rather than rankings across files. Triggers include:
commit.rs" / "review plan.rs"apply_changes?"architectural-hotspots and the user wants the nextlevel of detail on the flagged files.
Do not use when the user wants:
architectural-hotspots.should run. Overlap is fine; this skill won't hunt for known CVEs.
The strength of this skill comes from depth, not breadth. Better to audit three files thoroughly than ten superficially.
files by combined signal (god + hub, god + tangle, or any file inside a cycle).
but "which files do you want audited?" so the answer drives work.
not enough. A finding requires a line number, and a line number requires having read the line. Skim-reading is the most common failure of this skill — defend against it actively.
two or three axes. Don't reach for findings in an axis that genuinely doesn't apply.
file:line. One-line symptom. One-line fix sketch. No paragraphs of prose around each finding — the user is reading for signal.
and name them at the end. This is the deliverable the user will actually act on first.
Each axis answers a different question. They are deliberately orthogonal — a finding belongs in exactly one category.
What is making this slow that shouldn't be?
Smells:
open, stat, exists,metadata, read_dir called inside a loop body.
SystemTime::now(),Instant::now(), rand, gettimeofday — fine once, expensive per element.
String::new, Vec::new, .clone()of non-trivial data, .to_owned(), format! in inner iter.
over the entire post-image to detect changes. Re-walking a tree that was just walked. Recompiling a pattern per call.
compiled in two paths. Same tree-sitter Query built twice.
.collect::<Vec<_>>() of a streamwhose only consumer is .iter() or one-pass.
Probes (use as starting points, not as the audit itself):
rg -n 'SystemTime::|Instant::|\.now\(\)' <file>
rg -n '\.exists\(\)|\.metadata\(\)|fs::read|read_to_string' <file>
rg -n '\.clone\(\)' <file>
rg -n 'collect::<Vec' <file>Where do errors silently disappear?
Smells:
let _ = fallible_call(); — return value, including errors,discarded. Sometimes intentional (best-effort cleanup) but often a hidden bug. If intentional, the comment must explain.
.ok() immediately after ?-able call — converts to Option,drops error type.
all failures: results.into_iter().find(|r| r.is_err()), .collect::<Result<Vec<_>, _>>() when partial success matters.
A rollback function returning () that calls fs::rename internally without surfacing failures is hiding partial-state bugs.
? inside a loop where one bad element should not abort thewhole batch (or vice versa — ? missing where it should fail fast).
match arms that absorb specific err variants without comment.fsync / sync_all on a parent dir failing silently — onlyobservable when the OS later loses data.
Probes:
rg -n 'let _ = ' <file>
rg -n '\.ok\(\);|\.ok\(\)$|\.ok\(\)\?' <file>
rg -n 'unwrap_or\(|unwrap_or_else' <file>
rg -n 'if let Err' <file> # often where silencing happensWhat is held in memory that doesn't need to be, or held twice?
Smells:
full new text and the rendered diff of old→new. The diff already encodes the new text relative to old — keeping both doubles per-file footprint.
Vec<String> where Vec<&str> would suffice given lifetimes.Arc<Mutex<T>> where T: Copy + atomics would do.variant.** One 200-byte variant inflates every instance. Box<LargeVariant> fixes.
simultaneously while only one is consumed downstream.
Where is one function doing too much, or too dangerously?
These are visible only by reading function bodies — graph tools miss them because they live below the file boundary.
Smells:
controls (parser, walker, AST visitor). Stack-overflow vector.
match dispatch with > ~10 arms — table-driven version oftenclearer and easier to extend.
&mut to many outer variables — usually astruct trying to be born.
— collapse to one.
What couples that the import graph cannot see?
architectural-hotspots sees file-to-file imports. This axis catches the rest:
helpers from a third — they share an implicit protocol that wants to be made explicit.
exactly one caller — the abstraction has one user. Inline it or own the branch in the caller.
orchestrator can usually absorb the other, or both should delegate to a thinner core. Hotspots flags both as "tangles" without naming the relationship.
premature.
Use this exact template. Counts in the headings let the user scan volume at a glance. Omit any section with zero findings — do not pad.
**Perf (N)**
- `file:line` — symptom in ≤8 words. Fix: <one short phrase>.
**Correctness (N)**
- `file:line` — symptom. Fix: <one short phrase>.
**Memory (N)**
- `file:line` — symptom. Fix: <one short phrase>.
**Complexity (N)**
- `file:line` — symptom. Fix: <one short phrase>.
**Coupling (N)**
- `file_a:line + file_b:line` — symptom. Fix: <one short phrase>.
**Top targets**
3-4 highest-leverage fixes, named with file + symptom.Good:
Perf (2) -commit.rs:426—NonceGen::nextcallsSystemTime::now()per nonce. Fix: hoist call, increment counter. -commit.rs:328—recover_sweepdoesexists()syscall per backup. Fix: singleread_dir+ filter.
Bad (vague, no line, no fix):
Consider refactoring commit.rs for performance. Some operations may be inefficient.Bad (over-prosaic, paragraph form):
Looking atcommit.rs, around theNonceGenstruct, I noticed that it callsSystemTime::now()which is a syscall. This could be slow if called many times, although it depends on the use case…
The format constraint matters because the user reads dozens of findings; signal density wins.
A good audit of a single ~500-line file usually yields 5-15 real findings. Fewer than ~3 means either the file is genuinely clean (a real outcome, say so) or the audit was too shallow. More than ~20 usually means the bar dropped — drop the weakest ones rather than pad the list.
Every finding must survive the "would the user act on this?" test:
| Finding | Acts on it? |
|---|---|
commit.rs:426 — SystemTime::now() per nonce, hoist | yes |
commit.rs is long, consider splitting | no — that's hotspots |
function could be more idiomatic | no — that's clippy |
naming could be clearer | no — not what this skill is for |
When in doubt, drop it.
emitting findings about "what the function probably does". Always read bodies before claiming a finding.
tokio::spawn" when thecodebase is sync. Match fixes to the project's actual stack.
// SAFETY: block,a documented let _ =, a comment explaining why a clone is required — not findings. Read the comments.
imperatives: hoist, inline, collapse, extract, box this variant, bound the recursion, aggregate all errors.
beats a sprawling list of 25 mostly-noise. The user picks 3-4 to act on either way.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.