Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

context-degradation环境退化

Agent Skill

context-degradation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

648

周安装

27

GitHub Stars

25

下载量

216
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:context-degradation(环境退化)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/context-degradation
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill context-degradation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill context-degradation

简介

context-degradation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于上下文退化和环境分析相关的研究检索任务。
  • 通过 GitHub 仓库安装,使用 npx skills add 命令添加技能。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Context Degradation Monitor

Detects context window degradation and prescribes corrective actions before accuracy drops.

Severity Zones

ZoneToken RangeStatusAction
Green< 32KHealthyNormal operation
Yellow32K - 64KCautionBegin selective compression
Orange64K - 100KWarningCompress aggressively; summarize completed phases
Red100K - 140KDangerSpawn fresh subagent for remaining work; pass only essential context
Critical> 140KSevereHalt complex reasoning; compress immediately; do not attempt multi-step tasks

Reference: Models advertise 200K but reliability drops past 32K. "Lost in the middle" effect: middle tokens have 20-40% lower recall past 100K.

Early Warning Indicators

Symptoms that context degradation is affecting output quality (regardless of token count):

  1. Repeated tool calls — Agent re-reads files already read in same session
  2. Contradictory reasoning — Later steps contradict earlier decisions
  3. Missing prior context — Agent "forgets" task scope or constraints stated at session start
  4. Over-explanation — Agent re-explains concepts already established
  5. Stale references — Agent references file paths or task IDs that were resolved earlier

If 2+ indicators are present, treat as one zone higher than token count suggests.

Corrective Routing by Zone

Yellow (32-64K):

  • Invoke Skill({skill: 'context-compressor'}) at the current phase boundary
  • Remove completed phase content from active context
  • Keep: current task spec, key decisions, in-progress file list

Orange (64-100K):

  • Invoke Skill({skill: 'context-compressor'}) — aggressive summarization
  • Write phase summary to .claude/context/tmp/phase-summary-{date}.md
  • Prune: all resolved task details, intermediate research, superseded plans

Red (100-140K):

  • Do NOT continue complex multi-step tasks in current agent
  • Spawn a fresh subagent with only the compressed summary as context
  • Current agent: write handoff doc → call TaskUpdate(completed) with handoff path in metadata

Critical (>140K):

  • Halt immediately
  • Write emergency summary: what was done, what remains, key decisions
  • Route to session-handoff skill
  • Invoke Skill({skill: 'session-handoff'}) before context window forces truncation

Detection Checklist (Run at Each Phase Boundary)

[ ] Token count below 32K? → Green, no action
[ ] Token count 32-64K? → Yellow, begin compression
[ ] Token count 64-100K? → Orange, compress aggressively
[ ] Token count 100K+? → Red/Critical, spawn fresh agent
[ ] 2+ early warning indicators? → Upgrade one severity zone
[ ] Compression reminder file exists? → Invoke context-compressor immediately

Integration

  • Pairs with: context-compressor, context-compressor, session-handoff
  • Called by: planner (at plan start), developer (after each phase), router (before large spawns)
  • Trigger: Check at every phase boundary, not just when problems appear

Iron Laws

  1. ALWAYS check token count at every phase boundary — not just when problems appear or after completing a large task.
  2. NEVER continue complex multi-step tasks past 100K tokens in the same agent context — spawn a fresh subagent with a compressed handoff instead.
  3. ALWAYS treat 2+ early warning indicators as one severity zone higher than the raw token count suggests.
  4. ALWAYS invoke context-compressor at Yellow zone (32–64K) before context bloat becomes severe — prevention is cheaper than recovery.
  5. NEVER claim a task complete without writing a context summary when operating in Red or Critical zone — if it's not written down, the next agent won't know it happened.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Waiting until output quality degrades before checking contextBy the time quality drops, the context is already in Red/Critical zoneRun detection checklist at every phase boundary proactively
Continuing multi-step tasks past 100K tokens"Lost in the middle" effect causes 20–40% recall drop; decisions made early are forgottenSpawn fresh subagent at 100K with compressed context summary
Ignoring early warning indicators because token count looks fineIndicators are more reliable than raw token counts; a 30K session with 3 indicators is already YellowTreat 2+ indicators as one zone higher regardless of token count
Spawning a subagent without a written handoff documentSubagent starts from scratch, duplicating work or missing constraintsAlways write phase summary to .claude/context/tmp/ before spawning
Compressing context by deleting tool call results without summarizingCompression without summarization loses critical findings from earlier phasesSummarize completed phase outputs before pruning raw tool results

Memory Protocol (MANDATORY)

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.64%
按下载量换算79

Claude

27.31%
按下载量换算59

Cursor

19.35%
按下载量换算42

Gemini CLI

8.48%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/oimiragieo/agent-studio --skill context-degradation 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills