memory-systems
Skill2 starsChanged 8 months agoMITView on GitHub
Twilio development skill: memory-systems
12 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
- ai4brands-design/claude-skillstheir own version, first seen Mar 22, 2026
- fefogarcia/approved-skillstheir own version, first seen Feb 10, 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 versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- muratcankoylan/Agent-Skills-for-Context-Engineering★ 18ksame 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
- xfstudio/skills★ 9same name
- rohunvora/my-claude-skills★ 6same name
- ai4brands-design/claude-skills★ 2same name
- fefogarcia/approved-skills★ 2same name
2 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
- 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
- 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
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
8
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 68
After completing a file
- Distinctive: line 69
After tests pass/fail
- Distinctive: line 70
After making an architectural decision
- Distinctive: line 71
Before switching to a different task
- Distinctive: line 72
When resuming after interruption
- Distinctive: line 80
Use Twilio Sync Documents for state that needs to persist across webhook invocations or sessions:
- Distinctive: line 194
Use Sync for complex state:
- Distinctive: line 215
Use Twilio's built-in cookie support:
“Common” is measured: kept by at least 6 in 10 of the 11 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: memory-systems description: State tracking and session memory management. Use when implementing cross-session persistence, managing Sync documents for state, or designing memory patterns for Twilio prototypes.
Memory Systems for Twilio Prototypes
This skill covers state tracking and memory management for Twilio development sessions.
Memory Types
| Memory Type | Scope | Duration | Storage |
| Session | Current conversation | Until session ends | In-context |
| Project | Across sessions | Persistent | Files (CLAUDE.md, git) |
| Call/Message | Per interaction | Until call/message ends | Twilio + logs |
| Workflow | Per feature/task | Until task complete | Todo list, commits |
Session Memory (In-Context)
Track progress within the current Claude Code session.
What to Track
- Current task/feature being built
- Files created or modified
- Tests written and their status
- Key decisions made
- Blockers encountered
Session Summary Format
Maintain a mental summary after each major action:
## Session: Voice IVR Feature
### Completed
- [x] Created functions/voice/ivr-menu.js
- [x] Added 3-option menu (sales, support, billing)
- [x] Unit tests passing (4/4)
### In Progress
- [ ] Integration test for full flow
### Decisions Made
- Using Polly.Amy voice for consistency
- DTMF-only input (no speech) for reliability
- Action URLs use relative paths
### Files Modified
- functions/voice/ivr-menu.js (new)
- functions/voice/ivr-handler.protected.js (new)
- __tests__/unit/voice/ivr-menu.test.js (new)
### Next Steps
- Write integration test
- Run /review for approvalWhen to Update Session Memory
- After completing a file
- After tests pass/fail
- After making an architectural decision
- Before switching to a different task
- When resuming after interruption
Project Memory (Persistent)
Information that persists across sessions via files and Twilio Sync.
Twilio Sync for Agent State
Use Twilio Sync Documents for state that needs to persist across webhook invocations or sessions:
// Store agent state
const syncService = client.sync.v1.services(context.SYNC_SERVICE_SID);
await syncService.documents.create({
uniqueName: `agent-state-${sessionId}`,
data: {
workflowPhase: 'dev',
testsWritten: ['unit/voice.test.js'],
decisions: ['Use Conference for warm transfer'],
lastUpdated: new Date().toISOString()
},
ttl: 86400 // 24hr TTL for ephemeral state
});
// Retrieve state
const doc = await syncService.documents(`agent-state-${sessionId}`).fetch();
const state = doc.data;When to use Sync vs files:
| Storage | Use When |
| Sync Documents | Webhook state, cross-function sharing, real-time updates |
| Git/files | Code, configuration, permanent documentation |
| In-context | Current session only, will be lost on restart |
CLAUDE.md as Project Memory
Root CLAUDE.md stores:
- Project standards and conventions
- Available commands and workflows
- Environment variable requirements
- Testing requirements
Subdirectory CLAUDE.md stores:
- API-specific patterns
- TwiML examples
- Webhook parameter references
- Common error codes
Git History as Memory
# Recent decisions
git log --oneline -10
# What changed for a feature
git log --oneline --grep="voice IVR"
# Files touched recently
git diff --name-only HEAD~5Todo.md as Task Memory
# Project Todo
## In Progress
- [ ] Voice IVR menu
## Pending
- [ ] SMS keyword routing
- [ ] Verify 2FA flow
## Completed
- [x] Initial project setup
- [x] Voice incoming-call handler
- [x] Messaging incoming-sms handlerCall/Message State Memory
Track state across Twilio webhook invocations.
The Challenge
Twilio webhooks are stateless. Each request is independent:
Call 1: /voice/incoming-call
↓ (new HTTP request)
Call 2: /voice/gather-handler
↓ (new HTTP request)
Call 3: /voice/transferState Tracking Patterns
Pattern 1: URL Parameters
Pass state in TwiML action URLs:
// In incoming-call.js
twiml.gather({
action: `/voice/menu-handler?attempt=1&caller=${encodeURIComponent(event.From)}`,
numDigits: 1
});
// In menu-handler.js
const attempt = parseInt(event.attempt, 10) || 1;
const caller = event.caller;
if (attempt >= 3) {
// Max retries reached
}Pattern 2: Twilio Sync
Use Sync for complex state:
// Store state
const syncService = await client.sync.v1.services(context.SYNC_SERVICE_SID);
await syncService.documents.create({
uniqueName: `call-${event.CallSid}`,
data: {
stage: 'menu',
selections: [],
startTime: new Date().toISOString()
}
});
// Retrieve state
const doc = await syncService.documents(`call-${event.CallSid}`).fetch();
const callState = doc.data;Pattern 3: Session Cookies
Use Twilio's built-in cookie support:
// Set cookie
const response = new Twilio.Response();
response.setCookie('menu_selection', '2');
response.appendHeader('Content-Type', 'text/xml');
response.setBody(twiml.toString());
// Read cookie (in next request)
const previousSelection = event.menu_selection;State Logging for Debugging
Log state transitions for debugging:
// ABOUTME: Logs call state transitions for debugging.
// ABOUTME: Append-only log pattern for call flow tracing.
const logStateTransition = (callSid, fromState, toState, data) => {
console.log(JSON.stringify({
timestamp: new Date().toISOString(),
callSid,
transition: `${fromState} → ${toState}`,
data
}));
};
// Usage
logStateTransition(event.CallSid, 'menu', 'transfer', { digit: event.Digits });Workflow Memory
Track progress through development workflows.
Git as Source of Truth
Git history is the primary activity log:
- Commits capture what changed and why
todo.mdcaptures session progresslearnings.mdcaptures discoveries (capture → promote → clear)DESIGN_DECISIONS.mdcaptures architectural rationale
# What was done recently
git log --oneline -10
# What files changed for a feature
git log --name-only --oneline --grep="voice IVR"
# Diff since last tag/checkpoint
git diff HEAD~5 --name-onlyDocumentation Flywheel
The documentation flywheel uses file-based communication:
- Hooks write suggestions to
.claude/pending-actions.json - Agent reads file before commits
- File is cleared after actions addressed
Hook runs → pending-actions.json → Agent reads → Takes action → Clears fileWorkflow State Tracking
For multi-phase pipeline workflows, track phase completion:
## Workflow: new-feature "Voice IVR"
Status: IN_PROGRESS
### Phase History
| Phase | Agent | Status | Timestamp |
|-------|-------|--------|-----------|
| 1 | /architect | COMPLETE | 10:23 |
| 2 | /spec | COMPLETE | 10:35 |
| 3 | /test-gen | COMPLETE | 10:52 |
| 4 | /dev | IN_PROGRESS | 11:05 |
### Artifacts Created
- spec.md (phase 2)
- __tests__/unit/voice/ivr.test.js (phase 3)
- functions/voice/ivr.js (phase 4, in progress)
### Blockers
- None
### Decisions Log
- Phase 1: Chose sequential pipeline pattern
- Phase 2: DTMF-only, 3 options
- Phase 3: 6 test cases definedMemory Anti-Patterns
Don't Store
- Full webhook payloads (too large)
- Passing test output (no longer relevant)
- Resolved error messages
- Old file versions (git handles this)
Don't Repeat
- Information already in CLAUDE.md
- Standard Twilio API signatures
- Boilerplate patterns
- Previously stated decisions
Don't Persist
- Session-specific debugging info
- Temporary workarounds
- One-time configuration steps
Memory Retrieval Patterns
"What did we decide about X?"
# Search git commits
git log --all --oneline --grep="X"
# Search CLAUDE.md files
grep -r "X" --include="CLAUDE.md" ."What files did we change for feature Y?"
# If committed
git log --name-only --oneline --grep="Y"
# If in progress
git status"What was the error we fixed?"
# Check recent test changes
git diff HEAD~3 __tests__/
# Check Twilio logs — SID-targeted if you have one
# validate_debugger(resourceSid: "CA...") for a specific resource
# get_debugger_logs for time-window browsingImplementation Checklist
For new Twilio features, track:
- Requirements understood
- Architecture decided
- Tests written (failing)
- Implementation complete (tests passing)
- Code reviewed
- Documentation updated
- Committed to git
This checklist serves as memory of what's done and what remains.
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.

