memory

Efficient context and knowledge management.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "memory" with this command: npx skills add alicoder001/agent-skills/alicoder001-agent-skills-memory

Memory Management

Efficient context and knowledge management.

Instructions

  1. Working Memory Model

┌─────────────────────────────────────────┐ │ WORKING MEMORY │ ├─────────────────────────────────────────┤ │ • Current task goal │ │ • Relevant file contents │ │ • Recent decisions │ │ • Active constraints │ └─────────────────────────────────────────┘ ↑ Load ↓ Store ┌─────────────────────────────────────────┐ │ LONG-TERM MEMORY │ ├─────────────────────────────────────────┤ │ • Project structure │ │ • User preferences │ │ • Past solutions │ │ • Domain knowledge │ └─────────────────────────────────────────┘

  1. Context Prioritization

Order of importance for context:

Priority Content Action

🔴 Critical Current task, active file Always keep

🟠 High Related files, types Keep if relevant

🟡 Medium Project structure Summarize

🟢 Low History, logs Forget if needed

  1. Information Retention

What to Remember

✅ Keep in context:

  • Current task objective
  • File being modified
  • Type definitions in use
  • Recent error messages
  • User preferences

❌ Safe to forget:

  • Already processed files
  • Resolved errors
  • Intermediate calculations
  • Verbose logs
  1. Context Summarization

When context grows too large:

Summarization Rules

  1. Files: Keep imports, types, key functions
  2. Errors: Keep message, remove stack trace
  3. Logs: Keep last 10 lines
  4. History: Keep decisions, remove process

Example

Before (verbose): "I looked at file A, then file B, noticed pattern X, then explored file C, found issue Y, traced it to..."

After (summarized): "Analyzed A, B, C. Found: pattern X, issue Y in C."

  1. Session State Pattern

// Conceptual session state interface SessionMemory { // Always retain task: { goal: string; status: 'planning' | 'executing' | 'verifying'; progress: number; };

// Retain while relevant context: { activeFiles: string[]; recentDecisions: string[]; constraints: string[]; };

// Summarize or forget history: { summary: string; keyInsights: string[]; }; }

  1. Knowledge Retrieval

Before Starting New Task

  1. Check: Have I seen this before?

  2. Recall: What approach worked?

  3. Apply: Use proven patterns

  4. Adapt: Modify for current context

  5. Memory Hygiene

Per-Turn Cleanup

After completing a step:

  1. ✅ Task still relevant? Keep
  2. ❓ Might need later? Summarize
  3. ❌ No longer needed? Forget

End of Task

  1. Extract learnings

  2. Update knowledge base

  3. Clear working memory

  4. Context Window Management

Token Budget Allocation

CategoryBudget
System prompt10%
Task context30%
Active code40%
Conversation20%

When Near Limit

  1. Summarize conversation history
  2. Remove resolved issues
  3. Keep only relevant code sections
  4. Preserve critical context

References

  • Working Memory in LLMs

  • Context Compression

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

solid

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

reasoning

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

collaboration

No summary provided by upstream source.

Repository SourceNeeds Review