spec-test
Skill3 starsChanged 8 days agoMITView on GitHub
Create and run tests for a spec task implementation.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Atiqul-Islam/graphcrewtheir own version, first seen Oct 13, 2026
- HHU3637kr/skillstheir own version, first seen Sep 22, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- HHU3637kr/skills★ 146same name
- Atiqul-Islam/graphcrew★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-delegateSkill
- cmux-delegateSkill
- cmux-forkSkill
- cmux-second-opinionSkill
- handoverSkill
- harness-initSkill
- harness-loopSkill
- harness-planSkill
- ja-humanizerSkill
- magiSkill
- mcp-convertSkill
- skill-suggestSkill
- spec-codeSkill
- spec-evaluateSkill
- spec-generatorSkill
- spec-implementSkill
- spec-inspectSkill
- spec-orchestrateSkill
- spec-reviewSkill
- spec-rules-initSkill
- spec-to-issueSkill
- spec-workflow-initSkill
- spec-writingSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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
- Distinctive: line 17
Create tests based on task completion criteria, run them, and output structured results.
- Very specific: line 58
Find test files: look for *.test.*, *.spec.*, __tests__/, test/, tests/ directories
- Distinctive: line 63
If no existing tests found, use framework defaults appropriate to the language.
- Distinctive: line 75
Write test files following detected patterns:
- Distinctive: line 76
Place in the conventional test location
- Distinctive: line 77
Import test helpers/fixtures if they exist
- Distinctive: line 78
Follow naming conventions of existing tests
- Distinctive: line 89
If a specific test file can be targeted, run only the new tests first, then the full suite.
- Distinctive: line 124
All tests pass → PASS
- Distinctive: line 129
Commit test files following project conventions:
≈ “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.
Files
spec-test — Create and Run Tests for a Spec Task
Create tests based on task completion criteria, run them, and output structured results.
Language Rules
- Auto-detect input language → output in the same language
- Japanese input → Japanese output, use
references/test-guide.ja.md - English input → English output, use
references/test-guide.md - Explicit override takes priority
Options
| Option | Description |
--task {task-id} | Task ID to test (reads completion criteria from tasks.md) |
--spec {path} | Path to .specs/ directory |
--files {paths} | Target files to test (auto-detect from task if omitted) |
--output {path} | Output path for test result (default: .specs/{feature}/test-{task-id}.md) |
Execution Flow
Step 0: Context Loading (Phase A / Phase B)
Same as spec-code §Step 0, but identify your role as tester.
Phase B applies when re-testing after a fix: focus on the specific test failures and changed code.
Step 1: Extract Test Requirements
From tasks.md, find the task matching --task {task-id} and extract:
- Completion criteria (checkboxes)
- Target files (implementation files to test)
- Requirements ID (for traceability)
From design.md (if available):
- Expected interfaces and behaviors
- Edge cases mentioned in design
Step 2: Detect Test Patterns
Scan the project for existing test conventions:
- Find test files: look for
*.test.*,*.spec.*,__tests__/,test/,tests/directories - Detect framework: Jest, Vitest, Mocha, pytest, Go test, Rust test, etc.
- Detect patterns: AAA (Arrange-Act-Assert), describe/it blocks, test helpers, fixtures
- Detect test commands: from
package.jsonscripts,Makefile,CLAUDE.md, etc.
If no existing tests found, use framework defaults appropriate to the language.
Step 3: Design Test Cases
Based on completion criteria and design:
- Happy path tests: Each completion criterion → at least one test
- Edge cases: Empty inputs, boundary values, error conditions
- Negative tests: Invalid inputs, unauthorized access, missing data
Step 4: Create Tests
Write test files following detected patterns:
- Place in the conventional test location
- Import test helpers/fixtures if they exist
- Follow naming conventions of existing tests
- Apply AAA pattern (Arrange-Act-Assert)
Step 5: Run Tests
Execute the detected test command:
# Auto-detect and run
npm test / npx jest / npx vitest / pytest / go test / cargo testIf a specific test file can be targeted, run only the new tests first, then the full suite.
Step 6: Collect Results and Write Output
Output to --output path (default: .specs/{feature}/test-{task-id}.md):
# Test: {task-id}
type: test
## Meta
- Tester: spec-test
- Date: {ISO 8601}
- Command: {test command used}
- Framework: {detected framework}
## Results
- Tests: {passed}/{total} passed
- Coverage: {percentage}% (if available)
- Duration: {time}
## Test Cases
- [x] {test name} — {what it verifies}
- [x] {test name} — {what it verifies}
- [ ] {test name} — FAILED: {error message}
## Completion Criteria Coverage
| Criterion | Test | Status |
|---|---|---|
| {criterion from tasks.md} | {test name} | PASS / FAIL |
## Gate: PASS / FAILGate logic:
- All tests pass → PASS
- Any test fails → FAIL
Step 7: Commit Tests
Commit test files following project conventions:
- Default format:
test(scope): {task-id} — {brief description} - Stage only test files
Error Handling
| Situation | Response |
--task ID not found in tasks.md | Error: task ID not found |
| No test framework detected | Warning: suggest installing one, create basic tests |
| Test command fails to run | Error: report command and error output |
| Some tests fail | Write results with FAIL gate, do not fix (spec-code handles fixes) |
| Coverage tool not available | Warning: skip coverage, note in results |
Usage Examples
# Test a specific task
/spec-test --task T-007 --spec .specs/did-deactivation/
# Test with explicit file targets
/spec-test --task T-003 --spec .specs/auth-feature/ --files src/auth/service.ts
# Standalone (no spec context)
/spec-test --task T-001 --files src/utils/parser.tsDoes 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
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.

