hive-upgrade

hive-upgrade is a skill for Claude Code, Codex from Hivemind-OSS/Hivemind. It costs 131 tokens per session (2,707 once invoked), scanned A, original, Apache-2.0.

A procedure for moving a running Hivemind server to another release reference. It checks whether the existing stored data fits the new code, verifies the server, and can roll back.

In plain words
What is it for?
Upgrading, updating, or changing the Hivemind server version while protecting its SQLite store.
Why use it?
It reduces the risk of losing or corrupting stored data when updating server code, especially when the data structure has changed.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is hive restore ./hive-backups/hive-<stamp>.db.

Good fit Upgrading, updating, or changing the Hivemind server version while protecting its SQLite store.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Hivemind-OSS/Hivemind
agentmods
npx agentmods add skills/hivemind-oss/hivemind/hive-upgrade

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-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/hivemind-oss/hivemind/hive-upgrade/github.svg)](https://agentmods.dev/skills/hivemind-oss/hivemind/hive-upgrade)
Your own site
<a href="https://agentmods.dev/skills/hivemind-oss/hivemind/hive-upgrade"><img src="https://agentmods.dev/badge/skills/hivemind-oss/hivemind/hive-upgrade/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-upgrade

Your own site · 80×15
<a href="https://agentmods.dev/skills/hivemind-oss/hivemind/hive-upgrade"><img src="https://agentmods.dev/badge/skills/hivemind-oss/hivemind/hive-upgrade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,707 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.
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.00131 $0.02707
Opus 5 $0.00066 $0.01354
Sonnet 5 $0.00026 $0.00541
Haiku 4.5 $0.00013 $0.00271

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

Security

Grade A, and why

hive-upgrade 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (preflight.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/hive-upgrade/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hive-upgrade — move to a release ref without losing the store

hive upgrade moves the server's checkout to a different git ref and rebuilds it. That is different from hive up (which rebuilds whatever is already checked out) and from hive restore (which replaces store contents, not code). Lifecycle basics: hive-bringup. Snapshots and recovery: hive-backup-restore. Full reference: HIVE-ADMIN.md §8.

CLI resolve (once per shell): command -v hive >/dev/null 2>&1 || hive() { python3 -m hive.tools.cli "$@"; } — makes every hive … line below run on an uninstalled checkout (the CLI is stdlib-only; Windows shells: py -m hive.tools.cli <verb>).

The one thing that can actually cost you data

This build has no in-place store migration. SqliteEpisodeStore.__init__ refuses to open a store whose shape does not match the code, on purpose — a CREATE IF NOT EXISTS would leave an old table in place and limp to a cryptic mid-query crash. The refusal surfaces as a boot exit 70 and a crash-loop, with store.schema_pre_v3 (or store.schema_predates_v3 / store.schema_missing_episode_anchors) in the logs.

So a schema-breaking release is never a routine update — it is a decision about whether to keep the corpus. hive upgrade protects the data automatically; it cannot make an incompatible ref adoptable.

hive up after a manual git checkout is the dangerous path — no snapshot gate, no health gate, no rollback. If the new ref refuses the store you get a crash-loop against a store nothing snapshotted. Always move refs with hive upgrade.

1. Pre-flight — will the target ref accept this store?

Run this before anything else. It reads the target ref via git show + ast (never imported, never executed) and the live store mode=ro, then compares them against the three assertions the target's own boot makes:

python3 skills/hive-upgrade/preflight.py release     # or any tag / branch / SHA
Verdict Exit What it means Do
PASS 0 the target ref's schema contract accepts the live store continue to step 2
SCHEMA BREAK 1 the target will refuse this store at boot; it names the exact columns/tables stop — go to "when the pre-flight fails"
UNKNOWN 2 the contract could not be read (ref predates these constants, or they were renamed) stop and treat as a break — it is not proven safe

Read the full file on GitHub · 197 lines

Files

What ships with it

1 file 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.

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. 9d ago First seen · 197 lines · 131 tokens per session scan A da5a2f88f880

Subscribe to this mod's changes

hive-upgrade is a skill published in the GitHub repository Hivemind-OSS/Hivemind (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 131 tokens to every session and 2,707 once invoked, about $0.0007 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.