Agent Skillsaiming-lab/MetaClaw › context-window-management

context-window-management

GitHub

用于长对话或多轮智能体会话中管理上下文窗口。通过主动摘要、优先级排序和文件存储,防止上下文丢失或达到令牌限制,保持当前任务聚焦并优化资源使用。

memory_data/skills/context-window-management/SKILL.md aiming-lab/MetaClaw

Trigger Scenarios

多轮智能体会话 上下文接近令牌限制 长对话需要状态持久化

Install

npx skills add aiming-lab/MetaClaw --skill context-window-management -g -y
More Options

Non-standard path

npx skills add https://github.com/aiming-lab/MetaClaw/tree/main/memory_data/skills/context-window-management -g -y

Use without installing

npx skills use aiming-lab/MetaClaw@context-window-management

指定 Agent (Claude Code)

npx skills add aiming-lab/MetaClaw --skill context-window-management -a claude-code -g -y

安装 repo 全部 skill

npx skills add aiming-lab/MetaClaw --all -g -y

预览 repo 内 skill

npx skills add aiming-lab/MetaClaw --list

SKILL.md

Frontmatter
{
    "name": "context-window-management",
    "category": "agentic",
    "description": "Use this skill in long conversations or multi-turn agentic sessions where context may be lost or the conversation is approaching token limits. Summarize, prioritize, and compact context proactively before it becomes a problem."
}

Context Window Management

Proactive summarization:

  • At natural breakpoints, summarize key decisions and state into a compact form.
  • Keep the active context focused on the current task; move resolved context to a summary.

Prioritization:

  • Most important: current task description, constraints, and already-confirmed decisions.
  • Less important: verbose tool outputs that have been processed; intermediate reasoning.

File-based memory: For long-running sessions, write important state to a file rather than keeping it all in the conversation.

Avoid: Repeatedly re-reading large files you already have in context; re-running expensive searches for information already retrieved.

Version History

  • 922caf3 Current 2026-07-25 11:08

Same Skill Collection

memory_data/skills/agent-task-handoff/SKILL.md
memory_data/skills/async-communication-etiquette/SKILL.md
memory_data/skills/audience-aware-communication/SKILL.md
memory_data/skills/auth-and-authorization-patterns/SKILL.md
memory_data/skills/avoid-acting-on-assumptions/SKILL.md
memory_data/skills/avoid-hallucinating-specifics/SKILL.md
memory_data/skills/avoid-scope-creep/SKILL.md
memory_data/skills/clarify-ambiguous-requests/SKILL.md
memory_data/skills/codebase-navigation/SKILL.md
memory_data/skills/data-validation-first/SKILL.md
memory_data/skills/debug-systematically/SKILL.md
memory_data/skills/do-not-retry-without-diagnosis/SKILL.md
memory_data/skills/git-workflow/SKILL.md
memory_data/skills/graceful-error-recovery/SKILL.md
memory_data/skills/idempotent-script-design/SKILL.md
memory_data/skills/input-validation-and-sanitization/SKILL.md
memory_data/skills/plan-before-multi-step-execution/SKILL.md
memory_data/skills/prioritize-by-impact/SKILL.md
memory_data/skills/professional-email-drafting/SKILL.md
memory_data/skills/robust-error-handling-in-scripts/SKILL.md
memory_data/skills/secrets-management/SKILL.md
memory_data/skills/secure-code-review/SKILL.md
memory_data/skills/source-evaluation/SKILL.md
memory_data/skills/sql-best-practices/SKILL.md
memory_data/skills/structured-logging-and-observability/SKILL.md
memory_data/skills/structured-progress-update/SKILL.md
memory_data/skills/structured-research-workflow/SKILL.md
memory_data/skills/structured-step-by-step-reasoning/SKILL.md
memory_data/skills/task-decomposition/SKILL.md
memory_data/skills/technical-writing-clarity/SKILL.md
memory_data/skills/test-before-ship/SKILL.md
memory_data/skills/tool-selection-strategy/SKILL.md
memory_data/skills/uncertainty-acknowledgment/SKILL.md
memory_data/skills/verify-before-irreversible-action/SKILL.md
memory_data/skills/visualization-selection/SKILL.md

Metadata

Files
0
Version
922caf3
Hash
1d6471a1
Indexed
2026-07-25 11:08

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 17:18
浙ICP备14020137号-1 $Гость$