← Back to Skills

context-window-mgr

v1.0.0 approved AI/ML updated today
✅ Verified
⬇ Download Install Guide↓
🤖 Agent install commands (curl / MCP / Claude Desktop)
▸ curl one-liner
curl -L -o context-window-mgr.skill   "https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=ClaudeCode"
▸ MCP tool call (after registering Skill Store MCP)
{
  "tool": "download_skill",
  "arguments": {
    "skill_id": "e0f80375-5ddc-4990-8af4-af2994807807",
    "platform": "ClaudeCode"
  }
}
▸ Claude Desktop / Cursor MCP config (one-time)
{
  "mcpServers": {
    "skill-store": {
      "url": "https://aiskillstore.io/mcp/"
    }
  }
}
📖 Full agent API guide: /llms.txt  ·  MCP server card

Runtime context window management for AI agents — token budget estimation, message pruning, relevance reranking, and context splitting (zero dependencies)

# context-window # token-management # ai-agent # llm # pruning

Basic Info

Owner 👤 aiskillstore-team Category AI/ML Registered 2026-05-26 Last Updated 2026-05-26 Latest Version 1.0.0 Packaged At 2026-05-26 Vetting Status approved Downloads 0 Checksum (SHA256) c01f3730fe47a74b3a309b9d015d6752e99287fa9225526de323ef7cb3afc5b6

Installation

Compatible Platforms any

1
Install the skill using openclaw_skill_manager.py.
python openclaw_skill_manager.py --install context-window-mgr
2
Verify installation
python openclaw_skill_manager.py --list-installed
3
Install a specific version (optional)
python openclaw_skill_manager.py --install context-window-mgr --version 1.0.0
1
Download the skill package.
curl -O https://aiskillstore.io/v1/skills/e0f80375-5ddc-4990-8af4-af2994807807/download
2
Place it in the Claude Code commands directory.
unzip context-window-mgr.skill -d ~/.claude/commands/context-window-mgr/
3
Use it as a slash command in Claude Code.
/context-window-mgr
1
Download the Agent Skills package.
curl -O https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=ClaudeCodeAgentSkill
2
Unzip it into the Claude Code skills directory.
unzip context-window-mgr-agent-skill-*.skill -d ~/.claude/skills/context-window-mgr/
3
Restart Claude Code — the skill is auto-loaded at session start. No slash command needed.
1
Download the Cursor-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=Cursor
2
Unzip and place it in a permanent location.
unzip context-window-mgr-cursor-*.skill -d ~/.cursor/skills/context-window-mgr/
3
Add the MCP server config to .cursor/mcp.json, then restart Cursor.
cat ~/.cursor/skills/context-window-mgr/cursor_mcp_config.json
1
Download the Gemini CLI-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=GeminiCLI
2
Unzip and place it in a permanent location.
unzip context-window-mgr-geminicli-*.skill -d ~/.gemini/skills/context-window-mgr/
3
Add the MCP server config to ~/.gemini/settings.json, then restart Gemini CLI.
cat ~/.gemini/skills/context-window-mgr/gemini_settings_snippet.json
1
Download the Codex CLI-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=CodexCLI
2
Unzip and place it in a permanent location.
unzip context-window-mgr-codexcli-*.skill -d ~/.codex/skills/context-window-mgr/
3
Add the MCP server config to ~/.codex/config.toml, then restart Codex CLI.
cat ~/.codex/skills/context-window-mgr/codex_config_snippet.toml
1
Download the skill package via REST API.
GET https://aiskillstore.io/v1/skills/e0f80375-5ddc-4990-8af4-af2994807807/download
2
Place it in your agent platform's skills directory.
cp context-window-mgr.skill ./skills/
3
Fetch platform-specific details via the Install Guide API.
GET https://aiskillstore.io/v1/skills/e0f80375-5ddc-4990-8af4-af2994807807/install-guide?platform=CustomAgent

Security Vetting Report

Vetting Result APPROVED

