context-balance
Use when context is overloaded or compression may have removed requirements, constraints, evidence, blockers, or decisions.
by ihabkhaled★ 16 GitHub stars
Install context-balance in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Context Balance
Core principle
Semantic compliance is stronger than literal compliance. Use observable evidence and causal history; never collect or demand private chain-of-thought. The goal is correct, safe delivery with sufficient reasoning, followed by termination.
Procedure
- Lock the primary objective, mandatory requirements, Definition of Done, and current evidence before changing any classification or budget.
- Identify the specific observable signal. Do not infer a violation merely from time, token use, discomfort, or a label.
- Preserve required meaning while removing redundancy and load only missing authoritative context. Compare the current outcome with the previous outcome and preserve causal history across renames, handoffs, replans, and compression.
- Produce the compact record:
required fields, preserved fields, missing knowledge, source. Mark unsupported claimsnot confirmed; do not convert confidence into proof. - Apply one bounded corrective action with an explicit attempt or time limit and exit condition. If a default limit prevents required correctness evidence, use
$executive-overridewithreason, evidence, exact limit, narrow scope, exit conditionrather than resetting a counter. - Revalidate only the affected requirement or policy. Report
a sufficient context snapshot without unrelated bulkand return to productive work.
Repository runtime
Apply this procedure inside the installed .ai/ framework. Record observable state in the relevant JSON ledger and route detailed judgment to the linked rules and guides.
Semantic boundaries
- System, platform, user, repository, domain, safety, security, permission, and destructive-action controls remain higher priority.
- Equivalent actions share history when their hypothesis, expected evidence, target failure, and intended outcome are unchanged.
- Preserve immutable parent, caused-by, and delegated-from identifiers across handoffs and context compression; missing ancestry makes depth
not confirmed, never zero. - Activity alone is not progress. Completion and blockers require their structured evidence contracts.
- Critical correctness evidence cannot be discarded because a retry, critic, verification, context, or delegation budget expired.
- Security-negative cases are selected from explicit requirements and the observed trust boundary (identity, permission, ownership/tenant, denial response, and side effects). An agent may mark a case inapplicable only with evidence, not by shrinking Definition of Done.
- An override permits one extension only. Do not renew or stack overrides unless materially new evidence justifies a separately recorded override; repeated renewal without convergence must stop and report the unresolved condition.
Common mistakes
- Equating smallest possible context with smallest sufficient context.
- Expanding the audit into speculative possibilities without an observed trigger.
- Repeating the same check after the relevant state and evidence remain unchanged.
- Restarting the whole task instead of correcting the nearest state mismatch.
Stop condition
Stop this control when the observable state is truthful, the required evidence or classification is restored, and the next audit would inspect unchanged facts. Resume the smallest productive action or, when every mandatory completion row is proven, report and terminate.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the context-balance skill do?
Use when context is overloaded or compression may have removed requirements, constraints, evidence, blockers, or decisions.
How do I install the context-balance skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the context-balance skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…