The daily ECC workflow: /plan, TDD, code review and build-fix on a real project
At the end of the article you'll find the install command, a ready-to-paste prompt and a .md to download.
The daily ECC workflow in Claude Code has four steps: /ecc:plan so the agent proposes a plan and waits for your confirmation, the tdd-workflow skill to implement with failing tests first, /ecc:code-review so a fresh-context reviewer hunts for bugs, and /build-fix when something will not compile. We ran it on a small Node API: 19 green tests and a review with 9 findings.
This is part 3 of the complete ECC guide. If you do not have it yet, start with part 2: installing ECC without duplicates. Below is each step with its real output, how long it took and what it cost in tokens, so you know what to expect on your own project.
The test project
We started from tienda-api, a 7-line node:http server with a single GET /products endpoint and an in-memory catalog (a 15 t-shirt and an 8 mug). No framework, no dependencies, no tests: a typical prototype.
The task: add POST /orders, which creates an order from existing products and computes the total.
Setup: Claude Code 2.1.329 with ECC 2.2.3 loaded as a plugin (--plugin-dir), the Sonnet model and non-interactive mode (claude -p) so the test is repeatable. The prompts were in Spanish, which is why the screenshots are in Spanish. Date: November 20, 2026.
Step 1: /ecc:plan before touching code
/ecc:plan "Add a POST /orders endpoint that creates an order from existing products and computes the total"The command's definition is explicit: restate requirements, look for patterns in the code, split the work into phases, assess risks and wait for your confirmation before writing anything. It did exactly that:
The phases were not the most useful part. Two blocks were:
- Risks: it spotted that a client could send its own price and decided to compute the total from the server-side catalog only. It also proposed a body size limit (413).
- Assumed decisions: merge lines with the same
productId, return 422 when a product does not exist, splitapp.jsfromserver.jsto make it testable. It lists them so you can push back.
It took 56 seconds. The CLI reported a cost of 0.37 USD (API pricing, Sonnet).
This is the step that saves the most: fixing a decision in the plan costs one line; fixing it in code costs an afternoon.
Step 2: implement with tdd-workflow
We answered the plan with:
yes. Implement the plan following the tdd-workflow skill (failing test first, then code). Run npm test at the end and summarize which tests passed.The tdd-workflow skill enforces RED → GREEN → REFACTOR. The agent:
- Refactored first with no behavior change:
app.jswithcreateApp()andserver.jsdown to 2 lines. - RED: wrote
orders.test.jswithnode:test. Without order logic, 2 tests passed (the/productsand 404 regressions) and 17 failed. - GREEN: implemented
readJson,buildOrderand the route. All 19 passed. - Measured coverage: 98.5% of lines and branches; only the
catchreturning 500 was left uncovered.
These are not filler tests: they cover that a client-sent price is ignored, quantities of 0, negative, decimal or text, empty items, invalid JSON, a body over 100 KB and GET /orders (405).
It took 73 seconds and the CLI reported 0.64 USD.
One honest detail: the skill recommends checkpoint commits after RED and after GREEN, and the agent did not make them because we did not ask. If you want that history, say so in the prompt.
Step 3: /ecc:code-review with a fresh context
In a new session (empty context, no idea how the code was written):
/ecc:code-reviewWith no arguments it reviews uncommitted changes: it lists files with git diff, reads them in full and looks for security issues (critical) first, then quality.
Result: no critical or high issues, so nothing blocks the commit. But it caught things the writing agent missed:
req.urlis compared verbatim, so/products?x=1returns 404. It suggestsnew URL(req.url, 'http://x').pathname.- The 404 answers in plain text while every other error is JSON.
- After a 413 the rest of the body is not drained and no
Connection: closeis sent: the socket may stay open. - The
ordersarray grows without bound in a long-running process. - Missing tests for decimal rounding and for
nullor[]bodies.
It took 25 seconds and cost 0.31 USD. Note: in this session we did not allow it to run npm test, and it said so up front ("this review is from reading the code only"). Give it permission and it runs them.
To compare with other reviewers, we have tested Alibaba's Open Code Review and the implement and code-review skills.
Step 4: /build-fix when it will not compile
Our API had no broken build, so we did not force one. Per its definition, it:
- Detects the build system:
npm run buildorpnpm buildif there is a script,npx tsc --noEmitfor TypeScript,cargo build,go build ./...,mvn compile,./gradlew compileJavaormypy .. - Groups errors by file and fixes them one at a time with the smallest change, rebuilding after each fix.
- Leaves architecture alone: the
build-error-resolveragent is told not to make large changes just to get green.
It is the command you reach for after a dependency bump leaves you with 40 type errors.
What the full loop costs and how long it takes
| Step | Time | Cost reported by the CLI |
|---|---|---|
| `/ecc:plan` | 56 s | 0.37 USD |
| Implementation with `tdd-workflow` | 73 s | 0.64 USD |
| `/ecc:code-review` | 25 s | 0.31 USD |
| **Total** | **2 min 34 s** | **1.32 USD** |
These are API prices with Sonnet on a small task. On a Pro or Max subscription you do not pay per token, but it uses your quota. On a bigger task the plan and review grow little; implementation is what scales.
Common mistakes
- Skipping the plan. If you ask for code directly, ECC will not force a plan. Put it in your
CLAUDE.md: "use /ecc:plan before any new feature". - Reviewing in the same session. The point of
/ecc:code-reviewis the fresh context. Open a new session or run/clearfirst. - Asking for TDD without naming the skill. "Do it with tests" is not the same as "follow tdd-workflow": the skill fixes the RED → GREEN order and the 80% coverage target.
- Using
/tddor/verify. In v2.2 those shortcuts moved tolegacy-command-shims/. Use thetdd-workflowandverification-loopskills.
FAQ
Does it work with prompts in other languages? Yes. We gave the task in Spanish and the plan came back in Spanish.
Can I use the loop without installing all of ECC? Yes: the selective installer can copy just tdd-workflow, security-review and the commands you use (--skills tdd-workflow,security-review).
What if I do not like the plan? Answer modify: [changes]. The command is built to iterate on the plan until you reply yes.
Conclusion
ECC's workflow does not make the agent smarter; it makes it more orderly. Planning first, testing before implementing and reviewing from another session found 9 things to improve in code that already passed 19 tests. Start tomorrow with /ecc:plan on your next task. In part 4 we go through ECC's 72 agents and which to use for your stack.
// resource · use it now
ECC's plan → TDD → review loop, ready to paste
With ECC installed as a plugin (`ecc@ecc`), paste the prompt that fits your project. Works with Claude Code 2.1 or newer.
Repository license: MIT
1. Install
npx ecc-universal@2.2.3 setupgit clone https://github.com/affaan-m/ECC.git && cd ECC && npm install
./install.sh --target claude --skills tdd-workflow,security-review2. Pick your case
We are building this feature with the ECC workflow: <describe the feature>.
1. Run /ecc:plan with that description. Show me requirements, phases, risks and the decisions you assume, and wait for my "yes" or "modify".
2. Once I approve, implement with the tdd-workflow skill: failing tests first (tell me how many fail), then minimal code until green, then refactor.
3. Commit after RED and after GREEN using Conventional Commits.
4. Run the tests at the end and report coverage.
5. Do not add dependencies without asking me.3. How to use it
- Paste the prompt and read the plan carefully: fix any decision you dislike there.
- Approve with
yes. - When it finishes, open a new session and run
/ecc:code-review.
This repository already has tests, CI and conventions in CLAUDE.md. I want to apply the ECC workflow to this change: <describe the change or paste the issue>.
1. /ecc:plan with pattern grounding: before the plan, cite the files you will use as models (naming, error handling, data access, tests).
2. Mark which parts of the plan touch security (auth, payments, personal data) and which authorization tests are needed.
3. Wait for my OK. Then implement with tdd-workflow, commits after RED and GREEN, without touching files outside the plan.
4. If the build or typecheck fails, use /build-fix with minimal changes.
5. Finish with a PR summary: what changed, tests added and open risks. I will review with /ecc:code-review in another session.3. How to use it
- Run the prompt on the task branch.
- Check that the files cited as models are the right ones.
- Before opening the PR, run
/ecc:code-reviewin a clean session and fix critical and high findings.
Help us grow
codigoagente is free, with no paywalls. If this article helped you, any of these keeps the blog going.
- Share it with someone who'll find it usefulWhatsAppLinkedInXFacebook
- Meet our sponsorSafe Build Labs
More on AI agents

- Skills for your agents
- Claude Code

guide · Marketing psychology guide for AI agents · #3
- Skills for your agents
- Claude Code

guide · Marketing psychology guide for AI agents · #2
- Skills for your agents
- Claude Code