Findings: ["메타데이터 경고: 권장 필드 없음: 'requirements' (SKILL.md v2 권장)", "메타데이터 경고: 권장 필드 없음: 'changelog' (SKILL.md v2 권장)", '정보: spec: usk/1.0 미선언 — v2 패키지로 처리됩니다. 자동 변환 및 에이전트 검색 기능을 사용하려면 USK v3로 업그레이드하세요.']

✅ No security risks found.

AI Review Stage

Reviewer gemini Risk Level 🟢 Low Review Summary AI 에이전트의 런타임 컨텍스트 창 관리를 위한 스킬로, 선언된 권한과 정적 분석 결과에 따라 안전하다고 판단됩니다.
Reasoning

스킬 메타데이터는 'context-window-mgr' 스킬이 토큰 예산 추정, 메시지 가지치기, 관련성 재순위 지정, 컨텍스트 분할 등 AI 에이전트의 런타임 컨텍스트 창 관리를 목적으로 함을 명확히 설명하고 있습니다. 특히, 'zero dependencies'와 'character-count-based token estimation (no tiktoken needed)'를 강조하여 외부 의존성이 없음을 밝히고 있습니다. 가장 중요한 보안 관련 정보인 `permissions` 필드는 `network: false`, `filesystem: false`, `subprocess: false`, `env_vars: []`로 명시되어 있어, 스킬이 외부 네트워크 통신, 파일 시스템 접근, 외부 프로세스 실행 권한을 전혀 요구하지 않음을 선언하고 있습니다. 이는 스킬의 잠재적 위험을 크게 낮춥니다. 제공된 정적 분석 결과 또한 `status: approved`, `red_flags_found: []`, `obfuscation_warnings: []`, `forbidden_exec_files_found: []`로 나타나, 코드 내에 악의적인 요소, 난독화, 금지된 실행 파일 등이 발견되지 않았음을 확인해 줍니다. 이는 선언된 권한과 실제 코드가 일치하며, 악의적 목적의 코드가 없다는 판단을 뒷받침합니다. 따라서, 스킬의 목적이 명확하고, 선언된 권한이 최소한이며, 정적 분석 결과에서도 어떠한 위험 요소도 발견되지 않았으므로, 이 스킬은 안전하게 사용될 수 있다고 판단됩니다.

Version History

Version USK v3 Vetting Status Packaged At Downloads Changelog
v1.0.0 approved 2026-05-26 ⬇ 0

Examples 7

Representative input/output examples for this skill. Agents can use these to understand how to invoke the skill and what output to expect.

estimate_budget — Claude model
# tokens# claude# budget

Estimate token usage for a message list

📥 Input
{
  "action": "estimate_budget",
  "messages": [
    {
      "content": "You are a helpful assistant.",
      "role": "system"
    },
    {
      "content": "What is the capital of France?",
      "role": "user"
    },
    {
      "content": "The capital of France is Paris.",
      "role": "assistant"
    }
  ],
  "model": "claude"
}
📤 Output
{
  "action": "estimate_budget",
  "ok": true,
  "result": {
    "context_limit": 200000,
    "estimated_tokens": 42,
    "model": "claude",
    "per_message": [
      {
        "role": "system",
        "tokens": 7
      },
      {
        "role": "user",
        "tokens": 9
      },
      {
        "role": "assistant",
        "tokens": 9
      }
    ],
    "remaining_tokens": 199958,
    "usage_percent": 0.021
  }
}
prune_oldest — remove messages over budget
# prune# budget# messages

Remove oldest messages when token budget is exceeded

📥 Input
{
  "action": "prune_oldest",
  "messages": [
    {
      "content": "First message about the weather.",
      "role": "user"
    },
    {
      "content": "It is sunny today.",
      "role": "assistant"
    },
    {
      "content": "Tell me about machine learning algorithms in detail.",
      "role": "user"
    },
    {
      "content": "Machine learning is a subset of artificial intelligence.",
      "role": "assistant"
    }
  ],
  "model": "generic",
  "token_budget": 30
}
📤 Output
{
  "action": "prune_oldest",
  "ok": true,
  "result": {
    "budget": 30,
    "estimated_tokens": 26,
    "messages": [
      {
        "content": "Tell me about machine learning algorithms in detail.",
        "role": "user"
      },
      {
        "content": "Machine learning is a subset of artificial intelligence.",
        "role": "assistant"
      }
    ],
    "original_count": 4,
    "pruned_count": 2
  }
}
rerank_by_relevance — query-based reranking
# rerank# relevance# query

