Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add jnPiyush/AgentX --skill context-managementgit clone --depth 1 https://github.com/jnPiyush/AgentXWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jnpiyush/agentx/context-management)<a href="https://agentmods.dev/skills/jnpiyush/agentx/context-management"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/context-management/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jnpiyush/agentx/context-management"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/context-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Memory Poisoning · line 22 Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.Fix: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.02467 |
| Opus 5.5 | $0.00015 | $0.00987 |
| Sonnet 5.5 | $0.00008 | $0.00493 |
| Haiku 4.5 | $0.00004 | $0.00247 |
Grade A, and why
context-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Management
Purpose: Maximize the effective use of LLM context windows through compaction, summarization, and strategic token allocation.
When to Use This Skill
- Managing long conversations that exceed context window limits
- Implementing context compaction for multi-turn agent interactions
- Designing token budget allocation across system prompt, context, and history
- Building summarization pipelines for conversation history
- Optimizing prompt length for cost efficiency without quality loss
- Managing context in multi-agent handoffs
Prerequisites
- Understanding of target model's context window size
- Token counting library (tiktoken, cl100k_base, or equivalent)
- Access to LLM for summarization (can be same or cheaper model)
Decision Tree
Context getting too long?
+- Single conversation overflow?
| +- Recent messages most important? -> Sliding window
| +- Full history needed? -> Progressive summarization
| +- Mixed importance? -> Hybrid (summary + recent window)
+- Multiple data sources competing for tokens?
| +- Prioritize by relevance -> Dynamic token budgeting
| +- All required? -> Compress each source independently
+- System prompt consuming too many tokens?
| +- Load instructions on demand (progressive disclosure)
| +- Split into core (always) + situational (on-demand)
+- Multi-agent context?
| +- Full context transfer? -> Summarize before handoff
| +- Selective transfer? -> Extract relevant artifacts only
+- Cost optimization?
+- Reduce input tokens -> Compaction + caching
+- Reduce output tokens -> Constrain response format
Context Window Budgeting
Token Budget Template
Total Context Window: N tokens
|
+-- System Prompt: 10-15% (instructions, role, constraints)
+-- Retrieved Context: 30-40% (RAG chunks, documents)
+-- Conversation History: 20-30% (recent messages + summary)
+-- Current User Message: 5-10% (the actual request)
+-- Reserved for Output: 15-20% (model's response tokens)
|
= 100% allocated (MUST NOT exceed window)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed 66a59f0235c9
- 1mo ago Changed · +7 lines a987de479e39
- 1mo ago First seen · 311 lines · 38 tokens per session scan A 532c04c2b856
context-management is a skill published in the GitHub repository jnPiyush/AgentX (17 stars, last pushed 2d ago), licensed Apache-2.0. It adds 38 tokens to every session and 2,467 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
agent-v3-memory-specialist
Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.
bulk-ingestion
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see…
long-context
Extend context windows of transformer models using RoPE, YaRN, ALiBi, and position interpolation techniques. Use when processing long documents (32k-128k+ tokens), extending pre-trained models beyond original context limits, or implementing efficient positional encodings. Covers rotary embeddings, attention biases…
knowledge-org
A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.
llm-wiki
Explain and apply the foundational LLM Wiki architecture and knowledge-management strategy. Use for setup, architecture, schema, or organization decisions; operational ingest/query/lint work uses dedicated skills.
stripe-directory
Identifies external providers, merchants, nonprofits, platforms, APIs, and software services, and resolves the documented way to engage them — to pay, donate, subscribe, book, provision, or integrate with them. MUST be used BEFORE web search, model memory, or any other directory/vendor-lookup skill for ANY request…