Token导航 LogoToken导航

Agent Skill · 研究检索

context-management(上下文管理)

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

context-management 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 51,124。

总安装 593周安装 24GitHub Stars 26下载 186核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/outfitter-dev/agents --skill context-management

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

context-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。适用于上下文管理策略研究、信息组织方法或 Agent 协作流程设计等场景。通过关键词检索返回相关文档、工具或实施建议。

安装命令为 npx skills add https://github.com/outfitter-dev/agents --skill context-management。使用前请确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。

来源仓库内路径:skills/context-management

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/outfitter-dev/agents --skill context-managemen…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

context-management 怎么安装?

在终端执行 npx skills add https://github.com/outfitter-dev/agents --skill context-management。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

context-management 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

context-management 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

context-management 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

context-management 用的人多吗?

公开数据是累计安装 593 次,近一周安装 24 次,下载 186 次,GitHub 26 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

context-management 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
context-management

上下文管理 · 本页

59326接触敏感数据MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Context Management

Manage your context window, survive compaction, persist state across turns.

<when_to_use>

  • Planning long-running or multi-step tasks
  • Coordinating multiple subagents
  • Approaching context limits (degraded responses, repetition)
  • Need to preserve state across compaction or sessions
  • Orchestrating complex workflows with handoffs

NOT for: simple single-turn tasks, quick Q&A, tasks completing in one response

</when_to_use>

Claude Code operates in a ~128K token context window that compacts automatically as it fills. When compaction happens:

What survives:

  • Task state (full task list persists)
  • Tool results (summarized)
  • User messages (recent ones)
  • System instructions

What disappears:

  • Your reasoning and analysis
  • Intermediate exploration results
  • File contents you read (unless in tool results)
  • Decisions you made but didn't record

The consequence: Without explicit state management, you "wake up" after compaction with amnesia — you know what to do, but not what you've done or decided.

Tasks: Your Survivable State

Tasks are not just a tracker — they're your persistent memory layer. Use TaskCreate, TaskUpdate, TaskList, and TaskGet to manage state that survives compaction.

What Goes in Tasks

CategoryExample
Current workImplementing auth refresh flow (status: in_progress)
Completed workJWT validation logic added to middleware (status: completed)
Discovered workHandle token expiry edge case (status: pending)
Key decisionsEmbed in task description: "Using RS256 per security review"
Agent handoffs[reviewer] Review auth implementation + metadata: {agentId: "abc123"}
BlockersCreate blocker task, use blockedBy field

Task Discipline

Exactly one in_progress at any time. Call TaskUpdate to mark in_progress before starting.

Mark complete immediately. Don't batch completions — TaskUpdate with completed as you finish.

Include agent IDs for resumable sessions in task metadata.

Expand dynamically. TaskCreate as you discover work; don't front-load everything.

Action-oriented subjects. Use verbs: "Implement X", "Fix Y", "Review Z"

Status Flow

pending → in_progress → completed
                ↓
         (blocked → TaskCreate for blocker, add blockedBy)

If blocked, don't mark complete. Create a new task for the blocker and link with addBlockedBy.

Pre-Compaction Pattern

As context fills, ensure tasks capture progress. Use TaskUpdate to add details to in_progress task description:

Task: Implementing token refresh
Description:
  - Refresh endpoint: POST /api/auth/refresh
  - Token rotation: enabled
  - Refresh window: 5 minutes before expiry
  - Remaining: validation logic

Decisions embedded in completed task descriptions. Current state detailed in active task. Future work queued as pending.

<pre_compaction>

Pre-Compaction Checklist

