Maximize context window efficiency, reduce latency, and prevent lost-in-middle issues through strategic masking and compaction. Use when token budgets are tight, tool outputs flood the context, conversations drift from intent, or latency spikes from cache misses.
65
58%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.github/skills/common/common-context-optimization/SKILL.mdQuality
Discovery
75%Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.
The description has strong completeness with an explicit 'Use when' clause covering multiple trigger scenarios, and it occupies a distinctive niche. However, the capabilities described lean toward abstract goals ('maximize efficiency,' 'reduce latency') rather than concrete discrete actions, and the trigger terms are somewhat jargon-heavy rather than matching natural user language.
Suggestions
Replace abstract goals with concrete actions, e.g., 'Masks irrelevant tool outputs, compacts conversation history, prunes stale context segments' instead of 'maximize context window efficiency.'
Add more natural-language trigger terms users might actually say, such as 'context too long,' 'running out of tokens,' 'too many tool calls,' or 'conversation is too big.'
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | The description names a domain (context window management) and mentions some actions like 'strategic masking and compaction,' but the specific concrete actions are somewhat vague—'maximize efficiency' and 'reduce latency' are more like goals than discrete actions. It doesn't list multiple clearly distinct operations. | 2 / 3 |
Completeness | The description clearly answers both 'what' (maximize context window efficiency, reduce latency, prevent lost-in-middle issues through masking and compaction) and 'when' (token budgets are tight, tool outputs flood context, conversations drift, latency spikes from cache misses) with an explicit 'Use when' clause. | 3 / 3 |
Trigger Term Quality | Includes some relevant technical terms like 'token budgets,' 'context window,' 'latency,' 'cache misses,' and 'tool outputs,' but these are fairly specialized jargon. A user might say 'context is too long' or 'running out of tokens' rather than 'lost-in-middle issues' or 'compaction.' Missing common natural-language variations. | 2 / 3 |
Distinctiveness Conflict Risk | This skill occupies a clear niche around context window optimization, masking, and compaction. The specific triggers (token budgets, lost-in-middle, cache misses, context flooding) are unlikely to conflict with other skills, making it distinctly identifiable. | 3 / 3 |
Total | 10 / 12 Passed |
Implementation
42%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
The skill has good structural organization and progressive disclosure, keeping the overview lean while pointing to detailed references. However, it suffers from a lack of actionability — there are no concrete examples, executable code, or sample inputs/outputs showing what masked output or compacted state looks like. The anti-patterns section is redundant with the main content, and the workflow lacks validation steps for what are essentially destructive context-modification operations.
Suggestions
Add at least one concrete before/after example showing raw tool output being masked into a summary placeholder, so Claude knows exactly what the output format should look like.
Add a concrete example of compacted state format (e.g., a sample Memory File or System Prompt update) rather than deferring all implementation details to reference files.
Add validation checkpoints to the masking and compaction workflows — e.g., 'Verify the summary preserves all data points referenced in subsequent turns' or 'Confirm compacted state includes the original user goal before dropping dialogue history.'
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | Mostly efficient but has some redundancy: the 'Problem/Solution' framing adds modest overhead, and the references section duplicates links already given inline (e.g., masking.md and implementation.md are linked twice). The anti-patterns section largely restates what was already said in the numbered sections. | 2 / 3 |
Actionability | The guidance is abstract and descriptive rather than concrete. Steps like 'Mask by rewriting history to replace raw data with summary placeholder' and 'Trigger compaction every 10 turns' lack executable code, specific commands, or concrete examples of what a masked output or compacted state actually looks like. The real implementation is deferred entirely to reference files. | 1 / 3 |
Workflow Clarity | Steps are listed in sequence for masking and compaction, and there are clear triggers (50 lines/1KB, 10 turns/8k tokens). However, there are no validation checkpoints or feedback loops — no way to verify that masking preserved critical data or that compaction didn't lose essential state. For operations that could lose context irreversibly, this is a significant gap. | 2 / 3 |
Progressive Disclosure | Content is well-structured as an overview with clear one-level-deep references to masking.md, compaction.md, and implementation.md. The main file stays concise and navigation is straightforward with well-signaled links. | 3 / 3 |
Total | 8 / 12 Passed |
Validation
81%Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.
Validation — 9 / 11 Passed
Validation for skill structure
| Criteria | Description | Result |
|---|---|---|
metadata_version | 'metadata.version' is missing | Warning |
metadata_field | 'metadata' should map string keys to string values | Warning |
Total | 9 / 11 Passed | |
4c72e76
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.