multi-agent-patterns
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: multi-agent-patterns
17 other projects use a version of this.
Adopted by
Most recently taken up by
- AbdullahMalik17/Digital-FTEtheir own version, first seen Sep 26, 2026
- SkotAlexsander/skillstheir own version, first seen Sep 16, 2026
- docxology/templatetheir own version, first seen Aug 29, 2026
- muratcankoylan/Agent-Skills-for-Context-Engineeringtheir own version, first seen Aug 10, 2026
- kumaran-is/claude-code-onboardingtheir own version, first seen May 25, 2026
- georgekhananaev/claude-skills-vaulttheir own version, first seen May 25, 2026
Used with
Projects with it also use context-fundamentals, context-degradation 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.
rohunvoraSkillcontext-fundamentals
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.
Also in 8 projects that use this
rohunvoraSkillcontext-degradation
Recognize, diagnose, and mitigate patterns of context degradation in agent systems. Use when context grows large, agent performance degrades unexpectedly, or debugging agent failures.
Also in 7 projects that use this
AbdullahMalik17Skillconfiguring-dapr-pubsub
Configures Dapr pub/sub components for event-driven microservices with Kafka or Redis. Use when wiring agent-to-agent communication, setting up event subscriptions, or integrating Dapr sidecars. Covers component configuration, subscription patterns, publishing events, and Kubernetes deployment. NOT when using direct Kafka clients or non-Dapr messaging patterns.
Also in 3 projects that use this
AbdullahMalik17Skillcontainerizing-applications
Containerizes applications with Docker, docker-compose, and Helm charts. Use when creating Dockerfiles, docker-compose configurations, or Helm charts for Kubernetes. Includes Docker Hardened Images (95% fewer CVEs), multi-stage builds, and 15+ battle-tested gotchas.
Also in 3 projects that use this
muratcankoylanSkilllong-horizon-prompting
This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.
Also in 3 projects that use this
- +6 more from AbdullahMalik17
- +1 more from rohunvora
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- muratcankoylan/Agent-Skills-for-Context-Engineering★ 18ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- Svenja-dev/claude-code-skills★ 38same name
- kumaran-is/claude-code-onboarding★ 36same name
- georgekhananaev/claude-skills-vault★ 28same name
- mjunaidca/mjs-agent-skills★ 27same name
- docxology/template★ 20same name
- AbdullahMalik17/Digital-FTE★ 12same name
- AbdullahMalik17/Hacathan_5★ 9same name
- AbdullahMalik17/My_skills★ 9same name
7 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
- operational-gotchasSkill
- paymentsSkill
- paySkill
- phone-numbersSkill
- proxySkill
- real-time-transcriptionSkill
- recordingsSkill
- segmentSkill
- sendgrid-emailSkill
- sip-byocSkill
- sipSkill
- sync-referenceSkill
- syncSkill
- taskrouter-referenceSkill
- taskrouterSkill
- tdd-workflowSkill
- tool-boundariesSkill
- twilio-cliSkill
- twilio-invariantsSkill
- verify-referenceSkill
- verifySkill
- video-patternsSkill
- videoSkill
- voice-insightsSkill
- voice-referenceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
All development workflows enforce Test-Driven Development via pre-phase hooks:
- Distinctive: line 45
test-gen: must create tests that fail initially (Red phase)
- Distinctive: line 378
test-gen tasks: Tests must exist AND fail
- Distinctive: line 381
All tasks: No hardcoded credentials
“Common” is measured: kept by at least 6 in 10 of the 16 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
name: multi-agent-patterns description: Agent orchestration and coordination patterns. Use when designing multi-agent workflows, choosing between parallel/sequential/hierarchical patterns, or coordinating subagents.
Multi-Agent Patterns for Twilio
This skill describes orchestration and coordination patterns for Twilio development workflows.
Pattern Overview
| Pattern | Best For | Twilio Use Case |
| Orchestrator | Sequential flows | Feature development pipeline |
| Agent Teams | Parallel + adversarial | Bug debugging, code review, parallel QA |
| Peer-to-Peer | Parallel work | Debugging + fixing simultaneously |
| Hierarchical | Complex features | Multi-channel solutions |
| Evaluator | Quality gates | Code review with standards |
| TDD Pipeline | Code quality | Red → Green → Refactor |
Cross-Cutting Concerns
Human Approval Gates
The project operates in "Highly Supervised" autonomy mode. Human approval is required at key checkpoints:
architect → [APPROVAL] → spec → [APPROVAL] → test-gen → dev → qa → review → [APPROVAL] → docsApproval gates pause execution until human confirms:
- Architecture decisions are sound
- Specifications are correct
- Code is ready for merge
TDD Enforcement
All development workflows enforce Test-Driven Development via pre-phase hooks:
- test-gen must create tests that fail initially (Red phase)
- tdd-enforcement hook runs BEFORE dev phase and verifies:
- Tests exist (
testsCreated > 0) - Tests are FAILING
- Tests exist (
- dev is blocked with
TDD VIOLATIONif tests pass or don't exist - dev implements minimal code to make tests pass (Green phase)
- review validates TDD was followed
// Pre-phase hooks in workflow definition
{
agent: 'dev',
name: 'TDD Green Phase',
prePhaseHooks: ['tdd-enforcement'], // Blocks if tests don't fail
}See .claude/skills/tdd-workflow.md for detailed TDD patterns.
Orchestrator Pattern (Default)
A central coordinator manages the workflow, invoking specialists in sequence.
Structure
graph TD
CC["Claude Code\n(sequencer)"]
CC --> A["/architect"]
CC --> S["/spec"]
CC --> T["/test-gen"]
CC --> D["/dev"]
CC --> R["/review"]When to Use
- New feature development (sequential phases)
- Bug fixes (diagnose → test → fix → verify)
- Refactoring (test → change → test)
Twilio Example: New Voice Feature
/architect "Add voicemail recording"
Phase 1: /architect
→ Design: functions/voice/voicemail.protected.js
→ Pattern: Record verb with callback
Phase 2: /spec
→ Input: CallSid, RecordingUrl
→ Output: TwiML with Record, callback handling
Phase 3: /test-gen
→ Unit tests for TwiML generation
→ Integration test for recording callback
Phase 4: /dev
→ Implement voicemail.protected.js
→ Make tests pass
Phase 5: /review
→ Security: Protected endpoint ✓
→ Patterns: Matches voice/CLAUDE.md ✓
Phase 6: /test
→ All tests passing ✓Handoff Protocol
Each agent passes structured context to the next:
## Handoff: /architect → /spec
Files identified:
- functions/voice/voicemail.protected.js (create)
- __tests__/unit/voice/voicemail.test.js (create)
Architecture decisions:
- Use Record verb with transcribe=true
- Store recordings via callback to /voice/recording-complete
- Protected endpoint (requires Twilio signature)
Ready for: Detailed specificationPeer-to-Peer Pattern
Agents work in parallel on related but independent tasks. For true parallel coordination with inter-agent messaging, see Agent Teams Pattern above.
Structure
graph TD
U["User"]
U --> A["Agent A"]
U --> B["Agent B"]
A <--> BWhen to Use
- Debugging (analyze logs while reviewing code)
- Multi-file changes (update function + tests simultaneously)
- Documentation (code + docs in parallel)
Twilio Example: Debugging SMS Failure
Parallel agents:
Agent A: /twilio-logs
→ Analyzing debugger for error 30003
→ Found: Unreachable destination +1555...
Agent B: /dev (investigating)
→ Reading send-sms.protected.js
→ Found: No validation on 'to' parameter
Sync point:
→ Root cause: Invalid phone number passed through
→ Fix: Add E.164 validation before API callCoordination Mechanism
Agents share findings through explicit sync points:
## Sync: Debug Analysis Complete
Agent A findings:
- Error 30003: Unreachable destination
- 5 failures in last hour
- All to same number pattern
Agent B findings:
- No input validation in send-sms
- Phone number from user input without sanitization
Combined insight:
- Need E.164 validation before Twilio API call
- Add test for invalid phone number handlingHierarchical Pattern
A lead agent delegates to sub-agents, which may further delegate.
Structure
graph TD
LA["Lead Agent\n/architect"]
VT["Voice Team"]
ST["SMS Team"]
VFT["Verify Team"]
LA --> VT
LA --> ST
LA --> VFT
VT --> VS["/spec"] & VD["/dev"]
ST --> SS["/spec "] & SD["/dev "]
VFT --> VFS["/spec "] & VFD["/dev "]When to Use
- Multi-channel features (voice + SMS + web)
- Large refactoring (multiple subsystems)
- Complex IVR with nested menus
Twilio Example: Multi-Channel Notification System
Lead: /architect "Build notification system with voice, SMS, and email fallback"
Delegation:
├── Voice Team
│ ├── /spec voice notification (call + TTS)
│ └── /dev functions/voice/notify.protected.js
│
├── SMS Team
│ ├── /spec SMS notification
│ └── /dev functions/messaging/notify.protected.js
│
└── Orchestration Team
├── /spec fallback logic (voice → SMS → email)
└── /dev functions/helpers/notify-orchestrator.private.js
Rollup:
- Each team reports completion + test status
- Lead verifies integration
- Final /review of complete systemSupervision Protocol
Lead agent maintains oversight:
## Status: Multi-Channel Notification
Voice Team: COMPLETE
- notify-voice.protected.js ✓
- Tests passing ✓
SMS Team: IN_PROGRESS
- notify-sms.protected.js ✓
- Tests: 1 failing (rate limit handling)
Verify Team: BLOCKED
- Waiting on SMS team completion
Lead action: Assist SMS team with rate limit testEvaluator Pattern
An evaluator agent assesses work quality against standards.
Structure
graph LR
P["Producer\n/dev"] --> E["Evaluator\n/review"] --> D["Decision\nPASS/FAIL"]
E --> F["Feedback Loop"]
F -.-> PWhen to Use
- Code review gates
- Security audits
- TDD verification (tests must fail first)
Twilio Example: Code Review Gate
/review functions/voice/transfer-call.protected.js
Evaluation criteria (from CLAUDE.md):
□ ABOUTME comments present
✓ Line 1-2: Descriptive ABOUTME
□ No hardcoded credentials
✓ Uses context.TWILIO_ACCOUNT_SID
□ Error handling present
✓ Validates 'to' parameter
✗ Missing try/catch around client call
□ Protected endpoint for sensitive operations
✓ .protected.js suffix
□ Tests exist and pass
✓ 4 unit tests passing
Verdict: NEEDS_CHANGES
Reason: Add try/catch for Twilio API callAgent Teams Pattern
Real parallel coordination with inter-agent messaging. Unlike subagents (which share the parent's context and can only report back), teammates have their own context windows and communicate directly with each other.
Structure
graph TD
LA["Lead Agent\n(delegate mode)"]
LA -- "shared task list" --> A["Teammate A"]
LA -- "shared task list" --> B["Teammate B"]
LA -- "shared task list" --> C["Teammate C"]
A <-- "direct messaging" --> B
B <-- "direct messaging" --> C
A <-- "direct messaging" --> CWhen to Use
- Bug debugging with competing hypotheses (3 investigators challenge each other)
- Multi-lens code review (security + performance + tests in parallel)
- Parallel QA + review after implementation
- Cross-layer changes (functions + agents + config)
Comparison: Subagents vs Agent Teams vs Feature Factory
| Aspect | Subagents | Agent Teams | Feature Factory |
| Context | Shared with parent | Own window per teammate | Own SDK session |
| Communication | Return results to caller | Message each other + shared tasks | Phase handoffs |
| Parallelism | Sequential | Parallel | Sequential |
| Token cost | Lowest | ~2-3x | Medium |
| Resumable | Yes | No | Yes |
| Best for | Sequential workflows | Adversarial/parallel work | CI/CD automation |
Twilio Example: Bug Fix with Competing Hypotheses
/team bug-fix "SMS webhook returning 500 for empty body"
Parallel investigators:
Teammate "code-tracer":
→ Reading send-sms.protected.js
→ Found: No body validation, crashes on undefined
→ Confidence: HIGH
Teammate "log-analyst":
→ Checking debugger for error 11200
→ Found: 500 errors from /messaging/send-sms endpoint
→ Confirms code-tracer's finding
Teammate "config-checker":
→ Checking webhook config, env vars
→ All correct — rules out configuration issue
→ Supports code-level root cause
Lead synthesis:
→ Root cause: Missing body validation
→ Fix: Add null check before Twilio API call
→ Regression test: Empty body should return 400, not 500Quality Gates
Teammates are subject to TeammateIdle and TaskCompleted hooks:
- test-gen tasks: Tests must exist AND fail
- dev tasks: Tests must pass + lint clean
- qa tasks: Coverage >= 80%
- All tasks: No hardcoded credentials
Pattern Selection Guide
Is work sequential with clear phases?
├── Yes → Sequential Pipeline
│ Start with /architect, follow phase sequence
│
└── No → Do agents need to discuss findings?
├── Yes → Agent Teams Pattern
│ Use /team command
│
└── No → Can tasks run independently?
├── Yes → Peer-to-Peer Pattern
│ Run multiple commands in parallel
│
└── No → Is there natural hierarchy?
├── Yes → Hierarchical Pattern
│ Lead agent delegates to teams
│
└── No → Evaluator Pattern
Quality gate with feedback loopTwilio-Specific Considerations
Webhook Chains = Orchestrator
Twilio webhooks naturally follow orchestrator pattern:
graph LR
IC["Incoming Call"] --> IVR["IVR Menu"] --> GI["Gather Input"] --> RC["Route Call"] --> REC["Record"] --> HU["Hangup"]
IC -.-> H1["Handler 1"]
IVR -.-> H2["Handler 2"]
GI -.-> H3["Handler 3"]
RC -.-> H4["Handler 4"]
REC -.-> H5["Handler 5"]Each handler is a function that passes control to the next via TwiML action URLs.
Real-Time Features = Peer Pattern
ConversationRelay and real-time features benefit from peer coordination:
graph TD
VH["Voice Handler\n(TwiML setup)"] <--> WS["WebSocket AI\n(LLM backend)"]
VH --> SS["Shared State\n(context)"]
WS --> SSMulti-Channel = Hierarchical
Voice + SMS + Verify solutions need hierarchical coordination:
User Verification Flow
├── Channel Selection (Lead)
│ ├── Voice: Call with OTP
│ ├── SMS: Text with code
│ └── Email: Link with token
└── Verification Check (Shared)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.

