skills/sniff/SKILL.md
Find and fix code smells — anonymous tuples, magic numbers, deep nesting, weak types
npx skillsauth add api-haus/my-claude-workflow sniffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an autonomous code smell hunter. Find places where you have to pause and think "what does this mean?" — then make the code obviously correct. These aren't principle violations or dead code — they're readability friction that clippy will never flag and /dry doesn't cover.
Code that works but forces the reader to reverse-engineer intent. The fix is always cheap: a named struct, a constant, a helper function, a flattened loop. If you're reading code and your first reaction is "I need to count the fields to know what .2 is" — that's a smell.
Examples of things to look for:
Sender<(OctreeNode, Option<MeshResult>, u64)> — what's the u64? Name it.info.lods[13] — why 13? Make it lods[CENTER_INDEX].(nx + 1) * 9 + (ny + 1) * 3 + (nz + 1) repeated twice — extract a const fn.for x { for y { for z { if x==0 && y==0 && z==0 { continue } — iterate a flat NEIGHBOR_OFFSETS array.(node, dx, dy, dz, leaves, max_lod, lod_bitmap) — maybe dx,dy,dz is one thing.0.3 * initial_gen + 0.4 * mesh_coverage + 0.3 * pipeline_idle — what are these weights?process(true, false) — what do those mean at the call site?Things that are NOT smells:
(Entity, &Transform, &MyComponent) — idiomatic ECS(key, value) pairs in iterators/dry and /refactor territoryUse your judgment. Not every tuple needs a struct. Not every number needs a name. The question is always: "would a stranger reading this line need to look elsewhere to understand it?"
| Skill | Domain |
|-------|--------|
| /dry | SOLID principles, DRY violations, design patterns |
| /enforce | Crate boundaries, dead public APIs, layer contracts |
| /deadcode | Zero-caller items |
| /refactor | Complexity metrics, clippy, debtmap |
| /sniff | Readability friction: naming, typing, structure |
Read docs/ARCHITECTURE.md and CLAUDE.md for crate hierarchy and conventions.
Scan .rs files under crates/*/src/ (skip tests, benches). Read the code — don't just grep for patterns. Look for places where intent is obscured by syntax.
For each finding, record location, current code, and proposed fix. Score by how much confusion it causes × how often it appears × how many files it touches.
Present as a numbered list before fixing anything:
## Top 5 Code Smells
### 1. [Title] — Score: N
**Locations:**
- `crates/voxel_plugin/src/world.rs:68`
**Current:** `Sender<(OctreeNode, Option<MeshResult>, u64)>`
**Fix:** Named struct `MeshPoolResult { node, result, epoch }`
Process 1 through 5 in order. For each:
cargo test --workspace
just build-wasm && just test-wasm
Both gates must pass — native tests AND WASM e2e.After all 5 are verified, commit via /commit.
cargo test --workspace AND just build-wasm && just test-wasm must both pass after each fix./commit.data-ai
Extract research content from YouTube presentations, PDFs, or PPTX files into structured markdown. Dispatches each pass to a dedicated sub-agent (research-extractor / research-vision / research-refiner) so per-deck vision passes scale to hundreds of slides without bloating the parent context.
development
Build, run, and analyze Unity profiler data with perf-report-style call-stack attribution
documentation
Write a handoff prompt for a future session. A handoff is a continuation-link — minimal context plus a kickoff line the user can copy-paste. Never a diagnosis, never an investigation script, never a prescribed deliverable.
testing
Multi-agent orchestration mode. The orchestrator never reads, edits, runs, or tests directly — it scopes work, runs a re-implementation audit, presents a freeform method brief with grounded recommendations, then dispatches every step to sub-agents through shared context files at `docs/orchestrate/<topic>/`. Use when invoked via /delegate, when the user asks to orchestrate or coordinate multi-agent work, or when the task explicitly calls for delegation.