Tdd
Test-driven development loop for Solidity smart contracts. unit-test-engineer writes failing tests, contract-developer implements, loop until green.From its SKILL.md
npx -y skills add cayocan/eth-agents --skill tddAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, as published. Nobody here has run it
Purpose
Implements a strict TDD loop for contract development. Ensures every line of implementation code is covered by a test written before the implementation. Maximum 5 iterations before halting.
Workflow
- Orchestrator calls
eth_skill_start({ skill: "tdd", totalPhases: 1 }) - Orchestrator spawns
unit-test-engineerwith the contract specification unit-test-engineerwrites failing tests and runs them to confirm failure- Orchestrator spawns
contract-developerwith the failing tests contract-developerwrites minimal implementation to pass the tests- Orchestrator spawns
unit-test-engineeragain to verify tests pass + coverage - If tests fail: loop back to step 4 (max 5 iterations)
- When tests pass: orchestrator reports coverage and hands off
- Orchestrator calls
eth_reset()
Usage
"write tests first for an ERC20 vault"
"tdd a staking contract"
"write unit tests for the Auction contract before implementing"
# Output:
- test/[ContractName].t.sol (Foundry) or test/[ContractName].test.ts (Hardhat)
- src/[ContractName].sol with minimal implementation
- Coverage report
Configuration
- Max TDD loop iterations: 5 (orchestrator halts and reports after 5 failed loops)
- Toolchain auto-detected (Foundry/Hardhat)
- Coverage threshold: reported but not enforced (user decides if sufficient)