skills/test/SKILL.md
Run unit and integration tests with coverage checking. Auto-detect framework, classify failures, enforce coverage threshold before advancing to review. Use when the user wants to run tests, check coverage, or validate implementation quality. Triggers on "run tests", "check coverage", "test suite", or when the code phase completes.
npx skillsauth add tunneleven/C4Flow c4flow:testInstall 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.
Phase: 4: Testing Agent type: Sub-agent (dispatched by orchestrator) Status: Implemented
Run the full test suite after implementation is complete. Detect the test framework, execute tests, classify failures (code bugs vs environment issues), and check coverage against threshold. Does NOT write test files.
Based on: run-tests skill with coverage checking added for c4flow workflow.
.state.jsondocs/specs/<feature>/tech-stack.md — framework & testing stack infodocs/specs/<feature>/spec.md — expected behaviors (Given/When/Then scenarios)tech-stack.md or default 80%)TEST → REVIEW: Tests pass, coverage >= threshold
| Capability | Source | Details | |---|---|---| | Framework detection | run-tests | 16 frameworks: Jest, Vitest, Mocha, Ava, pytest, Go, Cargo, .NET, Mix, Gradle, Maven, PHPUnit, RSpec, Minitest, Dart, Swift, Make | | JS runner differentiation | run-tests | Detects Jest vs Vitest vs Mocha vs Ava from config + devDependencies | | Monorepo awareness | run-tests | nx, turbo, lerna, pnpm-workspace detection | | Failure classification | run-tests | Tier 1 (code bugs: deep analysis) / Tier 2 (env issues: quick fix) | | Deep analysis | run-tests | Up to 5 unique-file slots, ±10 lines context, HIGH/MEDIUM/LOW confidence | | Coverage checking | NEW | Parse coverage output, check against threshold |
Located in skills/test/scripts/:
| Script | Used by sub-agent? | Purpose |
|--------|:------------------:|---------|
| detect-framework.sh | ✅ Yes | Auto-detect test framework from project files (16 frameworks) |
| classify-failure.sh | ✅ Yes | Classify test output as Tier 1 (code) or Tier 2 (env) |
| format-output.sh | ✅ Yes | Format results in concise/detailed/JSON mode |
| parse-args.sh | ❌ No | Inherited from run-tests for standalone usage. Sub-agent receives params from orchestrator, not CLI args |
Follow prompt.md step by step.
| Test Output | Used By | |---|---| | Pass/fail status | Gate condition for REVIEW phase | | Coverage % | Gate condition for REVIEW phase | | Uncovered file list | REVIEW phase uses as context for code review | | Failure analysis | If BLOCKED, orchestrator presents to user for guidance |
development
Quality gate aggregation — runs bd preflight, combines with Codex review results, declares Ready for PR status. Use when the user wants to check if code is ready for PR, verify quality gates, or run preflight checks. Also triggers when mentioning "verify", "preflight", "quality gate", or "ready for PR".
development
Test-driven development — RED-GREEN-REFACTOR cycles for all C4Flow implementation work. Merged into c4flow:code as a sub-agent phase with a mandatory RED gate pause. Use c4flow:code to run the full task loop.
testing
Sync local project with remote sources — pulls DoltHub beads and GitHub repo to local. Handles the "no common ancestor" Dolt error that occurs when bd init creates a fresh local DB that conflicts with an existing DoltHub history. Use when local beads are out of sync, after a fresh init on a project that already has DoltHub data, or to pull the latest GitHub changes.
content-media
Generate structured spec artifacts (proposal, tech-stack, spec, design) through interactive collaboration, using research.md as structured input.