memory-workflow
Skill4 starsChanged 10 months agoMITView on GitHub
Templates and examples for memory file management. STAR format template, what to record vs not record, good/bad examples. Use when updating memory or at session start/end.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- LaoK2017/Agent-Skillstheir own version, first seen Mar 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- LaoK2017/Agent-Skills★ 0same name
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 repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Claude Agent SDK PatternsSkill
- delegation-templatesSkill
- deploymentSkill
- frontend-patternsSkill
- Google ADK PatternsSkill
- LLM Evaluation PatternsSkill
- LLM Observability PatternsSkill
- orchestrator-workflowsSkill
- react-native-best-practicesSkill
- skill-creatorSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 136
Problem: No rationale, no links.
- Distinctive: line 153
Lessons: Keep last 5-10 most relevant
- Very specific: line 156
If memory exceeds target, move detailed content to docs/ and keep pointers.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Workflow
Templates and detailed guidance for maintaining agent memory files.
For mandatory protocol, see: .claude/rules/memory-protocol.md
STAR Format Template
For bugs, issues, and significant learnings:
### [Title] (Date)
**Situation**: [Context - what was the problem/scenario]
**Task**: [Goal - what needed to be accomplished]
**Action**: [Steps taken to resolve/implement]
**Result**: [Outcome and verification]
**Fix**: [File:line reference or specific change made]
**Pattern**: [Reusable lesson/gotcha for future work]
**Full details**: [Link to detailed doc in docs/ or docs/archive/]Example
### Phase 2A Bug #2: Message History Empty (2025-12-03)
**Situation**: GET /sessions/{id}/messages returned 0 messages despite active conversations
**Task**: Fix chat history endpoint to show all messages
**Action**: Manually append user message + extend agent events to `runner_session.events` before save
**Result**: All 6 messages retrieved (3 user + 3 assistant), history working
**Fix**: `agent_service.py:209-215` - `events.append(user_msg)` + `events.extend(result)`
**Pattern**: ADK `run_async()` only RETURNS events, doesn't modify `session.events` (manual append required)
**Full details**: [docs/archive/handoffs/SESSION_HANDOFF_BUGFIX.md]What to Record
DO Record
| Category | Examples |
| Project config | GCP project ID, region, stack |
| Current status | Phase, what's complete, what's pending |
| Key decisions | 1-2 line rationale + link to docs |
| Critical paths | File paths, commands, gotchas |
| Lessons learned | STAR format entries |
| Doc pointers | Links with brief description |
DON'T Record
| Category | Where It Goes Instead |
| Full implementation details | docs/ |
| Step-by-step guides | docs/ |
| Duplicate info from docs | Just link to docs |
| General technical patterns | .claude/skills/ |
Memory File Structure
# Agent Name - Role
Last updated: YYYY-MM-DD
## Project Config
- GCP Project: [project-id]
- Region: europe-west1
- Stack: Python/FastAPI/Google ADK
## Current Status
- Phase: [current phase]
- Complete: [bullet list]
- Pending: [bullet list]
- See: [link to detailed phase doc]
## Key Decisions
| Decision | Rationale | Details |
|----------|-----------|---------|
| [What] | [1-2 line why] | [link to ADR] |
## Critical Commands
```bash
# Start backend
cd backend && uvicorn main:app --reload
# Run tests
pytest backend/tests/ -vLessons Learned
[STAR format entries]
Documentation Map
| Topic | Document | Contents |
| [topic] | [path] | [brief description] |
---
## Good vs Bad Examples
### Bad: Too Detailed
```markdown
## Session Storage Implementation
We implemented GCS session storage by first creating a bucket using
terraform with the following configuration... [500 more lines]Problem: This belongs in docs/, not memory.
Good: Contextualized Index
## Session Storage
- Decision: GCS CloudStorageMemory (not Firestore)
- Rationale: Simpler, cheaper, ADK-native
- Full details: [docs/adr/002-gcs-session-storage.md]Why it works: Brief context + pointer to full doc.
Bad: No Context
## Decisions
- Use GCS
- Use Cloud RunProblem: No rationale, no links.
Good: With Rationale
## Key Decisions
| Decision | Rationale | Details |
|----------|-----------|---------|
| GCS over Firestore | Simpler, ADK-native, 10x cheaper | [ADR-002] |
| Cloud Run over GKE | Managed, auto-scaling, no K8s overhead | [ADR-003] |Size Guidelines
- Target: 10-15k characters (2.5-3.75k tokens)
- Max sections: 6-8 major sections
- Lessons: Keep last 5-10 most relevant
- Archive old lessons: Move to
docs/archive/lessons/if needed
If memory exceeds target, move detailed content to docs/ and keep pointers.
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.

