context-engineering
БесплатноЗапускает вложенные скриптыНе проверенDiagnose and improve context usage in AI agent sessions. Use when context grows large, instructions are being missed, output quality degrades, token usage…
от himadriganguly422 установки в других каталогахОб этом скилле
Context Engineering
Context is the information an agent can access while working on a task. As a session grows, more instructions, conversation history, tool output, files, and skills may compete for that working context.
This skill provides a structured procedure for diagnosing context pressure, identifying likely failure modes, applying structural fixes, and verifying the result.
The measurements produced by the bundled scripts are heuristics and proxies, not direct measurements of model attention, reasoning quality, or semantic understanding.
Safety and Scope
Use this skill as decision support, not as an authoritative diagnostic system.
Before running the bundled scripts:
- Review the script source if the session directory contains sensitive information.
- Confirm that the supplied path contains only data you are comfortable allowing the script to read.
- Back up important data before applying automated or agent-assisted changes.
- Treat all token counts and ratios as estimates.
- Do not assume that a threshold in this skill is appropriate for every model or runtime.
- Do not expose private session contents in reports, examples, or bug reports.
The scripts are designed to read local files. They do not require network access or third-party Python packages.
When to Use
Load this skill when one or more of these signals appear:
- Output quality drop — responses become vague, repetitive, or miss constraints that were previously stated.
- Instruction drift — the agent stops following important project or task constraints.
- Token cost increase — context or output usage grows without an obvious increase in task complexity.
- Long-context retrieval problems — information becomes difficult for the agent to locate in a large context.
- Context overload — the runtime is approaching its available context capacity.
- Skill overload — too many skills or references are being loaded for the current task.
- Session handoff — a long session needs to be compressed into a useful resume brief.
- New project setup — the project needs an explicit context organization strategy.
Do not use this skill as a substitute for:
- choosing a model;
- evaluating model quality;
- debugging a runtime implementation;
- prompt wording for a single isolated instruction;
- measuring model attention directly;
- claiming that a particular context threshold is universally optimal.
Procedure
Step 1 — Audit the Available Context
If the runtime exposes a session directory that matches the documented input layout, run:
python scripts/context_audit.py \
--session-dir PATH \
--window-size WINDOW_SIZE
For example:
python scripts/context_audit.py \
--session-dir ./session-fixture \
--window-size 128000
The --window-size value should correspond to the effective context
capacity relevant to the session being analyzed.
Do not assume that 128,000 tokens is universally correct.
The audit reports:
- estimated context size;
- estimated window utilization;
- instruction-survival proxy;
- stale-content proxy;
- repetition proxy;
- largest context contributors.
The audit cannot observe information that is not represented in the supplied session directory.
If a runtime does not expose its session data in the expected layout, do not attempt to guess its private storage format.
Use the estimator instead:
python scripts/token_estimator.py \
--dir . \
--recursive \
--top 20
This gives a static estimate of the largest files in a project.
Step 2 — Classify the Problem
Use the measurements together with the actual task behavior.
The five working categories used by this skill are:
| Class | Typical signal | Possible cause |
|---|---|---|
| Poisoning | Incorrect information continues to influence later work | An incorrect or obsolete statement entered the working context |
| Clash | The agent alternates between incompatible rules | Conflicting instructions or sources |
| Confusion | Old or irrelevant details influence the current task | Stale context remains active |
| Lost-in-middle | Important information becomes harder to retrieve from long context | Relevant information is buried among unrelated material |
| Overload | Context becomes truncated, crowded, or difficult to manage | Too much information is active at once |
These are practical categories, not established clinical or scientific diagnoses.
A session may have more than one category.
When overload is clearly present, reducing unnecessary context is usually a sensible first intervention because it can simplify other problems.
Step 3 — Apply a Structural Fix
Prefer structural changes over repeatedly rewriting the same prompt.
Load:
references/progressive-disclosure-patterns.md
when deciding how to reorganize context.
Common interventions include:
- Move stable project knowledge into reference files.
- Compress obso
Установить context-engineering в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл context-engineering?
Diagnose and improve context usage in AI agent sessions. Use when context grows large, instructions are being missed, output quality degrades, token usage rises, or a project needs deliberate context organization.
Как установить скилл context-engineering?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл context-engineering запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic