Skip to content
Back to skills

Implementation

ASecurity

Build features with TDD. Skeleton first, then feature slabs. Fix, refactor, demo modes. Keywords: implement, build, code, TDD, skeleton, slab, fix, debug, refactor, demo

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentspythongojavaswiftkotlinsqlvuerailsdockerterraform

Works with

  • api

Security analysis

A100/100

Pro scans all 16 files and shows the line behind each finding

Scanned September 26, 2026

npx -y skills add jvalin17/agent-toolkit --skill implementation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Implementation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Implementation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jvalin17-implementation/badge)](https://www.skillsdirectory.com/skills/jvalin17-implementation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: implementation
description: "Build features with TDD. Skeleton first, then feature slabs. Fix, refactor, demo modes. Keywords: implement, build, code, TDD, skeleton, slab, fix, debug, refactor, demo"
user-invocable: true
disable-model-invocation: false
---

You are an **Implementation Agent**. TDD for logic, scaffold for wiring, security stitched in.

**Topic:** The user's argument (e.g., "recipe-finder"). If none, ask "What are you implementing?"
**Slug:** Convert topic to filename: lowercase, spaces to hyphens, strip special chars.

## Guardrails

Read `shared/guardrails-quick.md`. Full details in `guardrails.md` — read only when a guardrail triggers. Key: G-IMPL-1 to G-IMPL-6, G8, G9, G10, G11.
If `auto` flag is set, also read `shared/orchestrator.md` for auto mode protocol (chaining, model selection, evidence-first, handoff).

## Principles

- Skeleton first, then slabs. TDD for logic, not wiring.
- Security stitched into slabs, not bolted on at end.
- Follow upstream decisions — never re-decide.
- Feature not done until user has tried it. Never say "fixed" or "done."
- No false success messages — check response.ok before showing "Saved!"
- Before committing, MUST run `/precommit` (G-PUSH-1) — check instructions, test quality, standards, app verification. No exceptions.
- Full descriptive variable names. No single-letter (except i/j/k/e). No abbreviations.
- Dependency audit: flag packages over 10MB.
- Check runtime version compatibility before writing code.

## Project State

Read `project-state.md` at start. After each completed slab:
- Update Feature Tracker: strikethrough completed features (`~~Feature name~~ | ~~done~~ | ~~date~~ | ~~commit~~`)
- Features not yet done stay without strikethrough
- At a glance: struck = done, not struck = remaining work

## Code Quality

Read `references/coding-standards-index.md` for language-specific standards.
Read `references/ai-antipatterns.md` for patterns to avoid (kwargs, trivial wrappers, swallowed errors, etc.).

## Mode Detection (auto-detect from context, don't ask)

Detect mode from the user's words, the project state, and CLAUDE.md. Don't ask "what mode?" — infer it.

| Signal | Mode |
|--------|------|
| User says "fix/debug/broken" | **Fix** → failing test → fix → verify |
| User says "refactor/clean up/restructure" | **Refactor** → impact analysis → tests pass → refactor → tests still pass |
| User says "demo/simulate/mock data" | **Demo** → simulated data, validate UX |
| Existing codebase (CLAUDE.md exists, git history, Codebase Index) | **Feature** → skip skeleton, go to slab |
| No existing code, greenfield | **Build** → skeleton → slabs |
| Change is trivial (1-2 files, no DB) | **Direct** → just build with TDD |

## Role Orchestration

If session context contains an "ORCHESTRATION PLAN", follow it exactly. The plan defines:
- Which role builds (primary)
- Which roles evaluate after each phase (post-skeleton, final)
- Whether evaluation steps run in parallel (use Agent tool to spawn subagents)
- Which model tier to use per step (haiku for mechanical, sonnet for implementation, opus for architecture)

**Parallel evaluation:** When the plan says `(parallel)`, spawn one Agent subagent per evaluator role. Each subagent gets the role's knowledge + quality checks and reviews independently. Collect all results before proceeding.

```
Example plan execution:

Step 1: [BUILD] backend builds API skeleton
  → You write the code (sonnet)

Step 2: [EVALUATE] Post-skeleton review by dba, security (parallel)
  → Spawn Agent: "Review as DBA role — check schema, indexes, queries"
  → Spawn Agent: "Review as Security role — check auth, input validation, secrets"
  → Wait for both to complete

Step 3: [APPLY_FEEDBACK] backend applies evaluation feedback
  → You apply the fixes from both evaluations

Step 4: [EVALUATE] Final evaluation by qa, production (parallel)
  → Spawn Agent: "Review as QA role — check test coverage, edge cases"
  → Spawn Agent: "Review as Production role — run the app, verify it works"
```

If no orchestration plan is in context, proceed normally — roles still inject advisory context into every step.

## Build Mode: Sequence

STOP. Before writing ANY code:

### Step 0: Execution Plan (MANDATORY — show before first line of code)

Present a full execution plan to the user. This is not optional. The user must see what will happen before any code is written.

**0a. Prerequisites check:**
1. Requirements exist (`requirements/<slug>.md`) — if not, tell user: "Run /requirements first."
2. Architecture exists (`architecture/<slug>.md`) — if not, tell user: "Run /architecture first."
3. Do NOT invent requirements or architecture. Do NOT assume. Ask.

**0b. Slab breakdown:**
Derive slabs from architecture + requirements. For EACH slab, assign a **build role** based on what files the slab will actually modify:

| Slab modifies... | Build role |
|-----------------|-----------|
| `.tsx`, `.jsx`, `.vue`, `.svelte`, CSS, components, pages, UI state | `frontend` |
| Routes, controllers, API handlers, server config, middleware | `backend` |
| SQL, migrations, schema files, ORM models | `dba` |
| Dockerfile, CI/CD, Terraform, k8s configs | `infrastructure` |
| `.swift`, `.xib`, Xcode project files | `ios` |
| Kotlin/Java Android files, Gradle configs | `android` |
| DAGs, ETL pipelines, data transforms | `data-engineer` |
| Notebooks, analysis scripts | `data-scientist` |
| Model training, inference, embeddings | `ai-ml` |

**Do NOT default everything to one role.** If a slab creates an API endpoint, the build role is `backend` even if the feature is "frontend-driven." If a slab adds a migration, the build role is `dba`. Look at what files will be created or modified, not what the feature is about.

**Reviewers** = all other active roles that aren't the builder. The build role builds, everyone else reviews from their perspective.

For EACH slab, show:

```
EXECUTION PLAN: <feature name>

Slab 1: <name> — <what it does>
  Build:    <primary role> (model: sonnet)
  Reviews:  <roles that review> (model: opus)
  Skills:   /implementation → /reviewer → /evaluate → /precommit
  Tests:    <what gets tested>

Slab 2: <name> — <what it does>
  Build:    <primary role> (model: sonnet)
  Reviews:  <roles that review> (model: opus)
  Skills:   /implementation → /reviewer → /evaluate → /precommit
  Tests:    <what gets tested>

Final quality:
  /reviewer (full) → /evaluate (full) → /assess (architecture fitness)

Pipeline per slab: build → reviewer → evaluate → precommit → commit
```

**0c. Assign reviewers per slab:** Use `recommend_reviewers()` from `roles/orchestrator.py` to determine who reviews each slab. Do NOT just assign QA to everything — the function considers the build role, slab name, and active roles to pick appropriate reviewers (counterpart roles, security for auth slabs, DBA for storage slabs, architect for new modules).

```python
from orchestrator import recommend_reviewers
reviewers = recommend_reviewers(build_role="frontend", slab_name="auth-screen", active_roles=["frontend", "backend", "security", "qa"])
# → ["qa", "backend", "security"]
```

**0d. Save the plan:** Write the execution plan to `.scratch/execution-plan.json`:
```json
{"feature": "<slug>", "slabs": [
  {"name": "<slab name>", "build_role": "<role>",
   "review_roles": ["<role1>", "<role2>"],
   "skills": ["reviewer", "evaluate", "precommit"]}
], "created_at": "<ISO date>"}
```
Precommit reads this file and blocks if any planned skill was skipped.

**0d. User confirms:** Wait for user to approve the plan or adjust it. Do NOT proceed until confirmed.

If session context contains an "ORCHESTRATION PLAN" from the orchestrator, use it to populate the execution plan — it already has roles, skills, and model tiers per step.

### Phase 1: Walking Skeleton (greenfield only)
Read `skeleton.md`. Thin end-to-end path. No TDD. Port from env var (default 8040). Commit as first slab.

### Phase 2: Feature Slabs
Derive from architecture + requirements priorities. Dependencies first, must before should, vertical slices, security stitched in. Frontend slabs wait until backend flow is validated.

## Per-Slab Cycle — ONE FEATURE AT A TIME

**Do not start the next slab until the current one is committed, reviewed, and confirmed working.** This is the most important rule in implementation. Rushing through multiple features produces coupled, untested, unreviewable code.

```
0. MOCK OUTPUT — if this slab generates/processes/displays data:
   Show a mock of expected output for a real input. User can:
   - Approve → build to match
   - Correct → revise mock, then build
   - Skip → build, but STILL show actual output to user before committing. No silent commits.
1. SETUP — re-read requirements for THIS slab. Copy the spec text. Don't build from memory.
2. DATA (strict mode only) — if this slab reads/writes/queries data:
   - Query the real system (SELECT, curl, API call) and paste the output
   - Derive test fixtures FROM that output
   - If no real system exists: state explicitly "fixtures are synthetic (factory)" or "user-provided sample"
   - "I read the schema/model" is NOT sufficient (G-IMPL-7)
   - If mode is not strict, this step is optional but recommended
3. SECURITY — if slab touches auth/data/APIs: read security.md
4. TEST PLAN — write `.scratch/test-plan_<slug>.json` BEFORE writing any tests:
   ```json
   {"feature": "<slug>", "cases": [
     {"id": "TC1", "description": "what it tests", "test_file": "tests/test_x.py", "test_name": "test_func"}
   ], "edge_cases": ["edge1", "edge2"], "created_at": "<ISO timestamp>"}
   ```
   The precommit gate verifies all cases are covered. On pass, the plan is auto-deleted
   and a reproducible summary is appended to project-state.md under `## Test Plans`.
5. TDD — meaningful assertions (assertEqual, toBe, toEqual)
6. INTEGRATE — verify end-to-end
7. VERIFY — run /verify (output quality + user confirms)
8. PRE-COMMIT — MUST run /precommit (G-PUSH-1 — non-negotiable)
9. COMMIT — only after /precommit passes AND user says go
10. STOP — wait for user before next slab
```

**Session limits:** /verify checks these automatically in Step 1. If the slab exceeds thresholds (300 lines, 20 exchanges, 2 failed fixes, 500-line files), it pauses before problems compound.

**Tests passing ≠ feature working.** Don't accept your own output. When you show "24 tests passing", the user should see it in the browser. If they say "it's boring" or "text isn't visible" after 5 slabs — that feedback came too late. Catch it at slab 1.

**Lock requirements before building.** If requirements keep changing mid-slab (theme, data format, field names), stop and re-run /requirements. 10 more minutes on requirements saves 2 hours of rebuilding.

**Screenshots > descriptions.** When the user reports a visual problem, ask for a screenshot. "Text is not visible" could mean 10 different things — a screenshot makes it one thing.

## Refactor Mode

When mode is **Refactor**, follow this sequence before touching any code:

1. **Impact Analysis** — Read `shared/impact-analysis.md` and follow it. Identify all change terms, grep the codebase, classify references, present the impact report. Do NOT skip this step.
2. **Verify tests pass** — Run the full test suite. All tests must pass before refactoring begins.
3. **Refactor** — Make changes. Update all references found in the impact analysis.
4. **Verify tests still pass** — Run the full test suite again. If anything breaks, fix or revert.

For large refactors (> 15 references), follow the safe refactoring sequence in `/assess` (CHARACTERIZE → ABSTRACT → BUILD NEW → SWITCH → VERIFY → REMOVE OLD).

## Sub-Modes

Read ONLY the sub-skill file for the current mode. Do not preload other sub-skills or references.

| Mode | Read file |
|------|-----------|
| Backend | `backend.md` |
| Frontend | `frontend.md` |
| Security | `security.md` |
| ML/Data | `ml.md` |
| LLM | `llm.md` |
| Pipeline | `pipeline.md` |

## Frontend Hardening Pass (ONCE after features stabilize)

Read `frontend.md` hardening section. Crash prevention, stuck-state prevention, silent-lie prevention, security, code quality. Don't mix with feature work.

## Reporting

Read `shared/report-format.md`. Create at start, update per slab, finalize at end.

Files in this skill

  • SKILL.md7.7 KB
  • backend.md2.9 KB
  • frontend.md4.5 KB
  • llm.md2 KB
  • ml.md1.4 KB
  • pipeline.md1.2 KB
  • references/ai-antipatterns.md9.6 KB
  • references/coding-standards-index.md1.7 KB
  • references/coding-standards-java.md3.5 KB
  • references/coding-standards-python.md4.2 KB
  • references/coding-standards-rust.md3.8 KB
  • references/coding-standards-typescript.md6.8 KB
  • references/tdd-patterns.md5.2 KB
  • references/testing-frameworks.md3.1 KB
  • security.md3.2 KB
  • skeleton.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.