Best for
- After spec review passes (Gate 1) and constitution compliance passes (Gate 2), as Gate 3 in the quality pipeline.
xoai/sage/core/capabilities/review/quality-review/SKILL.md
Use as the code-quality gate after spec-compliance and constitution checks pass, or when the user says "review my code", "quality check", "security review", or "is this code good". Runs as an independent sub-agent when the Task tool is available.
Decision brief
Evaluate code craftsmanship — is it clean, secure, maintainable, and performant?
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/xoai/sage --skill "core/capabilities/review/quality-review"Inspect the Agent Skill "quality-review" from https://github.com/xoai/sage/blob/6ddd558bc41c0f1024ed79948370f9c15abd8c43/core/capabilities/review/quality-review/SKILL.md at commit 6ddd558bc41c0f1024ed79948370f9c15abd8c43. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Gate 3 REQUIRES sub-agent delegation when Task tool is available. Self-review is the fallback when Task tool is NOT available, not a choice the agent makes.
Active by DEFAULT (an absent reviewloop: block means mode: v2) (loop: orchestration/quality-locked; ledger: sage/runtime/tools/ review.py). When active, the sub-agent prompt's CLASSIFY + FORMAT block above is replaced by the contract below and the 5 dimensions by the perspective…
Phase A: verify ledger entries (FIXED | NOT-FIXED | DISPUTED-STANDS, evidence required; test witnesses run at current HEAD). Scope follows reviewloop.phaseascope: all (default) verifies every open and not-fixed entry; fixed verifies only entries a fix commit claimed via Sage-Fix…
After spec review passes (Gate 1) and constitution compliance passes (Gate 2), as Gate 3 in the quality pipeline.
Gate 3 REQUIRES sub-agent delegation when Task tool is available. Self-review is the fallback when Task tool is NOT available, not a choice the agent makes.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 97/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 26 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Evaluate code craftsmanship — is it clean, secure, maintainable, and performant?
Core Principle: Spec compliance (Gate 1) verifies you built the right thing. Quality review (Gate 3) verifies you built it well. Both are required.
After spec review passes (Gate 1) and constitution compliance passes (Gate 2), as Gate 3 in the quality pipeline.
Gate 3 REQUIRES sub-agent delegation when Task tool is available. Self-review is the fallback when Task tool is NOT available, not a choice the agent makes.
Step 1: Check Task tool availability.
Step 2 — Task tool available AND independent_gate3 ≠ false:
Announce: "⚡ Running code quality review (sub-agent)..."
Spawn a sub-agent with the following prompt:
You are a code reviewer. You were NOT involved in writing this code.
Review it for quality, security, and maintainability. Be specific.
CRITICAL: You are READ-ONLY. Do NOT modify any files. Do NOT use
Edit or Write tools. Your job is to REPORT findings, not fix them.
INPUTS:
- Changed files: {FILE_LIST}
- Project conventions: {CONVENTIONS_FILE or "none detected"}
- Stack: {DETECTED_STACK or "unknown"}
REVIEW THESE 5 DIMENSIONS:
1. READABILITY: Are names descriptive? Is flow obvious? Are complex
sections commented with WHY? Is there unnecessary complexity?
2. ERROR HANDLING: Are errors handled, not swallowed? Do error
messages help diagnose? Are failure paths tested? Are external
calls protected?
3. SECURITY: Are inputs validated? Is auth checked? Are secrets
hardcoded? Is user data logged? Are queries parameterized?
Security issues are ALWAYS critical.
4. PERFORMANCE: Are there N+1 patterns? Unnecessary allocations?
Large datasets loaded into memory? Only flag OBVIOUS issues —
no speculative optimization.
5. CONVENTIONS: Does the code match existing project patterns?
Naming, file structure, style? Is it internally consistent?
CLASSIFY each finding:
- CRITICAL: Security vulnerability or will break in production.
Must fix. Security issues are ALWAYS critical.
- WARNING: Quality issue. Should fix before shipping.
- SUGGESTION-substantive: Optional improvement. Affects readability,
maintainability, or future behavior. Can defer.
- SUGGESTION-cosmetic: Style/naming/formatting with equally valid
alternatives. No behavior change.
FORMAT (strict):
GATE: code-quality
RESULT: PASS | FAIL
CRITICAL: [list with file:line or "None"]
WARNING: [list with file:line or "None"]
SUGGESTION-substantive: [list with file:line or "None"]
SUGGESTION-cosmetic: [list with file:line or "None"]
Be concise. Every finding names a specific file and line.
No generic praise. No vague observations. Just findings.
Security issues found = ALWAYS FAIL.
Present the sub-agent's findings as the Gate 3 result. Do NOT filter, downgrade, or dismiss findings.
Step 3 — Task tool NOT available OR independent_gate3 is false:
Self-review fallback. This is a degraded Gate 3 — make it loud (R29):
Sage: independent Gate 3 skipped — Task tool unavailable on this platform. Self-review only; quality chain is degraded. For independent review, run /review.decisions.md:
[<date>] independent Gate 3 skipped (Task tool unavailable) — code quality self-reviewed only.Do NOT self-review when Task tool IS available and config allows sub-agent. That defeats the purpose of independent review.
Proceed with self-review using the 5 dimensions below.
GATE: code-quality
RESULT: PASS | FAIL
FINDINGS:
Readability: [PASS | issues found]
Error Handling: [PASS | issues found]
Security: [PASS | issues found — security issues are always FAIL]
Performance: [PASS | issues found]
Conventions: [PASS | issues found]
SEVERITY:
Critical: [list — these cause FAIL]
Warning: [list — these are noted but don't block]
Suggestion: [list — optional improvements]
ACTION: none | fix-and-retry | escalate-to-human
Derived from the RED baseline in TESTS.md. When the Task tool is available, the
sub-agent is REQUIRED — the marker ⚡ Running code quality review (sub-agent)...
MUST appear; self-review is the fallback, not a choice.
| The excuse (observed) | Why it's wrong | The rule |
|---|---|---|
| "I can review my own code." | Self-review shares the author's blind spots; Gate 3 exists for an independent pass. | The sub-agent is required when the Task tool is available — self-review is the fallback. |
| "It's a small diff, a sub-agent is overkill." | Security and convention breaks hide in small diffs as readily as large ones. | Size is not the condition; Task-tool availability is. |
| "Gate 1 already passed." | Gate 1 verifies the right thing was built; Gate 3 verifies it was built well. | Both are required; spec compliance is not quality. |
| "Self-review is faster." | Speed bought by dropping independence is exactly the cost Gate 3 exists to prevent. | Self-review only when the Task tool is unavailable or config disables it. |
Active by DEFAULT (an absent review_loop: block means mode: v2)
(loop: orchestration/quality-locked; ledger: sage/runtime/tools/ review.py). When active, the sub-agent prompt's CLASSIFY + FORMAT
block above is replaced by the contract below and the 5 dimensions by
the perspective passes. With mode: v1 this section is inert.
Include verbatim in the sub-agent prompt:
You do not decide the loop; you report findings. The decision is computed from them.
A critical or major must carry a witness — a failing test you wrote and ran, a concrete repro (input → observed → expected), or an execution trace — or a citation that resolves: a spec clause, constitution rule, or requirement that actually exists. Citations are checked mechanically against the cycle's spec/plan and the constitution; one that resolves nowhere counts as no citation. A finding with neither witness nor resolving citation is recorded as substantive. This is not a penalty; it is the definition of the severities.
An empty finding list is a valid, creditable outcome; you are scored on precision, not volume. Spend your effort on witnesses and resolvable citations, not on quantity.
Findings are ONE fenced ```json block — an array of objects (prose outside it is not parsed):
[{
"pass": "input-hostility | state-and-flow | security | regression-surface",
"severity": "critical | major | substantive | cosmetic",
"cited_rule": "spec §4.2 | constitution:api.3 | null",
"anchor": {"file": "src/auth.ts", "region": [118, 141]},
"claim": "one falsifiable sentence",
"witness": {"kind": "test | repro | trace | none",
"ref": "path or null", "status": "red | green | n/a"},
"exit_criteria": "what specifically would make this finding pass"
}]
Where the platform grants sub-agent test execution (Tier-A attested),
the reviewer RUNS its witness before reporting status: red.
Sequential checklist passes in one dispatch; tag each finding's pass:
Phase A: verify ledger entries (FIXED | NOT-FIXED | DISPUTED-STANDS,
evidence required; test witnesses run at current HEAD). Scope follows
review_loop.phase_a_scope: all (default) verifies every open and
not-fixed entry; fixed verifies only entries a fix commit claimed via
Sage-Fix trailers since the last round, plus one full pass on the
stopping round — the default stays all pending measurement (E17
guards ledger amnesia). A DISPUTED-STANDS verdict — or a fixer's
--cannot-reproduce — does not clear an entry: it becomes a Phase-A
dispute that must receive a disposition (defer / reject / fix-now)
before any STOP records; it never vanishes from the verdict. Phase B:
hunt the revision delta plus Phase-A anchors only — the whole-artifact
pass happened at round 1.
Assembled by the dispatching workflow, in order: (1) changed files (delta on rounds >1); (2) deterministic gate outputs verbatim; (3) test output + per-file coverage for touched files; (4) sage-ontology blast radius for changed symbols — when absent, the packet says so (loud degradation); (5) spec/plan excerpts the diff claims to implement; (6) the ledger (open + settled); (7) mutation-survivor report if present.
Frequently asked questions
Evaluate code craftsmanship — is it clean, secure, maintainable, and performant?
The source record exposes this install command: npx skills add https://github.com/xoai/sage --skill "core/capabilities/review/quality-review". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
garrytan/gbrain
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing