sanity-check
Skill4 starsChanged 5 months agoMITView on GitHub
Post-implementation audit — checks codebase against the goal, runs stack-specific checks, security, performance, logic edge cases, and tests, then produces a PASS/WARN/FAIL report with severity tiers.
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- Markssuave/Markssuave-Agent-skillstheir own version, first seen Nov 8, 2026
- rivet-dev/rivetkittheir own version, first seen Oct 9, 2026
- rivet-dev/agentostheir own version, first seen Oct 8, 2026
- chmouel/lazyworktreetheir own version, first seen Oct 8, 2026
- rivet-dev/agent-ostheir own version, first seen Oct 8, 2026
- jonhill90/skillstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use launch-graphics, publish-registry and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
rivet-devSkilllaunch-graphics
Generate agentOS marketing/launch graphics (launch & social heroes, code-snippet cards) from the committed generators in docs-internal/graphics. Use when asked to make, update, or render an agentOS launch image, social image, "agentOS Apps" graphic, or technical code-snippet image.
Also in 3 projects that use this
rivet-devSkillpublish-registry
Publish @agentos-software/* registry packages from AgentOS. Use whenever the user asks to publish or release registry software/agent packages.
Also in 3 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
- +1 more from rivet-dev
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- rivet-dev/agent-os★ 4.9ksame name
- rivet-dev/agentos★ 4.9ksame name
- rivet-dev/rivetkit★ 4.9ksame name
- chmouel/lazyworktree★ 315same name
- c-kick/hnl-agent-skills★ 56same name
- flurdy/agent-skills★ 9same name
- jonhill90/skills★ 8same name
- baobab-tech/researcher-harness★ 1same name
- DrawdEA/dev-shortcuts★ 1same name
- Markssuave/Markssuave-Agent-skills★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- biz-validateSkill
- braindumpSkill
- catch-upSkill
- clone-websiteSkill
- double-checkSkill
- explain-for-grandmaSkill
- heavy-buildSkill
- heavy-reviewSkill
- heavySkill
- make-promptSkill
- monitor-claudeSkill
- orientSkill
- overnightSkill
- reelSkill
- save-sessionSkill
- shipSkill
- what-breaksSkill
- yt-tranSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Use the conversation context as the primary source for what was changed this session.
- Distinctive: line 34
If the command produces no output, it's not a git repo — use conversation context only.
- Distinctive: line 58
If no stack matches, note "unrecognized stack — universal checks only" and continue.
- Distinctive: line 76
Always apply the logic, security, and performance checks below regardless of mode (LOW scoped to changed files, HIGH full codebase).
- Distinctive: line 82
Run every category below in both modes.
- Distinctive: line 85
Every new import/require: does the target file actually exist at that path?
- Distinctive: line 129
Check for these in all code written or modified (both modes):
- Distinctive: line 178
If no tests exist: run build + type-check as the minimum.
- Distinctive: line 221
Report first, fix second: Never auto-fix without confirmation.
- Distinctive: line 222
Security failures are always Blockers: No exceptions.
- Distinctive: line 224
Completion gaps are Blockers: If the goal was "add auth to 3 routes" and only 2 were touched, that's a blocker regardless of what else …
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sanity Check Protocol
A post-implementation audit. Checks paths, imports, security, logic, bugs, and likely failure modes against the stated goal, then reports findings by severity. Report first, fix second.
Step 0 — Determine Mode
Parse the mode from the argument passed to this skill:
-lor no argument → LOW: scope is the recently changed files only. Run every check category scoped to those files. Apply logic, security, and performance checks to changed files only. Type-check only (e.g.tsc), no full test suite.-h→ HIGH: scope is the full codebase. Apply stack-specific checks. Run the full test suite. For checks that require finding all usages (e.g. a changed type's call sites), grep the whole codebase.
Both modes check for the exact same categories of bugs — security, logic, careless mistakes, paths, imports, everything. The difference is only how wide you search.
State the mode: MODE: HIGH or MODE: LOW
Phase 1 — Establish Ground Truth
Use the conversation context as the primary source for what was changed this session. Then verify with git if available:
git rev-parse --is-inside-work-tree 2>/dev/null && \
git diff --name-only HEAD && \
git status --short && \
git log --name-only --pretty="" -5 || trueIf the command produces no output, it's not a git repo — use conversation context only.
State before proceeding:
GOAL: <one sentence from conversation context>
CHANGED FILES: <list>
COMPLETION: <did the work cover the full goal? name any gaps>Any gap between goal and changed files is a Blocker.
Phase 2 — Stack Detection (HIGH only)
Skip in LOW mode.
ls go.mod pyproject.toml requirements.txt next.config.ts next.config.mjs next.config.js vite.config.ts vite.config.js 2>/dev/null
cat package.json 2>/dev/null | grep '"express"'Priority: Go > Python > Next.js > React SPA > Node/Express > Generic JS
If no stack matches, note "unrecognized stack — universal checks only" and continue.
Apply the stack-specific checks below for whichever stack you detected (and the conditional modules if their condition matches). These run in HIGH mode across the full codebase. If you maintain your own deeper stack checklists, load them here.
Next.js — server/client component boundaries ("use client" correctness), data-fetching in the right place (server vs client), next/image/next/link usage, route handler method/return types, env vars exposed via NEXT_PUBLIC_ only when intended, hydration mismatches.
Python — virtualenv/deps consistency, mutable default args, broad except: swallowing errors, missing context managers for file/DB handles, type hints vs runtime, __init__.py/import path correctness.
Go — error returns checked (not _), goroutine leaks, defer placement, nil-pointer derefs, context propagation, race conditions (go test -race).
React SPA — hook rules (deps arrays, conditional hooks), key props on lists, state-update-on-unmount, controlled vs uncontrolled inputs, effect cleanup.
Node/Express — async error handling in middleware, unhandled promise rejections, missing next(err), body/param validation, route ordering.
Conditional — UI completeness (Next.js or React SPA): loading/empty/error states present, no dead buttons, forms submit and validate, responsive breakpoints not broken.
Conditional — DB migrations (changed files include migrations/, .sql, alembic/, prisma/migrations/): up/down symmetry, no destructive change without a guard, indexes for new lookups, migration matches the model/schema.
Always apply the logic, security, and performance checks below regardless of mode (LOW scoped to changed files, HIGH full codebase).
Phase 3 — Bug Checks
Run every category below in both modes. In LOW mode, scope all checks to the changed files only. In HIGH mode, expand scope where noted.
Paths & Imports
- Every new import/require: does the target file actually exist at that path? (Glob to verify)
- Case sensitivity:
Buttonvsbutton— silent on case-insensitive filesystems, breaks on Linux - Missing required extensions (
.tsx,.js) - Barrel file imports: does
index.tsactually export that symbol?
Package Manager
ls pnpm-lock.yaml yarn.lock package-lock.json bun.lockb 2>/dev/nullThe lockfile in the repo must match all install/run commands in scripts, docs, and CI config.
Environment Variables
- New env vars in code: present in
.env.example/.env.template? - Vars used in code that exist in no
.env*file → runtimeundefined
Dependencies
- Packages imported but not in
package.json/requirements.txt/go.mod - New packages added but lockfile not updated (install never ran)
Leftover Artifacts
grep -n "console\.log\|debugger\|TODO\|FIXME\|xxx\|temp2\|test2" <changed files>Universal Bug Checks
Go through each item explicitly:
| # | Check | Scope |
| 1 | Hardcoded localhost/127.0.0.1 not behind env var | changed files |
| 2 | Missing await on async calls | changed files |
| 3 | Wrong HTTP method at call site vs route definition | changed files |
| 4 | Type/schema changed but not all call sites updated | HIGH: full codebase grep / LOW: changed files only |
| 5 | Missing try/catch at I/O boundaries (fetch, DB, file, external API) | changed files |
| 6 | Copy-paste variable name left over (param name doesn't match usage) | changed files |
| 7 | Off-by-one (arr[arr.length], < len vs <= len, fencepost) | changed files |
| 8 | New function defined but never called anywhere | HIGH: full codebase grep / LOW: changed files |
| 9 | Stub shipped as real implementation (return null, pass, // TODO: implement) | changed files |
| 10 | .gitignore gap for new secrets, build artifacts, or upload dirs | changed files |
| 11 | Merge conflict markers | grep -r "<<<<<<|>>>>>>|=======" changed files |
| 12 | Race condition on shared mutable state (concurrent writes without locks) | changed files |
Security
Check for these in all code written or modified (both modes):
- Hardcoded secrets, API keys, tokens, passwords
- Auth gaps: endpoints or operations that should require auth but don't
- Broken access control / IDOR (can user A access user B's data?)
- Injection: SQL, command, LDAP — is user input ever interpolated unsanitized?
- XSS:
dangerouslySetInnerHTML,innerHTML, unescaped output - CORS headers too permissive (
*on credentialed routes) - Sensitive data in logs, error messages, or client-visible responses
- Weak/missing input validation at system boundaries
- Crypto mistakes: MD5/SHA1 for passwords, rolling your own crypto, weak keys
Any security failure is automatically a Blocker.
Logic & Edge Cases
Check for these in all code written or modified (both modes):
- Null/undefined/empty collection not guarded before use
- Division by zero or modulo zero
- Float precision issues (
0.1 + 0.2 !== 0.3) - Array bounds and off-by-one (already in universal checks, double-check here)
- Infinite loops or missing recursion base cases
- State invariants violated (e.g. balance going negative, index out of sync)
- Date/time pitfalls (timezone assumptions, DST, epoch vs ms)
- Business logic edge cases specific to what was just written
Performance
- N+1 queries, work inside loops that belongs outside, unbounded fetches
- Missing pagination/limits, missing indexes for new lookups
- Re-renders / recomputation without memoization where it matters
- Large synchronous work blocking the event loop
Phase 4 — Tests
HIGH mode — run the test command matching the detected stack:
| Stack | Command | ||
| Go | go test ./... | ||
| Python | pytest | ||
| Next.js / React SPA / Node/Express | `npx vitest run --passWithNoTests | npx jest --passWithNoTeststhennpx tsc --noEmit` | |
| Generic JS / unrecognized | npx tsc --noEmit |
LOW mode — type-check only (JS/TS projects):
npx tsc --noEmitSkip silently if not a JS/TS project.
If no tests exist: run build + type-check as the minimum. Note absence of tests as a finding — it's not a neutral state.
Phase 5 — Report
Number issues sequentially across all tiers (1, 2, 3... not restarting per tier). Only list tiers that have issues — omit empty tiers entirely. Be specific: file path + line number on every issue.
Status: FAIL = any Blocker present. WARN = warnings or nitpicks only, no blockers. PASS = no issues.
SANITY CHECK — [HIGH/LOW] — [PASS / WARN / FAIL]
<stack> | Goal: <one sentence>
Blockers
1. <issue> [file:line]
→ <fix>
Warnings
2. <issue> [file:line]
→ <fix>
Nitpicks
3. <issue> [file:line] → <fix>
Tests: <PASS (X) / FAIL (X failed) / type-check PASS / type-check FAIL / NO TESTS>
Verdict: READY / NEEDS FIXES
Auto-fixable: <numbers or none> | Needs your call: <numbers — one-line reason each>If all clear:
SANITY CHECK — [HIGH/LOW] — PASS
<stack> | Goal: <one sentence>
Tests: <result>
Verdict: READYRules
- Report first, fix second. Never auto-fix without confirmation.
- Security failures are always Blockers. No exceptions.
- Every issue needs a location. "import path wrong" is useless. "line 12 of auth.ts imports from ../../utils/hash but file is at ../utils/hash" is useful.
- Completion gaps are Blockers. If the goal was "add auth to 3 routes" and only 2 were touched, that's a blocker regardless of what else passes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

