Agent skill
muratcankoylan-agent-skills-for-context-engineering-memory-systems
Context management and persistent memory systems for AI agents. Use when optimizing context windows or building agent memory systems.
Install this agent skill to your Project
npx add-skill https://github.com/cpa03/blueprintify/tree/main/.opencode/skill/muratcankoylan-agent-skills-for-context-engineering-memory-systems
SKILL.md
Context Engineering & Memory Systems
Purpose
Optimize AI agent context management and build persistent memory systems.
Context Engineering
Principles
- Relevance: Include only contextually relevant information
- Hierarchy: Organize context by importance
- Freshness: Prioritize recent information
- Compression: Summarize long contexts
Techniques
Context Window Management
- Sliding window for conversations
- Summarization for long documents
- Chunking for large codebases
- Priority scoring for relevance
Context Injection
- System prompts
- Few-shot examples
- Retrieved documents
- Conversation history
Memory Systems
Short-Term Memory
- Current conversation context
- Active task information
- Recent actions and results
Long-Term Memory
- Persistent knowledge storage
- Learned patterns and solutions
- Historical decisions
Implementation
File-Based Memory
.opencode/memory/
├── cmz-knowledge.md # Solutions and patterns
├── cmz-issues.md # Known issues and resolutions
└── cmz-evolution.md # Change history
Vector Memory (Future)
- Embeddings for semantic search
- Similarity matching
- Automatic retrieval
Context Engineering Patterns
Pattern 1: Progressive Disclosure
Start with minimal context, expand as needed.
Pattern 2: Selective Retrieval
Retrieve only relevant information from memory.
Pattern 3: Hierarchical Summarization
Maintain summaries at different levels of detail.
Pattern 4: Temporal Weighting
Weight recent information more heavily.
Best Practices
- Regular Cleanup: Remove outdated context
- Explicit Storage: Store important learnings explicitly
- Retrieval Testing: Test memory retrieval accuracy
- Context Monitoring: Monitor context size and relevance
Integration
Works with CMZ self-learning protocol for continuous improvement.
Usage
Apply when:
- Managing large codebases
- Long-running conversations
- Building agent memory
- Optimizing context usage
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ci-pipeline-update
Updates CI/CD pipelines for DevOps Engineer
obra-superpowers-test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
typescript-refactor
Safely refactor TypeScript code while maintaining type safety and test coverage. Includes verification steps.
obra-superpowers-using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
react-component-create
Create new React components following project patterns and best practices. Includes proper typing, testing, and documentation.
madappgang-claude-code-debugging-strategies
Universal debugging strategies and techniques applicable across all technology stacks. Use when approaching unknown bugs or need language-agnostic debugging methodology.
Didn't find tool you were looking for?