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,119 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/github.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/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.

agentmods 80×15 button for hive.context-preservation

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00010 $0.00112
Sonnet 5.5 $0.00005 $0.00056
Haiku 4.5 $0.00002 $0.00028

Measured 1mo ago against content hash 8407879a67bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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. 1mo 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,119 stars, last pushed 4d ago), licensed Apache-2.0. It adds 24 tokens to every session and 280 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

Vizra ADK Memory System

Implement persistent memory, session context, and vector memory (RAG) for AI agents.

vizra-ai/vizra-adk · 24 tokens

learning-capture

Log corrections, errors, and discoveries to orbital/LESSONS.md so future sessions avoid repeating mistakes.

zqiren/Orbital · 0 tokens

channel-canvas

How to work with a channel's standing project context — the "Archie" canvas a team pins in a channel — and with the channel's pinned-messages index. Load this when a channel has project context attached (presented to you as channel project context), when a pinned-messages index is in front of you or one of its lines…

sweatco/archie-hq · 108 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

recall-memory

Recall relevant long-term memories on demand. Given a topic or question, judges relevance from pre-loaded metadata, loads only relevant files, and returns a concise summary to the main agent.

clacky-ai/openclacky · 40 tokens

ha-knowledge

Working method for the Hope Agent knowledge space — how to capture, organize, link, retrieve, and maintain Markdown notes well with the note tools. Load whenever you are reading or writing notes in an attached knowledge base. Trigger on: user asks to take / save / organize / restructure notes, build or grow a…

shiwenwen/hope-agent · 187 tokens