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 atretyak1985/swarmery --skill managing-context-reliabilitygit clone --depth 1 https://github.com/atretyak1985/swarmeryWrote 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/atretyak1985/swarmery/managing-context-reliability)<a href="https://agentmods.dev/skills/atretyak1985/swarmery/managing-context-reliability"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/managing-context-reliability/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/atretyak1985/swarmery/managing-context-reliability"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/managing-context-reliability.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.00124 | $0.01212 |
| Opus 5 | $0.00062 | $0.00606 |
| Sonnet 5 | $0.00025 | $0.00242 |
| Haiku 4.5 | $0.00012 | $0.00121 |
Grade A, and why
managing-context-reliability 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 5d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Managing Context and Reliability
Overview
Best-practice reference for the reliability layer: keeping context healthy over long sessions, escalating instead of guessing, propagating errors with structure, calibrating automation against human review, and preserving provenance. Each reference module states the correct pattern, the named anti-patterns, and ends with an Audit Checklist of verifiable conditions.
When to use
- Reviewing a long-running agent, a multi-agent pipeline's failure handling, or a synthesis/research system
- Debugging: degrading answer quality over time, lost mid-context details, silently dropped errors, unattributed claims
- Deciding: summarisation strategy, escalation criteria, sampling strategy for human review, when to trust automation
Not for the loop/orchestration structure itself (use auditing-agent-architecture).
Quick reference
| Module | Read when the question is about |
|---|---|
references/5-1-context-window-management.md |
Summarisation traps, lost-in-the-middle, tool-result trimming, prompt caching |
references/5-2-escalation-and-ambiguity-resolution.md |
Valid vs unreliable escalation triggers, explicit escalation criteria |
references/5-3-error-propagation-in-multi-agent-systems.md |
Structured error context, coverage annotations, local recovery |
references/5-4-codebase-exploration-and-context-degradation.md |
Scratchpads, subagent delegation, summary injection, /compact, crash recovery |
references/5-5-human-review-and-confidence-calibration.md |
Stratified sampling, field-level calibration, validation before automation |
references/5-6-information-provenance-and-multi-source-synthesis.md |
Claim-source mapping, conflicts, temporal awareness, attribution |
How to audit
- Match the system under review to modules in the table; read those files.
- Run each module's Audit Checklist item by item against the actual code/config.
- Report every unchecked item as a finding with
file:lineevidence and the module's recommended fix.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- checklists.md 8.2 KB
- references/5-1-context-window-management.md 11 KB
- references/5-2-escalation-and-ambiguity-resolution.md 7.0 KB
- references/5-3-error-propagation-in-multi-agent-systems.md 8.1 KB
- references/5-4-codebase-exploration-and-context-degradation.md 10 KB
- references/5-5-human-review-and-confidence-calibration.md 8.8 KB
- references/5-6-information-provenance-and-multi-source-synthesis.md 9.7 KB
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.
- 5d ago Changed · +39 tokens per session 83b8a927e59b
- 10d ago First seen · 93 lines · 85 tokens per session scan A 1a0b5eecf8f4
managing-context-reliability is a skill published in the GitHub repository atretyak1985/swarmery (5 stars, last pushed today), licensed Apache-2.0. It adds 124 tokens to every session and 1,212 once invoked, about $0.0006 per session on Opus 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-31.
Other skills, from other repositories
agentmemory-agents
How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent, when asked which agents are supported, or when a connect adapter writes the wrong config path.
md-fetch-summarize
Fetch a URL and return a concise markdown summary of its content. Read-only: no files are written; the summary is returned as output only. Use when asked to "fetch and summarize", "summarize this URL", "what does this page say", or "get the content of ". Proactively suggest when the user pastes a URL and asks what it…
sl_capture
How to capture new reusable patterns into ktx's semantic layer - when a measure, segment, or join belongs in the catalog and how to write it generically so it stays small and useful over time. Loaded by the post-turn memory-agent only. The research agent does not write to the SL.
wisdom-keep
Protect a CocoWisdom entry from consolidation. Usage: $wisdom keep --id --text " ".
ctx-purge
Purge the context-mode knowledge base. Permanently deletes all indexed content and resets session stats. This is destructive and cannot be undone. Trigger: /context-mode:ctx-purge.
cortex-memory
Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and NLI contradiction detection.