moai-foundation-context
FeaturedManages context window optimization, session state persistence, and token budget allocation for multi-agent workflows. Use for token budget management, context limits, or session handoff across agents.
AI & Automation 1,207 stars
221 forks Updated today Apache-2.0
Install
Quality Score: 99/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
## Quick Reference
Enterprise Context and Session Management - Unified context optimization and session state management for Claude Code with 200K token budget management, session persistence, and multi-agent handoff protocols.
Core Capabilities:
- 200K token budget allocation and monitoring
- Session state tracking with persistence
- Context-aware token optimization
- Multi-agent handoff protocols
- Progressive disclosure and memory management
- Session forking for parallel exploration
When to Use:
- Session initialization and cleanup
- Long-running workflows exceeding 10 minutes
- Multi-agent orchestration
- Context window approaching limits exceeding 150K tokens
- Model switches between Haiku and Sonnet
- Workflow phase transitions
Key Principles:
Avoid Last 20%: Performance degrades in final fifth of context window.
Aggressive Clearing: Execute /clear every 1-3 messages for SPEC workflows.
Lean Memory Files: Keep each file under 500 lines.
Disable Unused MCPs: Minimize tool definition overhead.
Quality Over Quantity: 10% relevant context beats 90% noise.
---
## Implementation Guide
### Features
- Intelligent context window management for Claude Code sessions
- Progressive file loading with priority-based caching
- Token budget tracking and optimization alerts
- Selective context preservation across /clear boundaries
- MCP integration context persistence
### When to Use
- Managing large codebases exceeding 150K token limits
- Optimizing token usage in long...
Details
- Author
- modu-ai
- Repository
- modu-ai/moai-adk
- Created
- 12 months ago
- Last Updated
- today
- Language
- Go
- License
- Apache-2.0
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
context-optimizer
Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.
2,862 Updated 1 weeks ago
rohitg00 AI & Automation Listed
context
Context Manager - Token Budget Controller
12 Updated 6 days ago
samibs AI & Automation Listed
context-engineering
Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an agent, or trimming what gets injected into a task. SKIP: persisting knowledge across sessions (use agent-memory); semantic recall tuning (use semantic-memory-mcp).
15 Updated 1 months ago
komluk