Reorder messages by relevance to a query

📥 Input
{
  "action": "rerank_by_relevance",
  "messages": [
    {
      "content": "Tell me about Python programming.",
      "role": "user"
    },
    {
      "content": "What is the weather like today?",
      "role": "user"
    },
    {
      "content": "How do I write a Python function?",
      "role": "user"
    }
  ],
  "query": "Python coding",
  "top_n": 2
}
📤 Output
{
  "action": "rerank_by_relevance",
  "ok": true,
  "result": {
    "kept": 2,
    "messages": [
      {
        "content": "Tell me about Python programming.",
        "role": "user",
        "score": 0.85
      },
      {
        "content": "How do I write a Python function?",
        "role": "user",
        "score": 0.78
      }
    ],
    "original_count": 3,
    "query": "Python coding"
  }
}
inject_summary — replace pruned with summary
# summary# inject# pruning

Inject a summary message representing pruned context

📥 Input
{
  "action": "inject_summary",
  "messages": [
    {
      "content": "Current task: fix the login bug.",
      "role": "user"
    },
    {
      "content": "I will investigate the authentication module.",
      "role": "assistant"
    }
  ],
  "model": "generic",
  "summary": "Earlier discussion: investigated login bug, identified JWT expiry issue.",
  "token_budget": 20
}
📤 Output
{
  "action": "inject_summary",
  "ok": true,
  "result": {
    "estimated_tokens": 38,
    "injected_summary": true,
    "messages": [
      {
        "content": "[Summary of earlier context] Earlier discussion: investigated login bug, identified JWT expiry issue.",
        "role": "system"
      },
      {
        "content": "Current task: fix the login bug.",
        "role": "user"
      }
    ],
    "pruned_count": 1
  }
}
split_context — chunk large context
# split# chunks# overlap

Split a large message list into overlapping chunks

📥 Input
{
  "action": "split_context",
  "chunk_size": 20,
  "messages": [
    {
      "content": "Message one about topic A.",
      "role": "user"
    },
    {
      "content": "Response about topic A.",
      "role": "assistant"
    },
    {
      "content": "Message two about topic B.",
      "role": "user"
    },
    {
      "content": "Response about topic B.",
      "role": "assistant"
    }
  ],
  "overlap": 5
}
📤 Output
{
  "action": "split_context",
  "ok": true,
  "result": {
    "chunk_size": 20,
    "chunks": [
      {
        "chunk_index": 0,
        "messages": [
          {
            "content": "Message one about topic A.",
            "role": "user"
          },
          {
            "content": "Response about topic A.",
            "role": "assistant"
          }
        ],
        "token_count": 18
      },
      {
        "chunk_index": 1,
        "messages": [
          {
            "content": "Response about topic A.",
            "role": "assistant"
          },
          {
            "content": "Message two about topic B.",
            "role": "user"
          }
        ],
        "token_count": 15
      }
    ],
    "overlap": 5,
    "total_chunks": 2
  }
}
error — missing messages
# error

Returns error when messages field is missing

📥 Input
{
  "action": "estimate_budget"
}
📤 Output
{
  "error": {
    "code": "MISSING_FIELD",
    "message": "Field \u0027messages\u0027 is required"
  },
  "ok": false
}
error — empty messages list
# error

Returns error when messages list is empty

📥 Input
{
  "action": "prune_oldest",
  "messages": [],
  "token_budget": 1000
}
📤 Output
{
  "error": {
    "code": "EMPTY_INPUT",
    "message": "Field \u0027messages\u0027 must not be empty"
  },
  "ok": false
}

All examples are also available via the agent API: /v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/schema

Reviews & Ratings

No reviews yet. Be the first to leave one!

✍️ Write a Review