Automated summary
Step five of the Weft TDD workflow: it swaps the `declare` mocks for real code while keeping the export surface identical, then loops until checks and tests are green.
Strengths
- Forces an explicit signature-parity pass between implemented exports and the mocked surface, which typechecking alone does not catch
- Ships a concrete green loop (`vp check --fix`, then `vp run check` and `vp run test`) that avoids false cross-package errors via the pack rule
- Clear pause rule: any deviation sends you back to /spec and /mock instead of letting the implementation drift silently
- Provides specific implementation standards (Effect patterns, tagged errors, Services/Layers, Schema at I/O boundaries)
Limitations
- Tightly bound to the Weft ecosystem: it assumes `vp` and `graphify` commands plus the /spec, /mock, /unit-test and /e2e steps exist
- Covers only the implementation step; failing tests from /unit-test must already exist
- Its prescriptive standards (Effect everywhere, no JSX) fit poorly in a codebase that does not use Effect
Use it right after /unit-test, once mocks and red tests exist and the real implementation has to be written.
Skip it if you are not following the Weft workflow or no mock surface and failing tests have been produced yet.
Security analysis
SafeThe skill is a conventional TDD implementation loop: replace `declare` mocks with real code, then iterate lint/typecheck/test until green, plus an AST-only graph update. The only commands invoked are project-local build/test CLIs (`vp`, `graphify`); there is no network fetchery, no curl|sh, no credential access, no destructive filesystem operations, and no instruction to bypass safety checks. The `--fix` step mutates files but is bounded to formatting/lint repair, which is inherent to the stated task.
- •Runs project build/test tooling (`vp check --fix`, `vp run check`, `vp run test`) that auto-edits source files; scope is limited to formatting/lint/typecheck fixes.
- •No allowed-tools declared, so the agent's tool permissions are unbounded by this file, though nothing in the instructions abuses that.
Examples
Les tests de /unit-test sont rouges et les mocks sont en place dans src/billing/invoice.ts. Lance /implement pour remplacer les declares par la vraie implémentation et boucler jusqu'à ce que vp run check et vp run test passent./implement — implémente les fonctions mockées de src/auth/session.ts, puis fais la passe de parité de signatures contre la surface du mock et signale toute divergence avant de continuer.name: "implement" description: "Step 5 of the Weft TDD workflow. Use after /unit-test's red phase: replaces the declare mocks with real code in-place, enforces signature parity with the mock surface, and loops vp check --fix → vp run check → vp run test until green. Finishes with graphify update."
/implement: Implementation + green loop (TDD step 5)
Replace the declare mocks with real code, keeping the surface identical, until all checks and tests are green.
When to run
- Previous step:
/unit-test(tests exist and a red run is recorded). - Next step:
/e2e. - Gate (exit):
vp run checkandvp run testboth green, signature parity confirmed,graphify update .run.
Procedure
-
Replace mocks in-place. In the feature's source file, replace each
declarestatement with its real implementation. Same file, same exports, same signatures. Keep the JSDoc written in/mock(update prose only if behavior details demand it). -
Implementation standards: Effect patterns throughout, tagged errors (the union declared in
/mock), Services/Layers for shared capabilities, Schema at unknown/I-O boundaries,pipe(effect, ...)preferred,Optionfor optionality,readonlydata, explicit type guards.Effect.genvspipeby readability. No JSX-style patterns. -
Signature-parity pass (explicit, not assumed). Diff the implemented exports against the mock surface committed in step 2:
- No export added, removed, or renamed.
- No signature changed (parameters, return types, generics, error union).
Typecheck alone does not catch additions or loosened types. Do this pass deliberately. Any deviation triggers the pause rule: stop implementing, return to
/specand/mockto update spec + surface (and/type-tests+/unit-testif affected), then resume here. -
Green loop. Repeat until both are clean:
vp check --fix: auto-fix formatting/lint (safe here: packages just packed by the run tasks).vp run check: pack, then format/lint/typecheck. Must be green.vp run test: pack, then run all node/jsdom tests. Every test from the red phase must now pass; no other test may regress.
Never use bare
vp check/vp testas validation. They skippackand report false cross-package errors (the pack rule). -
Update the knowledge graph: run
graphify update .(AST-only, no API cost). -
Hand off. Next step is
/e2e.
Rules
- Implementation must match mock signatures exactly and behavior must match
specs.md. - If implementation reveals mocks/specs need changes, apply the pause rule: update specs and mocks first, never drift silently.
- Fix the implementation to satisfy the tests; changing a test is only legitimate when the pause rule has first changed the spec it encodes.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/tdd-implementation-mrx3xzr7' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/tdd-implementation-mrx3xzr7/download' --output '.skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md.part' && mv '.skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md.part' '.skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md' && test -s '.skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/implement' && cp -R '.skill-downloads/tdd-implementation-mrx3xzr7' '.claude/skills/implement'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/tdd-implementation-mrx3xzr7'openskills read 'tdd-implementation-mrx3xzr7'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/tdd-implementation-mrx3xzr7/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.