hive.context-preservation

hive.context-preservation is a skill for Claude Code, Codex from aden-hive/hive. It costs 24 tokens per session (280 once invoked), scanned A, original, Apache-2.0.

A working procedure for saving important information from tool results before the agent’s limited conversation memory is shortened.

In plain words
What is it for?
Use it while researching, handling multi-step tasks, or handing work to another agent that needs the saved findings.
Why use it?
It prevents key URLs, values, and conclusions from being lost when older context is removed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it while researching, handling multi-step tasks, or handing work to another agent that needs the saved findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aden-hive/hive/context-preservation
About the project

OpenHive is a runtime for groups of specialized AI agents that collaborate on long-running business processes. A persistent lead agent, called the Queen, creates and coordinates worker agents while the system manages state, recovery, observability, costs, and human oversight. The catalogue entries provide agent skills, instructions, and integrations for working with this harness.

aden-hive/hive · 11,021 stars · on GitHub

Install

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.

Any agent
npx skills add aden-hive/hive --skill context-preservation
Clone the repo
git clone --depth 1 https://github.com/aden-hive/hive

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for hive.context-preservation

README.md
[![agentmods](https://agentmods.dev/badge/skills/aden-hive/hive/context-preservation.svg)](https://agentmods.dev/skills/aden-hive/hive/context-preservation)
Your own site
<a href="https://agentmods.dev/skills/aden-hive/hive/context-preservation"><img src="https://agentmods.dev/badge/skills/aden-hive/hive/context-preservation.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 280 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.00280
Opus 5 $0.00012 $0.00140
Sonnet 5 $0.00005 $0.00056
Haiku 4.5 $0.00002 $0.00028

Measured 8d ago against content hash 8407879a67bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hive.context-preservation 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 8d 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.

core/framework/skills/_default_skills/context-preservation/SKILL.md · 25 lines

What it actually says

Operational Protocol: Context Preservation

You operate under a finite context window. Older tool results WILL be pruned. Extract what you need while it's still in context.

Save-as-you-go. After any tool call producing information you'll need later, immediately extract the key data into _working_notes or _preserved_data. Do not rely on referring back to old tool results — once they're pruned they're gone.

What to extract:

  • URLs and key snippets (not full pages)
  • Relevant API fields (not raw JSON blobs)
  • Specific lines, values, or IDs (not entire files)
  • Analysis conclusions (not raw data)

Handoffs between tasks happen through progress.db, not through shared-buffer handoff blobs. When you finish a task, any state the next worker needs goes into the task row itself (steps.evidence, tasks.last_error, sop_checklist.note) — see hive.colony-progress-tracker. Use _working_notes for things the DB schema doesn't cover.

You will receive an alert when context reaches {{warn_at_usage_ratio_pct}}% — preserve immediately.

Changes

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.

  1. 8d ago First seen · 25 lines · 24 tokens per session scan A 8407879a67bd

Subscribe to this mod's changes

hive.context-preservation is a skill published in the GitHub repository aden-hive/hive (11,021 stars, last pushed 2d ago), licensed Apache-2.0. It adds 24 tokens to every session and 280 once invoked, about $0.0001 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-30.