This skill should be used when an agent is about to return implementation results, claim a task is done, or hand off completed work. It enforces self-validation — comparing output against plan acceptance criteria, running validation commands, and iterating internally until quality standards pass. Triggers on "validate before finishing", "check your work before reporting back", "run tests before completing", or when an implementer agent reaches the end of a plan phase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-quality-guardrails:self-review-before-doneThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **No runtime dependencies** — this is a pure instruction/skill package (Markdown + YAML frontmatter)
Validate output before claiming completion.
AI agents tend to declare work "done" after writing code without verifying it actually works or meets requirements. This shifts the burden to reviewers and users, who then find obvious issues that should have been caught earlier.
Before returning results to the main session or user:
Before running validation, inspect the project to identify the correct commands:
package.json scripts for lint, typecheck, test commandspyproject.toml, Makefile, or tox.ini for lint, type-check, testBefore returning:
├─ Validation commands pass?
│ ├─ YES → continue
│ └─ NO → fix, re-run, repeat (max 3 attempts)
│
├─ All plan ACs addressed?
│ ├─ YES → continue
│ └─ PARTIALLY → list unaddressed with rationale
│
├─ Tests pass?
│ ├─ YES → continue
│ └─ NO → fix tests or implementation
│
└─ Output contract complete?
├─ YES → return to main session
└─ NO → fill missing fields
When returning implementation results, always include:
If the project has no configured lint, typecheck, or test commands:
ai-code-scrutiny checklistBefore returning, re-read the output as if acting as the reviewer, not the implementer:
This "mental model switch" catches issues that same-perspective self-review misses.
If after 3 internal fix attempts validation still fails:
plan-with-ac — upstream: defines the ACs this skill validates against (section 11)ai-code-scrutiny — fallback checklist when no validation commands existtdd-enforcement — TDD evidence is part of the output contract (item 5)parallel-review — downstream: external multi-perspective review after self-review completesreview-loop — downstream: external review applied after self-review. The self-review limit (3 attempts) is separate from review-loop's external limit (3 iterations) — tune both if adjusting retry behavior.npx claudepluginhub mariogusmao/mg-plugins --plugin ai-quality-guardrailsValidates AI agent claims against evidence trail in coding workflows. Catches unsubstantiated 'done', 'tests pass', 'fixed' without proof like outputs, diffs, or logs. Auto-triggers on completion keywords.
Enforces running verification commands before claiming work is complete. Useful for preventing false success claims and ensuring evidence-based completion.
Runs multi-agent verification loop post-implementation, dispatching specialized agents for review with autonomous subagent fixes and retries until unanimous approval.