audit-a-module
Health check one module or service and recommend what to do with it: leave it, clean it up, refactor it with care, or don't touch…
Hold every change to one engineering standard and get a pass or fail with evidence before it merges. SETUP installs quality gates in a repo, PLAN designs a task against the bar (separation of concerns, SOLID, DRY, tests), AUDIT reviews a diff dimension by dimension. Use when you
Claude Code
$ npx -y skills add off-grid-ai/skills --skill code-check --agent claude-code
Codex
$ npx skills add off-grid-ai/skills --skill code-check -a codex -y
Cursor
$ npx skills add off-grid-ai/skills --skill code-check -a cursor -y
Gemini CLI
$ npx skills add off-grid-ai/skills --skill code-check -a gemini-cli -y
GitHub Copilot
$ npx skills add off-grid-ai/skills --skill code-check -a github-copilot -y
OpenCode
$ npx skills add off-grid-ai/skills --skill code-check -a opencode -y
Windsurf
$ npx skills add off-grid-ai/skills --skill code-check -a windsurf -y
name: code-check description: Hold every change to one engineering standard and get a pass or fail with evidence before it merges. SETUP installs quality gates in a repo, PLAN designs a task against the bar (separation of concerns, SOLID, DRY, tests), AUDIT reviews a diff dimension by dimension. Use when you say "audit this diff", "is this ready to merge", "/code-check", "plan this subsystem", or "set up quality gates". Not for small fixes.
Three modes. **SETUP** once in a fresh repo. **PLAN** at the start of a task. **AUDIT** before a PR (the default when a diff already exists). Find out which repo and stack you are in first: the gates differ per repo (see Mechanical gates). If the repo is one of several apps that share code (web, mobile, desktop, a shared package, a server), note which one, because the "One seam across platforms" rules depend on it.
Don't load this for a small fix: apply the principles from the repo's agent instructions (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules` or the equivalent) directly. Load it to design a genuinely new subsystem or to audit a real PR.
---
**Bundled files.** This skill keeps its scripts as Markdown (`<file>.md`, the code inside a `~~~~~` fence) so the skill folder holds no runnable files. Before the first run in a session, copy the skill to a work folder and write them out; `$OUT` below is that copy, laid out exactly like the skill folder:
SKILL="<this skill's folder>"; OUT="${TMPDIR:-/tmp}/off-grid-skills/code-check"
rm -rf "$OUT" && mkdir -p "$OUT" && cp -R "$SKILL/." "$OUT/"
for f in setup/bootstrap.sh setup/configs/web/dependency-cruiser.js setup/configs/web/prettierrc setup/configs/web/githooks/pre-push setup/configs/react-native/dependency-cruiser.js setup/configs/react-native/prettierrc setup/configs/react-native/githooks/pre-push; do awk '/^~~~~~/{n++;next} n==1' "$OUT/$f.md" > "$OUT/$f"; done
chmod +x "$OUT"/setup/configs/*/githooks/pre-pushFor a JavaScript or TypeScript repo: `bash "$OUT/setup/bootstrap.sh"` from the repo root. It is idempotent and backs up any edited config to `<file>.hygiene.bak`. It detects the stack (web, React Native, plain TS library) and installs prettier, typed eslint, dependency-cruiser, jscpd, knip and c8, the tsconfig flags, and the pre-push hook. Pre-push runs the fast subset; CI runs the full set. A repo with a backlog starts noisy rules at a baseline and ratchets toward `error` and zero: never loosen a gate to excuse a new problem. Details and the per-repo tuning you still do by hand: `setup/README.md`.
For other stacks (Python, Go, Swift, Kotlin, Rust), set up the same gates by hand with the stack's own tools: a formatter, a typed linter, a dependency or import-boundary check, a copy-paste detector, a dead-code finder, a coverage bar on pure logic, a pre-push hook, and a CI workflow that runs everything.
1. **Three questions.** Enough to abstract? (2+ concrete cases through one caller is a seam; one case is not: YAGNI.) Does SOLID apply? (What owns the one responsibility; what interface callers depend on.) Is it reused? (The single source of truth.) 2. **Separation of concerns.** Name the owning **service** (state machine, resources, side effects), the **pure logic** to isolate (no I/O), the **thin handlers** (I/O only), the **presentation** (no logic, no state). Where is the seam, and what gets injected? 3. **DRY, and which package owns it.** The rule, map, constant or type defined once, and every place that must use it. If it is true on more than one platform, name the shared package that owns it and the ports each host injects. Then state what the second host has to write: it must be wiring only, never logic. 4. **Tests.** The corner-case integration scenarios FIRST: the real user flow through the real seam in its hard states (empty, first, boundary, the false branch of each gate, concurrency and ordering, the error path, the device or memory-pressure case). Name the end result each one asserts (rendered text, saved row, file on disk), and the BEFORE state it asserts so the after-assertion can't pass as a no-op. Green on working code is the bar: no red-first, and source code is never broken to show a test can fail. 5. **Design and brand**, if there is UI: which tokens, which approved component library; read the project's design doc. 6. **Reuse.** What already exists that this extends rather than rebuilds.
1. **Mechanical gates.** Run them and paste the results: format, lint, type check, the change's tests, coverage against the repo's bar, and a production build if native code, dependencies, config or imports changed. 2. **Separation of concerns.** Logic in the owning service, handlers thin, pure logic isolated, presentation free of state. Flag any view or hook doing retry, cancel, orchestration or "compute the real value". Any new local state that can be derived, mirrors the store, is synced by an effect, or is read by siblings that shouldn't share it? 3. **SOLID.** Any `kind ===`, `instanceof` or platform check used to choose a mechanism in a caller? Would a new implementation need caller changes? A patch layered on shared state instead of the owning seam? 4. **SSOT / DRY.** Any rule or constant defined twice (for example in a server and a client, or a main and a renderer process)? For each fact the diff touches: who owns it, and is anything else entitled to answer the same question? 5. **One seam across platforms.** Does any cross-platform rule live in a host instead of the shared package? Could the next platform be brought up with wiring alone, or would it restate this logic? Is the injected surface small and total, or can a host half-wire it? Is a capability gap reported as data, or branched on with a platform check? 6. **Tests.** Real integration through the real seams; assert the end result, never `toH
These are the skills I use every day. I built Off Grid AI on my own with them, and it reached 250,000+ downloads on 7 platforms without spending a dollar on ads. Install them and your AI works the way mine does.
Health check one module or service and recommend what to do with it: leave it, clean it up, refactor it with care, or don't touch…
Before editing a file or symbol, find everything that depends on it, score how risky the change is, and stop for approval when…
Check everything before and after a production deploy, with a rollback plan and clear rollback triggers. Use when the user is…
Get to know an unfamiliar codebase fast. Maps what it does, its modules, entry points, riskiest files, recent changes and the…
Plan a new project before any code exists. Researches the domain, then has an architect, a product lead and a security lead plan…
Check that code follows the project's architecture rules, such as which modules may import which, no cycles, and services talking…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…