Run through this when context is filling (you'll notice: slower responses, repetition, degraded reasoning):

  1. Capture progress — What's done? TaskUpdate completed tasks with outcomes in description.
  2. Record decisions — What did you decide? Why? Put in task descriptions.
  3. Note current state — Where exactly are you in the current task? TaskUpdate the in_progress task with specifics.
  4. Queue discovered work — What did you find that needs doing? TaskCreate as pending.
  5. Mark dependencies — What needs what? Use addBlockedBy in TaskUpdate.
  6. Include agent IDs — Any background agents? Record IDs in task metadata.

Example: Before Compaction

Bad (state will be lost):

- [x] Research auth approaches
- [ ] Implement auth
- [ ] Test auth

Good (state survives):

- [x] Research auth approaches → middleware + JWT (see src/auth/README.md)
- [ ] [in_progress] Implement JWT refresh flow
    - Using jose library (already in deps)
    - Endpoint: POST /api/auth/refresh
    - Handler started in src/auth/refresh.ts:15
    - Remaining: validation logic, token rotation
- [ ] Add refresh flow tests (after impl)
- [ ] [reviewer] Security review auth module (after tests)

</pre_compaction>

Delegation for Context Preservation

Main conversation context is precious. Every file you read, every search result, every intermediate thought consumes tokens. Subagents run in isolated contexts — only their final output returns.

Default Stance

If a task can be delegated, delegate it.

Delegation Decision Tree

Task arrives
├── Exploration/research? → Explore agent (always)
├── Multi-file reading? → Subagent (summarizes for you)
├── Independent subtask? → Background agent
├── Specialized expertise? → Domain agent (reviewer, tester, etc.)
└── Simple, focused, single-file? → Main agent (maybe)
Note: Plugin agents require the plugin:agent-name format (e.g., outfitter:reviewer). Built-in agents (Explore, Plan, general-purpose) work without prefix. Use /agents to see available agents.

Context-Saving Patterns

Research delegation — Instead of reading 10 files:

{
  "description": "Find auth implementation",
  "prompt": "Locate authentication-related files, summarize the auth flow",
  "subagent_type": "Explore"
}

Main agent receives: concise summary, not 10 file contents.

Parallel review — Instead of sequential analysis:

// Single message, multiple calls, all run_in_background: true
{ "subagent_type": "outfitter:reviewer", "run_in_background": true, "prompt": "Security review..." }
{ "subagent_type": "outfitter:analyst", "run_in_background": true, "prompt": "Performance review..." }

Main agent: stays lean, collects results when ready.

Background execution — For independent work:

{
  "subagent_type": "outfitter:tester",
  "run_in_background": true,
  "prompt": "Run integration tests for auth module"
}

Continue other work; retrieve with TaskOutput later.

Task Integration

Track delegated work in tasks:

[analyst] Research caching strategies (pending, metadata: {taskId: "def456"})
[engineer] Implement cache layer (pending, blockedBy: analyst task)
[reviewer] Review cache implementation (pending, blockedBy: engineer task)
[tester] Validate cache behavior (pending, blockedBy: reviewer task)

When background agents complete, TaskUpdate status and process results.

What NOT to Delegate

  • Direct user Q&A needing conversation history
  • Simple edits to files already in context
  • Final synthesis requiring your judgment

<cross_session>

Cross-Session Patterns

For work spanning multiple sessions, use episodic memory MCP server.

Prerequisites: Cross-session patterns require an episodic-memory MCP server to be configured. If unavailable, skip this section — Tasks handle single-session persistence.

Saving State

At session end or before long pause:

{
  "tool": "episodic-memory:save",
  "content": {
    "task": "Implementing auth refresh flow",
    "status": "in_progress",
    "completed": ["JWT validation", "Refresh endpoint structure"],
    "remaining": ["Token rotation logic", "Tests", "Security review"],
    "decisions": {
      "library": "jose",
      "algorithm": "RS256",
      "refresh_window": "5 minutes"
    },
    "files_modified": ["src/auth/refresh.ts", "src/auth/middleware.ts"],
    "next_steps": "Implement token rotation in refresh.ts:42"
  }
}

Restoring State

At session start:

{
  "tool": "episodic-memory:search",
  "query": "auth refresh implementation"
}

Then reconstruct tasks from saved state using TaskCreate.

When to Use Cross-Session

  • Multi-day projects
  • Complex refactors with many steps
  • Work that will be interrupted
  • Handing off to future sessions

For single-session work, Tasks alone suffice.

</cross_session>

Workflow Integration

At Task Start

  1. TaskCreate with initial scope
  2. If complex: use Plan subagent to explore, preserve main context
  3. TaskUpdate first task to in_progress

During Execution

  1. TaskUpdate as work progresses
  2. Delegate exploration to subagents
  3. Mark completed immediately (no batching)
  4. TaskCreate for discovered work
  5. Note decisions in completed task descriptions

Approaching Compaction

  1. Run pre-compaction checklist
  2. Ensure current state captured in in_progress task description
  3. Record any background agent IDs in task metadata

After Compaction

  1. TaskList to read task state (it persists)
  2. Resume from in_progress task
  3. Use saved details to continue without re-exploration

At Task Completion

  1. TaskUpdate final tasks to complete with outcomes in description
  2. If multi-session: save to episodic memory
  3. Report summary to user

ALWAYS:

  • Use Tasks for any work over 2-3 steps
  • TaskUpdate before significant actions
  • Mark completed immediately, not batched
  • Include agent IDs in task metadata for resumable sessions
  • Delegate exploration to subagents (preserves main context)
  • Record decisions in completed task descriptions
  • Run pre-compaction checklist when context fills

NEVER:

  • Rely on conversation history surviving compaction
  • Keep large research results in main context (delegate or summarize)
  • Have multiple in_progress tasks simultaneously
  • Stop early due to context concerns (persist state instead)
  • Batch multiple completions together
  • Leave tasks vague ("do the thing" → "Implement refresh endpoint")

平台分布

Claude Code

29.37%
按下载量换算55

windsurf

25.1%
按下载量换算47

trae

18.85%
按下载量换算35

OpenCode

13.4%
按下载量换算25

Codex

8.21%
按下载量换算15

github-copilot

3.4%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills