context-engineering
当用户说『AI越来越笨/答非所问/忘了前面的设定』『上下文太长』『token烧太快』『RAG召回不准』,或要设计/优化 agent 的提示、记忆、检索、工具编排时使用。把『上下文窗口里到底该放什么』当成一门工程:审计相关性·冗余·预算·衰减…
от zhaoxinghua09-cell619 установок в других каталогах
Установить context-engineering в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate(外部公开评测门禁文档)
English
When to use
- The model starts giving off-topic answers or forgetting earlier settings ("context pollution / decay").
- Designing / optimizing an agent's prompt, memory, RAG retrieval or tool orchestration.
- Token burn is high; the context window is too long; memory orchestration needs refinement.
- Trigger words: "context engineering", "long-context optimization", "RAG recall".
Usage
- Run
context_budget.py --calculateto estimate current token budget and remaining window. - Set
--budget_limit(int) and--model_namefor model-specific advice. context_budget.py --auditproduces a relevance/redundancy checklist.- For doc-style tasks, read the in-file function library for memory-decay and retrieval-recall helpers.
Flow
- Context audit: scan interaction history; flag low-relevance, stale or duplicate info.
- Budget accounting: compute current token share and remaining-window risk.
- Trimming: apply the four-dimension standard (relevance / redundancy / budget / decay); compress memory.
- Retrieval tuning: adjust RAG recall params and tool order so key data loads first.
- Gate check: gate new incoming info so new tokens don't overwrite old key settings.
- Closed loop: re-inject the optimized context into the model; log adjustments.
Evidence & safety
- Evidence: TBD. Version: 1.0.1. Security: no independent scan (TBD).
中文
何时用
- 当用户反馈模型"答非所问"、"遗忘设定"或遭遇"上下文污染"、"上下文衰减"等质量问题时。
- 在进行 Agent 设计、优化提示词(Prompt)、记忆管理或 RAG 检索策略的技术调试与评估场景。
- 监控对话成本,涉及"token 预算烧太快"、"上下文窗口过长"或需要精细化"记忆编排"时的决策节点。
- 触发关键词包含"context engineering"、"长上下文优化"、"RAG 召回"及具体指标时自动介入。
用法
- 执行核心计算脚本
context_budget.py,启用--calculate模式以输出当前对话的 Token 预算与剩余窗口估算。 - 配置
--budget_limit参数(整数)以设定最大可接受上下文长度,配合--model_name指定目标模型优化建议。 - 调用
context_budget.py --audit生成包含相关性、冗余度评分的详细清单,用于审查历史会话质量。 - 对于文档型任务,可通过读取
context_budget.py文件内的函数库获取预定义的"内存衰减"与"检索召回"算法接口。
流程
- 上下文审计:扫描当前交互历史,识别低相关性、过期或重复信息(使用审计清单生成器)。
- 预算核算:调用
context_budget.py计算当前输入占用的 Token 比例及剩余窗口风险。 - 信息裁剪:依据四维度标准(相关性·冗余·预算·衰减)删除不必要节点,实施记忆压缩。
- 检索优化:调整 RAG 召回参数与工具编排顺序,确保关键数据被优先加载。
- 门禁校验:对新进入的信息进行"上下文门控"检查,防止新 Token 覆盖旧的关键设定。
- 闭环反馈:将优化后的上下文结构重新注入模型,并记录本次调整日志用于下一轮参考。
证据与安全声明
- 证据:TBD(暂无评测/徽章链接;产生后在此更新实际链接)
- 版本:1.0.1
- 安全:未做独立安全扫描(TBD),结论待补;补全前不作推荐背书。
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Glob - 03
Grep - 04
Write - 05
WebFetch - 06
WebSearch
FAQ
Что делает скилл context-engineering?
当用户说『AI越来越笨/答非所问/忘了前面的设定』『上下文太长』『token烧太快』『RAG召回不准』,或要设计/优化 agent 的提示、记忆、检索、工具编排时使用。把『上下文窗口里到底该放什么』当成一门工程:审计相关性·冗余·预算·衰减 四维度,给出裁剪/检索/记忆/门禁四步流程与可运行脚本。触发词:上下文工程、context engineering、上下文窗口、上下文污染、上下文衰减、context rot、token预算、RAG召回、记忆编排、agent上下文、长上下文优化。
Как установить скилл context-engineering?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл context-engineering запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…