curl -L -o context-window-mgr.skill "https://aiskillstore.io/v1/agent/skills/e0f80375-5ddc-4990-8af4-af2994807807/download?platform=ClaudeCode"
{
"tool": "download_skill",
"arguments": {
"skill_id": "e0f80375-5ddc-4990-8af4-af2994807807",
"platform": "ClaudeCode"
}
}
{
"mcpServers": {
"skill-store": {
"url": "https://aiskillstore.io/mcp/"
}
}
}
Runtime context window management for AI agents — token budget estimation, message pruning, relevance reranking, and context splitting (zero dependencies)
Compatible Platforms any
Findings: ["메타데이터 경고: 권장 필드 없음: 'requirements' (SKILL.md v2 권장)", "메타데이터 경고: 권장 필드 없음: 'changelog' (SKILL.md v2 권장)", '정보: spec: usk/1.0 미선언 — v2 패키지로 처리됩니다. 자동 변환 및 에이전트 검색 기능을 사용하려면 USK v3로 업그레이드하세요.']
✅ No security risks found.
AI Review Stage
스킬 메타데이터는 '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: []`로 나타나, 코드 내에 악의적인 요소, 난독화, 금지된 실행 파일 등이 발견되지 않았음을 확인해 줍니다. 이는 선언된 권한과 실제 코드가 일치하며, 악의적 목적의 코드가 없다는 판단을 뒷받침합니다. 따라서, 스킬의 목적이 명확하고, 선언된 권한이 최소한이며, 정적 분석 결과에서도 어떠한 위험 요소도 발견되지 않았으므로, 이 스킬은 안전하게 사용될 수 있다고 판단됩니다.
Representative input/output examples for this skill. Agents can use these to understand how to invoke the skill and what output to expect.
Estimate token usage for a message list
{
"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"
}
{
"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
}
}
Remove oldest messages when token budget is exceeded
{
"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
}
{
"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
}
}
Reorder messages by relevance to a query
{
"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
}
{
"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 a summary message representing pruned context
{
"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
}
{
"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 a large message list into overlapping chunks
{
"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
}
{
"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
}
}
Returns error when messages field is missing
{
"action": "estimate_budget"
}
{
"error": {
"code": "MISSING_FIELD",
"message": "Field \u0027messages\u0027 is required"
},
"ok": false
}
Returns error when messages list is empty
{
"action": "prune_oldest",
"messages": [],
"token_budget": 1000
}
{
"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
No reviews yet. Be the first to leave one!