Moai Alfred Context Budget
Agent Buildingmoai-alfred-context-budgetMoai Alfred Context Budget is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Claude Code context window optimization strategies, JIT retrieval, progressive loading, memory file patterns, and cleanup practices. Use when optimizing context usage, managing large projects, or implementing efficient workflows.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/context-management/moai-alfred-context-budget/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/moai-alfred-context-budget, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
What It Does
Claude Code context budget (100K-200K tokens)의 효율적 관리 전략, progressive disclosure, JIT retrieval, memory file 구조화 방법을 제공합니다.
When to Use
- ✅ Context limit 도달 위험성 있을 때
- ✅ 대규모 프로젝트의 context 관리 필요
- ✅ Session handoff 준비
- ✅ Memory file 구조 설계/정리
Context Budget Overview
Total: 100K-200K tokens
├── System Prompt: ~2K
├── Tools & Instructions: ~5K
├── Session History: ~30K
├── Project Context: ~40K
└── Available for Response: ~23K
Progressive Disclosure Pattern
- Metadata (always): Skill name, description, triggers
- Content (on-demand): Full SKILL.md when invoked
- Supporting (JIT): Examples, templates when referenced
JIT Retrieval Principles
- Pull only what you need for immediate step
- Prefer
Exploreover manual file hunting - Cache critical insights for reuse
- Remove unnecessary files regularly
Best Practices
✅ DO:
- Use Explore for large searches
- Cache results in memory files
- Keep memory files < 500 lines each
- Update session-summary.md before task switches
- Archive completed work
❌ DON'T:
- Load entire src/ directory upfront
- Duplicate context between files
- Store memory files outside
.moai/memory/ - Leave stale session notes (archive or delete)
- Cache raw code (summarize instead)
Learn more in reference.md for detailed JIT strategy, memory patterns, context budget calculations, and management practices.
Related Skills: moai-alfred-practices, moai-cc-memory