CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

context-compression

上下文膨胀、工具结果撑爆窗口、Agent 决策质量随轮次下降时使用——上下文压缩的三个动机(长度成本、思考质量、上下文焦虑)、压缩即检索的机制、六种压缩策略实测数据、生产级五层分层压缩、四条设计原则,以及用子 Agent 隔离代替压缩。

Quality

88%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-constructed knowledge skill: lean, concrete, and dense with non-obvious experimental and production data, with actionable templates, thresholds, and commands throughout. Its weaknesses are mild redundancy between the pitfalls section and earlier sections, and externally-pointed references (companion code and book chapter) that do not resolve inside the skill bundle.

Suggestions

Ship the referenced paths inside the skill bundle — create references/ (or scripts/) copies of the chapter2/context-compression/ experiment and book/chapter2.md content so the 配套代码 and 深度阅读 links resolve when the skill is deployed standalone.

Trim the 常见陷阱 section to only the pitfalls not already stated in 核心原则 and 实践模式 (e.g., keep the statistics-counting and vague-subagent-task items; drop the 阈值触发+批量压缩 and 对噪声做摘要 recaps) to remove duplicate tokens.

Consider moving the full six-strategy comparison table to a reference file (e.g., references/strategy-comparison.md), keeping in SKILL.md only the winner (上下文感知) and the headline numbers, so the main body loads even lighter.

DimensionReasoningScore

Conciseness

The body is dense and data-rich with no explanation of concepts Claude already knows — every section carries non-obvious curated knowledge (75% token reduction figures, the 80% threshold with worked numbers 102,400/128K, the five-layer production ladder, the circuit-breaker finding). The only trimmable redundancy is the 常见陷阱 section, which recaps points already made in 核心原则 and 实践模式 (e.g., 阈值触发+批量压缩, 对噪声做摘要). Fits anchor 4 ('efficient; minor instances that could be trimmed') rather than anchor 5, which requires every token to earn its place.

4 / 5

Actionability

For an instruction-only skill the guidance is fully concrete: a copy-paste-ready compression prompt template ("Given the search query: {query}" / "Current context: {context}"), the 80%-of-window trigger threshold, the [COMPRESSED] marker convention, an explicit preserve list (decisions/constraints/failures/citations), a semantic-completeness rule with a worked example (Sutskever, May 2024), and exact commands ("python experiment.py -s context_aware", "-m moonshot-v1-128k", "CONTEXT_WINDOW_SIZE=128K"). Per the rubric's code_vs_instruction note, absence of code blocks is not penalized when guidance is this actionable — matches anchor 5.

5 / 5

Workflow Clarity

Decision paths are clearly sequenced: the five-layer ladder is explicitly ordered 按代价从低到高, a recommended default (自适应窗口化) is named with its three mechanisms, and 常见陷阱 functions as error-recovery guidance. No validation checkpoints are required since the skill teaches design rather than a destructive or batch procedure, so the rubric cap doesn't apply; but the body is organized as reference knowledge rather than an explicit step-by-step procedure with checkpoints, which keeps it below anchor 5 and at anchor 4 ('clear sequence with most checkpoints present') for the decision workflow it does define.

4 / 5

Progressive Disclosure

The body is well-sectioned (何时使用 → 核心原则 → 实践模式 → 常见陷阱 → 配套代码 → 深度阅读) and appropriately sized (~100 lines) for a self-contained overview, with the six-strategy comparison table carrying headline data inline and deeper reproduction delegated to the companion code section. However, per the guideline to score against the actual bundle structure, the referenced paths "chapter2/context-compression/" and "book/chapter2.md" do not exist in the bundle (no references/, scripts/, or assets/ directories), so the outward references dangle. This sits between anchor 4 (good structure, references mostly clear) and anchor 3 (references present but not clearly resolvable) — the strong sectioning keeps it at 4.

4 / 5

Total

17

/

20

Passed

Description

88%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: third-person, concise, with an explicit 'use when' clause carrying three concrete trigger conditions and a comprehensive enumeration of the skill's content. The only gaps are a few missing trigger synonyms (token limit, history compaction) and slight breadth introduced by the sub-agent isolation topic.

DimensionReasoningScore

Specificity

The description enumerates multiple concrete content areas with no padding: "三个动机(长度成本、思考质量、上下文焦虑)", "压缩即检索的机制", "六种压缩策略实测数据", "生产级五层分层压缩", "四条设计原则", "用子 Agent 隔离代替压缩" — comprehensive coverage of what the skill delivers. Anti-drift check: this matches anchor 5 better than anchor 4 ('several specific actions; minor gaps') because every clause names a distinct, specific deliverable.

5 / 5

Completeness

Both what and when are explicit: the opening "...时使用——" is a concrete 'use when' clause with three specific trigger conditions, followed by a clear enumeration of what the skill covers. This matches the anchor-5 pattern ('clearly and explicitly answers both what AND when with concrete trigger phrases'); it is clearly above anchor 4, where 'when' is only adequately specific.

5 / 5

Trigger Term Quality

Natural trigger phrases users would actually say are present: "上下文膨胀", "工具结果撑爆窗口", "Agent 决策质量随轮次下降", plus domain keywords 上下文/压缩/窗口. A few natural variations are missing (e.g., token limit, summarizing/compacting conversation history, long-task degradation synonyms). Anchor 5's 'comprehensive synonyms coverage' isn't quite met, and anchor 3's 'missing common variations' understates the coverage present — 4 is the best fit.

4 / 5

Distinctiveness Conflict Risk

The trigger conditions (window overflow from tool results, decision-quality degradation over rounds) carve out a clear niche distinct from generic summarization skills. Minor overlap risk comes from the "用子 Agent 隔离代替压缩" clause, which pulls the skill toward sub-agent delegation / general agent-design territory. Fits anchor 4 ('mostly distinct; minor overlap risk') rather than anchor 5.

4 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

bojieli/ai-agent-book

Path

skills/context-compression/SKILL.md

Reviewed

Table of Contents

Is this your skill?

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.