packages/knowledge-hub/dataset/.skills/capability/assess-code-quality/SKILL.md
Assesses code quality using resolution cascade (Argument > Adoption > Assessment). Applies quality score formula from code-metrics guidelines. Produces quality report with complexity, size, coverage, and maintainability metrics. Idempotent: detects existing report, checks staleness. Invocable independently or composed by /review.
npx skillsauth add foomakers/pair assess-code-qualityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Evaluate code quality using objective metrics from code-metrics.md. Produces a quality report with complexity, size, coverage, duplication, and maintainability scores. Includes actionable recommendations for improvement.
| Argument | Required | Description |
| -------- | -------- | ------------------------------------------------------------------------------------------------- |
| $scope | No | Limit assessment to specific metric group: complexity, size, coverage, duplication, maintainability, all (default: all) |
| $path | No | Limit assessment to a specific file, directory, or package. If omitted, assesses the full codebase. |
Check: Is there an existing quality report for this codebase? (Check conversation context, CI artifacts, or previous assessment output.)
Skip: If no existing report, go to Path B.
Act: Check staleness:
git diff --stat since last assessment date or commit.)Existing quality report found ([date]). [N files changed since last assessment.] Re-assess? (Recommended — codebase has changed.)
Verify: If confirmed valid → exit. If stale or re-assessment requested → proceed to Path B.
For each metric group in scope, follow check → skip → act → verify.
vitest --coverage, jest --coverage).CODE QUALITY REPORT:
├── Scope: [$scope — $path or full codebase]
├── Complexity: [avg cyclomatic: N | N functions > 10 | max nesting: N]
├── Size: [N files | avg lines: N | N files > 300 lines | N functions > 50 lines]
├── Test Coverage: [line: N% | function: N% | branch: N% | SKIPPED]
├── Duplication: [ratio: N% — Low/Moderate/High]
├── Maintainability: [score: N/100 — Excellent/Good/Fair/Poor]
└── Hotspots: [N files flagged]
HOTSPOTS:
1. [file] — [metric: value, metric: value] — [recommendation]
2. ...
RECOMMENDATIONS:
1. [priority] [metric] — [current] → [target]: [action]
2. ...
RESULT: [Quality score: N/100 | Assessed | Confirmed existing]
When composed by /review:
/assess-code-quality during the technical review phase.When invoked independently:
development
Creates or updates a Product Requirements Document through structured template analysis, hypothesis-driven information gathering, and iterative review. Idempotent — detects existing PRD and offers selective section update.
development
Reviews a pull request through a structured 6-phase process: validation, technical review, adoption compliance, completeness check, decision, and optional merge with parent cascade. Composes /verify-quality, /verify-done, /record-decision, /assess-debt (required) and /verify-adoption, /assess-stack (optional with graceful degradation). Output follows the code review template. Idempotent — re-invocation resumes from incomplete phases.
tools
Refines a user story from Todo to Refined state through structured phases: selection, requirements analysis (Given-When-Then), technical analysis, sprint readiness, and documentation. Section-level idempotency — detects partial refinement and resumes. Composes /write-issue for PM tool updates.
testing
Breaks a refined user story into implementation tasks. Task-level idempotency: detects existing tasks and creates only missing ones. Appends condensed Technical Analysis + Task Breakdown (checklist, Dependency Graph, AC Coverage table, detailed tasks) to the story body. Composes /write-issue to update the story issue body. Tasks are documented inline in the story — no separate task issues are created.