spec
Skill35 starsChanged 53 days agoApache-2.0View on GitHub
Specification-first development (BDD/TDD). Use when implementing new features, creating new components, or when requirements need clarification through tests.
168 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- varelaia/claude-skills-publictheir own version, first seen Nov 8, 2026
- mrlemoos/galiciatheir own version, first seen Nov 8, 2026
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- standardagents/skillstheir own version, first seen Nov 8, 2026
- Surething-io/cockpittheir own version, first seen Nov 8, 2026
Used with
Projects with it also use backprop, ios-clean and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JuliusBrusseeSkillbackprop
Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.
Also in 4 projects that use this
Saqlain-811Skillios-clean
Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)
Also in 5 projects that use this
Saqlain-811Skillios-fix
Autonomous iOS bug fixer. (gstack)
Also in 5 projects that use this
bastosSkillios-design-review
Review iOS app UI/UX design quality using Apple's design principles and the Liquid Glass-era design language from WWDC25/26. Use when asked for a design review, UX critique, visual design assessment, or evaluation of an app's interface quality, design intent, alignment with the new Apple design system, or usability. Triggers: "design review", "UX review", "visual design critique", "review the UI", "does this design work", "evaluate this interface", "design feedback", "Liquid Glass review".
Also in 5 projects that use this
ShreyRaviSkillplan-tune
Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). Review which AskUserQuestion prompts fire across gstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and enable/disable question tuning. Conversational interface — no CLI syntax required.
Also in 7 projects that use this
timurgaleevSkilldocument-generate
Generate missing docs for a feature, module or project as tutorials, how-tos, reference and explanation.
Also in 6 projects that use this
- +2 more from Saqlain-811
Other versions168 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 168
- garrytan/gstack★ 141ksame name
- getsentry/sentry-react-native★ 1.8ksame name
- JuliusBrussee/cavekit★ 1.1ksame name
- kdlbs/kandev★ 1.1ksame name
- getsentry/sentry-dart★ 878same name
- poshan0126/dotclaude★ 871same name
- codewithmukesh/dotnet-claude-kit★ 808same name
- SparkDevNetwork/Rock★ 701same name
- hyperlink-academy/leaflet★ 527same name
- strands-agents/box★ 503same name
158 more not listed
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 repository23 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 145 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
Write test METHOD NAMES ONLY (no implementation yet):
- Distinctive: line 115
Write the MINIMUM code to make tests pass.
- Distinctive: line 164
Add Value Object behaviors
“Common” is measured: kept by at least 6 in 10 of the 145 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/craftsman:spec - Specification-First Development
Outcome Contract
- Outcome: executable specifications that fail for the right reason before any implementation exists.
- Done when: each acceptance criterion maps to a test, every test fails first with a meaningful message, and the scope excluded is stated.
- Evidence: the failing test output before implementation.
You are a Senior Engineer practicing TDD/BDD. You write SPECS before CODE.
Philosophy
"If you can't write the test, you don't understand the requirement."
The Iron Law
┌─────────────────────────────────────────────────────────────────┐
│ │
│ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST │
│ │
│ Wrote code before test? Delete it. Start over with TDD. │
│ │
└─────────────────────────────────────────────────────────────────┘Process (STRICT ORDER)
Phase 1: Behavior Discovery
Answer these questions:
## Behavior Specification
### SHOULD (Happy paths)
- [ ] Accept valid email formats
- [ ] Create user with correct initial state
- [ ] Emit UserCreated event
### SHOULD NOT (Explicit non-behaviors)
- [ ] Validate if email actually exists (external concern)
- [ ] Modify the email string after creation
### EDGE CASES
- [ ] Empty string → Exception
- [ ] Very long email (>254 chars) → Exception
- [ ] Unicode characters → Handled correctly
- [ ] Multiple @ symbols → Exception
### ERROR SCENARIOS
- [ ] Invalid format → InvalidEmailException
- [ ] Null input → TypeErrorPhase 2: Test Specification
Write test METHOD NAMES ONLY (no implementation yet):
final class EmailTest extends TestCase
{
// Happy paths
public function test_creates_email_from_valid_string(): void
public function test_two_emails_with_same_value_are_equal(): void
public function test_preserves_original_case_in_value(): void
// Edge cases
public function test_rejects_empty_string(): void
public function test_rejects_string_without_at_symbol(): void
public function test_rejects_email_longer_than_254_characters(): void
// Behavior
public function test_comparison_is_case_insensitive(): void
}Ask user: "Does this test list cover the expected behavior?"
Phase 3: RED - Write Failing Tests
Implement test bodies. They MUST fail (class doesn't exist yet).
public function test_creates_email_from_valid_string(): void
{
$email = Email::fromString('test@example.com');
self::assertSame('test@example.com', $email->toString());
}
public function test_rejects_empty_string(): void
{
$this->expectException(InvalidEmailException::class);
Email::fromString('');
}Run tests - Confirm RED:
vendor/bin/phpunit --filter=EmailTest
# Expected: FAILURES (class Email does not exist)Phase 4: GREEN - Minimal Implementation
Write the MINIMUM code to make tests pass. No more, no less.
<?php
declare(strict_types=1);
namespace App\Domain\ValueObject;
final class Email
{
private function __construct(
private readonly string $value,
) {
}
public static function fromString(string $value): self
{
if ($value === '') {
throw InvalidEmailException::empty();
}
if (!str_contains($value, '@')) {
throw InvalidEmailException::missingAtSymbol($value);
}
return new self($value);
}
public function toString(): string
{
return $this->value;
}
}Run tests - Confirm GREEN:
vendor/bin/phpunit --filter=EmailTest
# Expected: OK (X tests, Y assertions)Phase 5: REFACTOR
Improve code while keeping tests GREEN:
- Extract private methods
- Improve naming
- Remove duplication
- Add Value Object behaviors
After each change, run tests to confirm still GREEN.
Test Quality Rules
| Rule | Why |
| Test BEHAVIOR, not implementation | Tests survive refactoring |
| One concept per test | Clear failure messages |
| Test names are documentation | test_rejects_email_without_domain |
| No mocking the unit under test | You'd test the mock |
| Use DataProviders for variants | DRY, comprehensive |
DataProvider Pattern
#[DataProvider('invalidEmailProvider')]
public function test_rejects_invalid_emails(string $invalidEmail): void
{
$this->expectException(InvalidEmailException::class);
Email::fromString($invalidEmail);
}
public static function invalidEmailProvider(): iterable
{
yield 'empty string' => [''];
yield 'no @ symbol' => ['testexample.com'];
yield 'no domain' => ['test@'];
yield 'spaces' => ['test @example.com'];
yield 'multiple @' => ['test@@example.com'];
}Output Structure
# Always create test FIRST
tests/Unit/Domain/ValueObject/EmailTest.php ← FIRST
# Then implementation
src/Domain/ValueObject/Email.php ← SECONDRed Flags - STOP and Start Over
| Red Flag | Action |
| Code before test | Delete code, write test first |
| Test passes immediately | You wrote implementation first |
| Can't explain why test failed | You don't understand the requirement |
| "I already manually tested it" | Manual ≠ Automated. Write the test. |
Output Format
## Specification: [Component]
### Behaviors to Test
1. [Behavior 1] - MUST TEST (critical)
2. [Behavior 2] - MUST TEST (core functionality)
3. [Behavior 3] - SKIP (framework handles this)
### Test File
`tests/Unit/Domain/ValueObject/EmailTest.php`
### Tests (8 total)
- test_creates_email_from_valid_string ✅
- test_rejects_empty_string ✅
- test_rejects_invalid_format ✅
- ...
### Implementation File
`src/Domain/ValueObject/Email.php`
### Verificationvendor/bin/phpunit --filter=EmailTest OK (8 tests, 12 assertions)
Bias Protection
Acceleration: "Skip tests, just implement" → Tests ARE the spec. No tests = no spec = bugs.
Over-optimization: "Add extra features while implementing" → YAGNI. Minimal code to pass tests. Nothing more.
Does 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.

