Ghost check
Agents lie by accident. They invent APIs, cite files they never wrote, and report green tests they never ran. This skill makes every claim earn a receipt.
Works on any Agent Skills client (Claude Code, Cursor, Codex, Copilot, Gemini CLI, Windsurf, OpenCode, Grok, and anything else that loads SKILL.md). Language-agnostic. Stack-agnostic.
When to use
- Before claiming done, fixed, tests pass, or ready to merge
- After any non-trivial generation, refactor, or "quick fix"
- User says: ghost check, prove it, verify claims, no ghosts, receipts, audit this, did you actually
- Reviewing a diff that an agent (including you) just wrote
- A command "should work" but the user says it doesn't
Rules
- Never invent a green status. If you did not run it in this turn, you do not know.
- Never claim a file exists without
Read/ls/ equivalent against the real path. - Never claim a package exists without a registry lookup (
npm view,pip index versions,cargo search, …) or a lockfile and install proof. - A compile is not a test. A mock is not a unit under test.
- The conversation transcript is not evidence. Commands and file reads are.
- If you cannot verify (offline, no registry, sandbox), mark UNVERIFIED — not PASS.
- Status is PASS only when every extracted claim is proven and the original user ask is covered.
Procedure
Do these in order. Stop and report if a step is blocked; do not skip ahead to a fake PASS.
1. Extract claims
From the last assistant turn(s), list every claim of the form:
- file created / edited / deleted (path)
- package added / upgraded (name + version if given)
- API / method / symbol used
- command run (test, lint, build, migrate)
- bug fixed or feature shipped
- "all N tests pass" / "build succeeded" / "deployed"
If the user pointed at a diff, extract from the diff plus the claims.
2. Scan the repo
If Node is available, run the bundled scanner from the skill folder (or a copy in the workspace):
node skills/ghost-check/scripts/ghost-scan.mjs .JSON:
node skills/ghost-check/scripts/ghost-scan.mjs . --jsonTreat every GHOST as blocking. Read references/failure-modes.md when a kind is unclear.
3. Prove files
For every path claimed: list or read it. Missing path → GHOST (file).
4. Prove packages
For every new dependency: registry lookup or lockfile + node_modules / virtualenv / target. 404 / not found → GHOST (package).
Do not trust the name because it "sounds like" a popular library (lodash.isequaldeep, fs.promises.rmrf, react-use-hooks).
5. Prove APIs
For every third-party symbol you introduced, grep the installed package (or official docs for that exact version). No match → GHOST (api).
6. Prove commands
If this turn has no command output, re-run the exact command. Paste the relevant tail in the report. No output → UNVERIFIED (command).
Empty tests, expect(true), assert True, and tests that only mock the unit under test → GHOST (test).
7. Prove the original ask
Diff the result against what the user asked. Adjacent rewrite, extra scope, or a different product → GHOST (scope).
8. Report
Use references/report-template.md. Do not omit ghosts to look clean.
After ghosts
Fix them. Re-run this skill. Do not move on.
If the user asked only for a report, stop after the report.
Do not
- Mark PASS because the code "looks right"
- Cite a previous session's test run
- Print secret values while checking
.env/ keys - Skip the scanner because you are "sure"