agentleFS
manastalukdarmanastalukdar/ai-devstudio/skills/completion-verify/SKILL.md

completion-verify

Skill1 starsChanged 7 months agoMITView on GitHub

Verify a session's own work (build, types, lint, tests, diff scope, quick security check) before claiming a task is done. Use when about to say "done", before opening a PR, or after a feature/refactor is finished.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the quality gates a task must clear before you tell the user it is done.

    line 10
  2. Distinctive:

    Stop and fix before continuing if the build fails.

    line 36
  3. Distinctive:

    Only claim the task is done when every gate that applies to the project passes.

    line 81
  4. Distinctive:

    Early exit: If git diff --stat is empty, reports "nothing to verify" and exits immediately.

    line 105
  5. Very specific:

    Read-only: runs build/lint/test commands and greps the diff, but makes no file changes itself.

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Completion Verify

Run the quality gates a task must clear before you tell the user it is done.

Usage

/completion-verify              # verify current uncommitted work
/completion-verify --staged      # verify staged changes only

Behavior

Phase 1: Diff scope

git diff --stat
git diff --name-only

Confirm the changed files match what the task actually required. Flag anything unrelated.

Phase 2: Build

npm run build 2>&1 | tail -20 || pnpm build 2>&1 | tail -20

Stop and fix before continuing if the build fails.

Phase 3: Type check

npx --no-install tsc --noEmit 2>&1 | head -30
# or: pyright . 2>&1 | head -30

Phase 4: Lint

npm run lint 2>&1 | head -30
# or: ruff check . 2>&1 | head -30

Phase 5: Tests

npm test 2>&1 | tail -50
# or: pytest -q 2>&1 | tail -50

Report pass/fail counts. Never disable or skip a failing test to make this pass.

Phase 6: Quick security check

git diff | grep -E "sk-|api[_-]?key|password\s*=|BEGIN.*PRIVATE KEY" | head -10

Phase 7: Verdict

COMPLETION CHECK
Scope:    N files, all within task
Build:    PASS/FAIL
Types:    PASS/FAIL (N errors)
Lint:     PASS/FAIL (N warnings)
Tests:    PASS/FAIL (X/Y passed)
Security: PASS/FAIL (N findings)

Verdict: READY / NOT READY

Only claim the task is done when every gate that applies to the project passes.

Examples

Clean finish:

/completion-verify
→ 3 files changed, build PASS, types PASS, tests 42/42, no findings
  Verdict: READY

Caught issue:

/completion-verify
→ tests 40/42 (2 failed in UserService.test.ts)
  Verdict: NOT READY — fix failing tests before claiming done

Token Optimization

Expected range: 500–1,500 tokens (initial), 100–300 tokens (cache hit)

Caching: Caches detected build/test/lint commands in .claude/cache/completion-verify/config.json for 7 days, invalidated when package.json (or equivalent manifest) changes.

Early exit: If git diff --stat is empty, reports "nothing to verify" and exits immediately.

Patterns used: Git diff scope default, caching, grep-before-read for the security check, early exit.

Edge Cases

  • No test suite: Report tests as N/A, note the gap, still verify build/types/lint.
  • No build step (e.g. interpreted scripts): Skip Phase 2, note it as N/A.
  • Monorepo: Scope build/test/lint to the packages touched by the diff, not the whole repo.
  • Nothing staged or changed: Exit early with "nothing to verify".

Safety

Read-only: runs build/lint/test commands and greps the diff, but makes no file changes itself. If any command mutates files (e.g. an autofix lint script), do not run it here — surface the failure and let the user choose to fix it.

See Also

  • /loop-verify — an independent checker that gates loop-produced changes with an APPROVE/REJECT/ESCALATE_HUMAN verdict; use that when a separate agent must validate another agent's automated change. /completion-verify is for verifying your own session's work before claiming completion.
  • /test — full context-aware test runner with failure analysis and auto-fix; /completion-verify calls tests as one gate among several, not a replacement for it.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.