tdd-workflow
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: tdd-workflow
78 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- mnzralee/claude-multi-agent-architecturetheir own version, first seen Oct 3, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
- imMamdouhaboammar/tiktok-growth-automation-meshtheir own version, first seen Oct 1, 2026
- smitshivalkar-spectims4567/hsj-agent-skillstheir own version, first seen Sep 29, 2026
Used with
Projects with it also use kotlin-testing, ralphinho-rfc-pipeline and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 10 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 12 projects that use this
WorldFlowAISkillproject-guidelines-example
Also in 19 projects that use this
- +2 more from Infopibe
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 78
- WorldFlowAI/everything-claude-code★ 4ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- zhukunpenglinyutong/ai-max★ 335same name
- loulanyue/awesome-claude-notes★ 272same name
- ab604/claude-code-r-skills★ 205same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- hellangleZ/burn-in-cceverywhere-ralph★ 112same name
- cohen-liel/hivemind★ 110same name
68 more not listed
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 repository66 other files it gives its agents.
- adversarial-reviewSkill
- agent-connectSkill
- agent-teams-guideSkill
- agent-testingSkill
- android-sdkSkill
- brainstormSkill
- branded-callingSkill
- callbacksSkill
- compliance-regulatorySkill
- conferenceSkill
- context-engineeringSkill
- context-hubSkill
- conversational-intelligenceSkill
- conversation-relay-referenceSkill
- conversation-relaySkill
- conversationrelaySkill
- conversations-v2Skill
- customer-memorySkill
- deepgramSkill
- deep-validationSkill
- elastic-sip-trunkingSkill
- env-doctorSkill
- event-streamsSkill
- getting-startedSkill
- hooks-referenceSkill
- iamSkill
- ios-sdkSkill
- ivr-crawlerSkill
- ivr-migratorSkill
- lookupSkill
- media-streamsSkill
- memory-systemsSkill
- messaging-services-referenceSkill
- messaging-servicesSkill
- messagingSkill
- multi-agent-patternsSkill
- operational-gotchasSkill
- paymentsSkill
- paySkill
- phone-numbersSkill
- proxySkill
- real-time-transcriptionSkill
- recordingsSkill
- segmentSkill
- sendgrid-emailSkill
- sip-byocSkill
- sipSkill
- sync-referenceSkill
- syncSkill
- taskrouter-referenceSkill
- taskrouterSkill
- tool-boundariesSkill
- twilio-cliSkill
- twilio-invariantsSkill
- verify-referenceSkill
- verifySkill
- video-patternsSkill
- videoSkill
- voice-insightsSkill
- voice-referenceSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. 0 are common, 30 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 72 edited versions we read keep these.
30
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Test-Driven Development patterns for Twilio projects.
- Distinctive: line 12
When building Twilio integrations, TDD is especially valuable because:
- Distinctive: line 39
Write tests that FAIL. This is critical -- if tests pass before implementation, they're not testing new functionality.
- Distinctive: line 42
Read specification or requirements
- Distinctive: line 43
Write unit tests for each function
- Distinctive: line 44
Write integration tests for workflows
- Distinctive: line 45
Run tests and verify they fail
- Distinctive: line 65
Write MINIMAL code to make tests pass.
- Distinctive: line 68
Verify tests exist and fail
- Distinctive: line 69
Read test expectations carefully
- Distinctive: line 70
Write the simplest implementation that passes
- Distinctive: line 71
Run tests until green
- Distinctive: line 93
Before the Green Phase (dev), verify TDD was followed:
- Very specific: line 96
Tests must fail: Test status must be failing -- if tests pass before implementation, they aren't testing new functionality
- Distinctive: line 97
Coverage threshold: After Green Phase, verify minimum coverage (80%+ lines recommended)
- Distinctive: line 99
If any check fails, go back to the Red Phase and fix the tests before proceeding.
- Distinctive: line 103
If you find yourself with passing tests before writing implementation:
- Distinctive: line 107
Write tests for NEW functionality that doesn't exist yet
- Distinctive: line 108
Verify the new tests fail for the right reason (missing function/module, not syntax error)
- Distinctive: line 119
Fix: Ensure tests reference functions/features that don't exist yet.
- Distinctive: line 127
Fix: Test PUBLIC interfaces and edge cases, not private methods.
- Distinctive: line 155
Test individual functions in isolation.
- Distinctive: line 198
Test function interactions and webhook chains:
- Distinctive: line 223
Test against live Twilio APIs using deep validation:
- Distinctive: line 255
When using the plugin's development subagents:
- Distinctive: line 258
Read spec from previous phase
- Distinctive: line 260
Write test files with failing tests
- Distinctive: line 261
Run tests to confirm failure
- Distinctive: line 265
Verify failing tests exist
- Distinctive: line 268
Run tests iteratively until green
- Distinctive: line 269
Commit when all tests pass
“Common” is measured: kept by at least 6 in 10 of the 72 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TDD Workflow Patterns
Test-Driven Development patterns for Twilio projects. Load this skill when working on feature development to ensure quality through disciplined test-first practices.
Why TDD Matters
When building Twilio integrations, TDD is especially valuable because:
- Quality gate: Tests define expected behavior upfront -- critical for webhook-driven flows where debugging is hard
- Reviewability: Easier to review tests than implementation
- Confidence: Green tests = working code
- Self-verification: Validates work without manual Twilio API testing
The TDD Cycle
+-------------------------------------------------------------+
| |
| RED -------------> GREEN -------------> REFACTOR |
| | | | |
| | | | |
| Write Write Improve |
| failing minimal code |
| tests code to while |
| pass keeping |
| tests tests |
| green |
| |
+-------------------------------------------------------------+Red Phase (Write Failing Tests)
Write tests that FAIL. This is critical -- if tests pass before implementation, they're not testing new functionality.
What to do:
- Read specification or requirements
- Write unit tests for each function
- Write integration tests for workflows
- Run tests and verify they fail
- Confirm failures are for the right reason (missing function, not syntax error)
// Example: Tests that correctly fail (function doesn't exist yet)
describe('transferCall', () => {
it('should return valid TwiML with Dial verb', () => {
const result = transferCall({ to: '+1234567890' });
expect(result).toContain('<Dial>');
});
it('should require phone number', () => {
expect(() => transferCall({})).toThrow('Missing required: to');
});
});
// Error: Cannot find module '../functions/voice/transfer'Green Phase (Make Tests Pass)
Write MINIMAL code to make tests pass. No more, no less.
What to do:
- Verify tests exist and fail
- Read test expectations carefully
- Write the simplest implementation that passes
- Run tests until green
- Commit working code
Refactor Phase (Improve While Green)
Improve code quality while keeping tests green.
What's allowed:
- Rename for clarity
- Extract methods
- Remove duplication
- Improve performance
What's NOT allowed:
- Add new features
- Change behavior
- Break tests
TDD Enforcement
Pre-Phase Checks
Before the Green Phase (dev), verify TDD was followed:
- Tests must exist: At least one test file from the Red Phase
- Tests must fail: Test status must be
failing-- if tests pass before implementation, they aren't testing new functionality - Coverage threshold: After Green Phase, verify minimum coverage (80%+ lines recommended)
If any check fails, go back to the Red Phase and fix the tests before proceeding.
Recovering from TDD Violations
If you find yourself with passing tests before writing implementation:
- Stop -- don't proceed to implementation
- Go back to the Red Phase
- Write tests for NEW functionality that doesn't exist yet
- Verify the new tests fail for the right reason (missing function/module, not syntax error)
- Resume the Green Phase
Common TDD Pitfalls
Pitfall 1: Tests Pass Before Implementation
Problem: Tests pass immediately, meaning they don't test new code.
Cause: Testing existing functionality or writing assertions that always pass.
Fix: Ensure tests reference functions/features that don't exist yet.
Pitfall 2: Over-Testing
Problem: Writing too many tests that overlap in coverage.
Cause: Testing implementation details instead of behavior.
Fix: Test PUBLIC interfaces and edge cases, not private methods.
Pitfall 3: Under-Testing
Problem: Tests only cover happy path.
Cause: Skipping error cases to make tests pass faster.
Fix: Requirements should define error scenarios. Test them all.
Pitfall 4: Modifying Tests to Pass
Problem: Changing test expectations to match buggy implementation.
Cause: Pressure to make tests green without fixing root cause.
Fix: Tests define CORRECT behavior. Fix implementation, not tests.
Test Categories
| Category | Location | Runs When | Coverage Target |
| Unit | __tests__/unit/ or *.test.js | npm test | 80%+ |
| Integration | __tests__/integration/ | npm test | Key flows |
| E2E | __tests__/e2e/ or postman/ | npm run test:e2e | Critical paths |
Unit Tests for Twilio Functions
Test individual functions in isolation. Mock the Twilio context and callback:
const { handler } = require('../functions/voice/greeting');
describe('greeting handler', () => {
let context, event, callback;
beforeEach(() => {
context = {
getTwilioClient: jest.fn(),
TWILIO_PHONE_NUMBER: '+15551234567'
};
event = { From: '+15559876543' };
callback = jest.fn();
});
it('should return TwiML with Say verb', (done) => {
callback.mockImplementation((err, response) => {
expect(err).toBeNull();
expect(response.toString()).toContain('<Say');
done();
});
handler(context, event, callback);
});
it('should handle missing From number', (done) => {
event = {};
callback.mockImplementation((err, response) => {
expect(err).toBeNull();
// Should still work with a default message
expect(response.toString()).toContain('<Say');
done();
});
handler(context, event, callback);
});
});Integration Tests
Test function interactions and webhook chains:
describe('IVR flow', () => {
it('should route billing calls to billing queue', async () => {
// Step 1: Incoming call hits IVR
const ivrResponse = await testHandler('/voice/ivr', {
CallSid: 'CAtest123',
From: '+15559876543'
});
expect(ivrResponse).toContain('<Gather>');
// Step 2: Caller presses 1 for billing
const routeResponse = await testHandler('/voice/ivr-handler', {
CallSid: 'CAtest123',
Digits: '1'
});
expect(routeResponse).toContain('<Enqueue');
expect(routeResponse).toContain('billing');
});
});E2E Tests with Real Twilio
Test against live Twilio APIs using deep validation:
describe('Voice transfer E2E', () => {
it('should complete transfer successfully', async () => {
// Make a real call via Twilio API
const call = await client.calls.create({
to: testPhoneNumber,
from: twilioPhoneNumber,
url: `${baseUrl}/voice/incoming`
});
// Wait for call to complete
await waitForCallStatus(call.sid, 'completed', 60000);
// Deep validate
const finalCall = await client.calls(call.sid).fetch();
expect(finalCall.status).toBe('completed');
// Check for debugger errors
const alerts = await client.monitor.alerts.list({
startDate: new Date(Date.now() - 300000),
logLevel: 'error'
});
const relatedAlerts = alerts.filter(a => a.resourceSid === call.sid);
expect(relatedAlerts).toHaveLength(0);
});
});TDD with Development Subagents
When using the plugin's development subagents:
test-gen Subagent (Red Phase)
- Read spec from previous phase
- Identify test scenarios
- Write test files with failing tests
- Run tests to confirm failure
- Report test count and failure status
dev Subagent (Green Phase)
- Verify failing tests exist
- Read test expectations
- Write minimal implementation
- Run tests iteratively until green
- Commit when all tests pass
review Subagent (Verification)
The review subagent checks TDD discipline:
- Were tests written before implementation?
- Were tests initially failing?
- Is the implementation minimal?
- Are there no extra features beyond what tests require?
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.

