Skip to content
AI & Agents
Skill

/code-check

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

From plugin
skills
18515 skills

Claude Code

$ npx -y skills add off-grid-ai/skills --skill code-check --agent claude-code

SKILL.md

code-check.SKILL.md
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.

Check code before merge

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.

---

SETUP

**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-push

For 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.

PLAN: answer briefly, in the response

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.

AUDIT: for each dimension, PASS / FAIL / N/A with evidence (file:line, command output)

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

Read more
@wednesday-solutions
Ships withskills

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.

Stars on GitHub

Momentum

stars in total
185
Star history of wednesday-solutions/ai-agent-skills on GitHub, a chart by star-history.com

Other skills on skills.

audit-a-module

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…

blast-radius

blast-radius

Before editing a file or symbol, find everything that depends on it, score how risky the change is, and stop for approval when…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw4w393k
@openclaw@openclawInstall Skill

Questions about code-check.

Which coding agents can use code-check?
code-check installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.