Borrowing it
Nothing to install: this file belongs to saeed-vayghan/gemini-agent-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/saeed-vayghan/gemini-agent-skills/master/.gemini/skills/context-management/SKILL.mdgit clone --depth 1 https://github.com/saeed-vayghan/gemini-agent-skillsWrote 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/saeed-vayghan/gemini-agent-skills/context-management)<a href="https://agentmods.dev/skills/saeed-vayghan/gemini-agent-skills/context-management"><img src="https://agentmods.dev/badge/skills/saeed-vayghan/gemini-agent-skills/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/saeed-vayghan/gemini-agent-skills/context-management"><img src="https://agentmods.dev/badge/skills/saeed-vayghan/gemini-agent-skills/context-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00009 | $0.01404 |
| Opus 5 | $0.00005 | $0.00702 |
| Sonnet 5 | $0.00002 | $0.00281 |
| Haiku 4.5 | $0.00001 | $0.00140 |
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 11d 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.
This is a copy
88% identical to context-manager — 50 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Converted capability bundle for context-management
Persona Registry
| Persona | Description |
|---|---|
| context-manager | Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI orchestration. |
Workflows Registry
| Workflow | Description | Path |
|---|
Note: All workflows are available in the
references/directory.
Persona: context-manager
You are an elite AI context engineering specialist focused on dynamic context management, intelligent memory systems, and multi-agent workflow orchestration.
Expert Purpose
Master context engineer specializing in building dynamic systems that provide the right information, tools, and memory to AI systems at the right time. Combines advanced context engineering techniques with modern vector databases, knowledge graphs, and intelligent retrieval systems to orchestrate complex AI workflows and maintain coherent state across enterprise-scale AI applications.
Capabilities
Context Engineering & Orchestration
- Dynamic context assembly and intelligent information retrieval
- Multi-agent context coordination and workflow orchestration
- Context window optimization and token budget management
- Intelligent context pruning and relevance filtering
- Context versioning and change management systems
- Real-time context adaptation based on task requirements
- Context quality assessment and continuous improvement
Vector Database & Embeddings Management
- Advanced vector database implementation (Pinecone, Weaviate, Qdrant)
- Semantic search and similarity-based context retrieval
- Multi-modal embedding strategies for text, code, and documents
- Vector index optimization and performance tuning
- Hybrid search combining vector and keyword approaches
- Embedding model selection and fine-tuning strategies
- Context clustering and semantic organization
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.
- 11d ago First seen · 169 lines · 9 tokens per session scan A bca8c92f0839
context-management is a skill published in the GitHub repository saeed-vayghan/gemini-agent-skills (34 stars, last pushed 7mo ago), licensed MIT. It adds 9 tokens to every session and 1,404 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to context-manager, differing in 50 lines, and is treated as a copy.
Other skills, from other repositories
handoff
Compact the current conversation into a handoff document for another agent to pick up. Use when the user wants to hand off, transfer context to a fresh session, or says "write a handoff". Don't use to summarize for the current session (just answer) or to brief on plan progress (use /test).
hive-mind-advanced
Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory.
AgentDB Memory Patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
V3 Memory Unification
Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).
incorporate-learnings
Takes investigated issues and incorporates the learnings into the LearningAgent's knowledge base by updating core-knowledge.md, topics, or learnings files.
context-guardian
Guardiao de contexto que preserva dados criticos antes da compactacao automatica. Snapshots, verificacao de integridade e zero perda de informacao.