implement-slice
Skill15 starsChanged 6 days agoMITView on GitHub
This skill should be used when the user asks to "implement a feature", "add a feature", "build a feature", "create a new feature", or mentions "vertical slice", "TDD implementation", "red green", or "implement with tests". Guides strict RED/GREEN/REFACTOR implementation through vertical slices.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Koroqe/claude-code-sdlctheir own version, first seen Oct 23, 2026
- kpblcaoo/agent-skillstheir own version, first seen Jun 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Koroqe/claude-code-sdlc★ 52same name
- kpblcaoo/agent-skills★ 1same 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 repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-commandSkill
- write-tech-specSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 18 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Before writing any code:
- Very specific: line 16
Read .claude/rules/architecture.md for active patterns and constraints
- Very specific: line 17
Read .claude/rules/tdd.md for TDD discipline rules
- Distinctive: line 19
Verify the feature is small enough for one vertical slice (if not, split first)
- Distinctive: line 23
Write one end-to-end smoke test for the core user journey at HIGHEST fidelity.
- Distinctive: line 28
NO mocks, stubs, or simulations
- Distinctive: line 29
Test the complete user journey from entry to exit
- Distinctive: line 30
Run it — it MUST FAIL (RED) because the feature doesn't exist yet
- Distinctive: line 71
Write the simplest test that describes the next behavior.
- Distinctive: line 76
Test at the RIGHT level — don't use e2e for logic testing
- Distinctive: line 82
Write the MINIMUM code to make this ONE test pass.
- Distinctive: line 84
No error handling unless a RED test demands it
- Distinctive: line 85
No abstractions unless a RED test demands them
- Distinctive: line 87
If you feel the urge to write more, write a RED test for it first
- Distinctive: line 93
All tests are GREEN. Now clean up:
- Distinctive: line 98
Run tests after EVERY change — any RED means undo immediately
- Distinctive: line 111
Write a RED test for the missing behavior
- Distinctive: line 119
Add tests for edge cases and error paths.
- Distinctive: line 149
If distribution is off, add tests for the underrepresented tier.
- Distinctive: line 153
Before considering the slice complete:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
<!-- Generated by dev-standards plugin. Customize as needed. -->Implement Vertical Slice (TDD)
Implement a feature as a complete vertical slice using strict RED/GREEN/REFACTOR discipline. Each slice delivers working functionality through all layers — not a horizontal layer across features.
Pre-Flight Checks
Before writing any code:
- Confirm the feature scope and acceptance criteria with the user
- Read
.claude/rules/architecture.mdfor active patterns and constraints - Read
.claude/rules/tdd.mdfor TDD discipline rules - Identify which layers this slice touches (validation, logic, data, API, UI)
- Verify the feature is small enough for one vertical slice (if not, split first)
Step 1 -- Write the Smoke Test (RED)
Write one end-to-end smoke test for the core user journey at HIGHEST fidelity.
Smoke Test Rules
- Full e2e — real UI (if applicable), real backend, real database
- NO mocks, stubs, or simulations
- Test the complete user journey from entry to exit
- Run it — it MUST FAIL (RED) because the feature doesn't exist yet
# Example: "User can create a post"
test("user creates a post and sees it in the list"):
navigate to /posts/new
fill in title and body
click submit
assert redirected to /posts
assert new post appears in listRun with: go test (CLI subprocess + live MCP servers: npx server-everything, test-servers/*.js)
Commit: RED: Smoke test for [feature]
Step 2 -- Identify the Thinnest Slice
Break the feature into the smallest possible behavior increments. Each increment is ONE RED/GREEN/REFACTOR cycle.
Slice Planning
List the behaviors in implementation order (dependencies first):
Example for "User can create a post":
1. Post validation rejects empty title (pure logic)
2. Post can be persisted to database (data layer)
3. API endpoint accepts POST /posts (API layer)
4. UI form submits to API (presentation layer)
5. Success redirects to post list (navigation)Each behavior becomes one TDD cycle. Order matters — build from the inside out, but always as a vertical slice (not all validation first, then all data, then all API).
Step 3 -- RED/GREEN/REFACTOR Each Behavior
For EACH behavior in the slice:
3a. RED — Write ONE Failing Test
Write the simplest test that describes the next behavior. Run it. Confirm RED.
- Unit test for pure logic (validation, transformation, calculation)
- Integration test for data layer (real database, no mocks)
- API test for endpoint (HTTP request/response)
- Test at the RIGHT level — don't use e2e for logic testing
Commit: RED: Test for [behavior]
3b. GREEN — Minimum Implementation
Write the MINIMUM code to make this ONE test pass. Nothing more.
- No error handling unless a RED test demands it
- No abstractions unless a RED test demands them
- No "while I'm here" additions
- If you feel the urge to write more, write a RED test for it first
Commit: GREEN: [behavior] implemented
3c. REFACTOR — Clean Up Under GREEN
All tests are GREEN. Now clean up:
- Extract duplicated code
- Rename for clarity
- Simplify structure
- Run tests after EVERY change — any RED means undo immediately
Commit: REFACTOR: [what changed]
Repeat
Move to the next behavior. Continue until all behaviors are GREEN.
Step 4 -- Verify the Smoke Test (GREEN)
The smoke test from Step 1 should now pass. If not:
- Identify what's missing (the smoke test tells you)
- Write a RED test for the missing behavior
- Implement GREEN
- Repeat until the smoke test is GREEN
Commit: GREEN: Smoke test passes — [feature] complete
Step 5 -- Edge Cases and Error Paths
Add tests for edge cases and error paths. Each follows the RED/GREEN cycle:
Edge Cases to Cover
- Empty/null/whitespace inputs
- Boundary values (0, -1, max, min)
- Duplicate operations (submit twice)
- Concurrent access (two users at once)
- Large inputs (10K characters, 10K items)
Error Paths to Cover
- Validation failures (each field, each rule)
- Authorization failures (wrong role, expired session)
- External service failures (if applicable)
- Database constraint violations
Each edge case: RED test -> GREEN implementation -> commit.
Step 6 -- Verify Test Distribution
Count your tests and verify distribution:
Target:
Happy path: 50-60%
Edge cases: 25-30%
Adversarial: 10-15%If distribution is off, add tests for the underrepresented tier.
Step 7 -- Final Verification
Before considering the slice complete:
- Smoke test passes at full e2e fidelity
- Every test was seen RED before GREEN
- All tests pass (unit + integration + e2e)
- Test distribution is on target
- No TODO/FIXME markers in new code
- No debug statements
- Code follows existing codebase patterns
- No scope creep beyond acceptance criteria
- No abstractions with single implementations
- Linting passes with zero errors
Anti-Patterns to Reject
- Writing all tests first, then all implementation (batch TDD is not TDD)
- Building all database models, then all APIs, then all UI (horizontal layers)
- Skipping RED verification ("I know the test will fail")
- Writing more than minimum GREEN ("while I'm here...")
- Refactoring while RED ("I'll fix it after this test passes")
- Mocking internal code instead of testing through it
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.

