context-loading
Load minimum necessary context into agent context windows. Prevents token bloat, reduces cost, and improves focus. Only load what the current task needs.
pinned to #f47f948updated 2 weeks ago
Ask your AI client: “install skills/context-loading”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/context-loadingmetahub onboarded this repo on the author's behalf.
If you own github.com/DevelopersGlobal/ai-agent-skills on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
64
Last commit
2 weeks ago
Latest release
published
- #ai
- #ai-agents
- #antigravity
- #artificial-intelligence
- #claude
- #claude-code-plugin
- #claude-skills
- #codex
- #cursor
- #skills
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.f47f948· 2 weeks ago
Kind-specific
31Skill: SKILL.md present
found at skills/context-loading/SKILL.md · frontmatter source: SKILL.md
Skill: body content present
330 words · 2,122 chars · 9 sections
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrentf47f948warn2 weeks ago
Contents
Overview
More context is not better context. Irrelevant context dilutes attention, increases cost, and slows inference. This skill enforces disciplined context loading: only the files, docs, and history that the current task requires.
When to Use
- Before starting any complex agent task
- When designing system prompts for production agents
- When context windows are filling up
Process
Step 1: Identify Required Context
- List the files/docs the agent needs to read to complete THIS specific task.
- For each item, ask: "Can the agent complete the task without this?" If yes, don't include it.
- Prioritize: system prompt → task definition → directly relevant code → supporting references.
Verify: Every item in context is directly necessary for the current task.
Step 2: Summarize, Don't Dump
- Long conversation history → summarize to key decisions and current state.
- Large files → extract only the relevant functions/sections.
- Entire docs → extract only the relevant sections.
- Previous agent output → extract only the conclusions and next steps.
Verify: No item in context exceeds what's needed from that source.
Step 3: Set Context Budgets
- Define token allocation for each context section:
- System prompt: ≤ 2,000 tokens
- Task definition: ≤ 500 tokens
- Code context: ≤ 4,000 tokens
- Conversation history (summarized): ≤ 1,000 tokens
- Stay well within model context limits (leave 30% buffer for output).
Verify: Total prompt fits within 70% of model context limit.
Step 4: Refresh Context for New Tasks
- Don't carry over context from a completed task to a new task.
- Start each distinct task with a fresh, minimal context.
- Re-introduce only what the new task genuinely needs.
Verification
- Context items limited to task-required items only
- Long content summarized before inclusion
- Token budget defined and respected
- Context window at ≤70% capacity
References
Reviews
No reviews yet. Be the first.
Related
Planning With Files
Claude Code skill implementing Manus-style persistent markdown planning — the workflow pattern behind the $2B acquisition.
Guizang Ppt Skill
AI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
orchestration-patterns
>
mh install skills/context-loading