hmem-migrate-o

hmem-migrate-o is a skill for Claude Code, Codex from Bumblebiber/hmem. It costs 76 tokens per session (1,701 once invoked), scanned A, original, MIT.

A migration guide for moving O-entries into a newer five-level project structure, where each O-entry belongs to one matching P-entry.

In plain words
What is it for?
Use it when migrating O-entries, responding to a structure warning, or finding O-entries still stored in the old format.
Why use it?
It helps update older flat records to the required structure while checking the existing entries and links first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when migrating O-entries, responding to a structure warning, or finding O-entries still stored in the old format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bumblebiber/hmem/hmem-migrate-o
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 Bumblebiber/hmem --skill hmem-migrate-o
Clone the repo
git clone --depth 1 https://github.com/Bumblebiber/hmem

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 hmem-migrate-o

README.md
[![agentmods](https://agentmods.dev/badge/skills/bumblebiber/hmem/hmem-migrate-o.svg)](https://agentmods.dev/skills/bumblebiber/hmem/hmem-migrate-o)
Your own site
<a href="https://agentmods.dev/skills/bumblebiber/hmem/hmem-migrate-o"><img src="https://agentmods.dev/badge/skills/bumblebiber/hmem/hmem-migrate-o.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,701 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.00076 $0.01701
Opus 5 $0.00038 $0.00851
Sonnet 5 $0.00015 $0.00340
Haiku 4.5 $0.00008 $0.00170

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

Security

Grade A, and why

hmem-migrate-o 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.

skills/hmem-migrate-o/SKILL.md · 175 lines

How it starts

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

/hmem-migrate-o — O-Entry Migration to Project-Bound Structure

Prerequisite: This skill uses move_nodes and rename_id from the hmem-curate MCP server. Tell the user to activate it via /mcp before proceeding.

This is a one-time migration from the old flat O-entry format to the new 5-level hierarchy where each O-entry is permanently bound to a P-entry (O0048 belongs to P0048).

What Changes

Before (old format):

  • New O-entry created per session, loosely linked via links field
  • Flat structure: L2 (exchange) -> L4 (user msg) -> L5 (agent msg)
  • active flag on O-entries to track current session

After (new format):

  • One O-entry per project, ID matches P-entry (O0048 <-> P0048)
  • 5-level hierarchy: L2 (session) -> L3 (batch) -> L4 (exchange) -> L5 (user/agent)
  • No active flag needed — O is derived from the active P
  • P0000/O0000 exist as "Non-Project" catch-all

Step 1: Pre-Migration Check

Understand what you're working with before changing anything.

hmem --version   # must be >= 5.3.0

Then use read_memory() to see current O-entries. Check:

  • How many O-entries exist?
  • Which P-entries are they linked to?
  • Are any O-entries already using the new format (have L3 depth=3 nodes)?

If the version is too old, run /hmem-update first.

Step 2: Backup

Create a backup of the hmem database before migrating. This is critical — the migration rewrites entry IDs.

# Find the active hmem file
HMEM_FILE=$(find ~/.hmem -name "*.hmem" -not -path "*/Agents/*" | head -1)
echo "Backing up: $HMEM_FILE"
cp "$HMEM_FILE" "${HMEM_FILE}.pre-migration-backup"

# Also backup agent-specific hmem files
find ~/.hmem/Agents -name "*.hmem" -exec sh -c 'cp "$1" "$1.pre-migration-backup"' _ {} \;

Verify backups exist before continuing.

Step 3: Run Migration

The migration script handles everything:

hmem migrate-o-entries

This will:

  1. Create P0000 "Non-Project" and O0000 catch-all if they don't exist
  2. For each existing O-entry:
    • Find its linked P-entry via the links JSON field
    • Rename it to match the P-entry's sequence number (e.g., O0042 linked to P0048 becomes O0048)
    • Handle ID conflicts by moving blockers to temporary IDs (O9XXX range)
    • Tag all migrated entries with #legacy
  3. Tag unlinked O-entries as #legacy (they'll go to O0000 eventually)
  4. Clear all active flags from O-entries

Read the full file on GitHub · 175 lines

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 · 175 lines · 76 tokens per session scan A 0bcb9ac7c3bc

Subscribe to this mod's changes

hmem-migrate-o is a skill published in the GitHub repository Bumblebiber/hmem (23 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 1,701 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

kayba-ace

This skill ships learnfromtraces.py, a script that reads OpenClaw session transcripts, feeds them through the ACE learning pipeline, and writes an updated skillbook to disk.

kayba-ai/agentic-context-engine · 0 tokens

rekal-init

Bootstrap rekal memory for a project. Scans the codebase for architecture, conventions, dependencies, workflows, and config, then stores durable knowledge as properly typed, tagged, deduplicated memories. Use when starting rekal on a new project, or when user says "init rekal", "bootstrap memory", "populate rekal"…

janbjorge/rekal · 83 tokens

rekal-save

End-of-session memory capture with deduplication. Extracts durable knowledge, checks for duplicates, stores or replaces as appropriate. Use whenever a session wraps up, a task finishes, or the user says goodbye/thanks/done. Also use when significant preferences, decisions, or discoveries emerge mid-session. Make sure…

janbjorge/rekal · 79 tokens

rekal-hygiene

Periodic memory maintenance and cleanup. Finds duplicates, contradictions, and quality issues in the memory database. Proposes fixes for user approval. Never auto-deletes or auto-modifies. Use when user says "clean up memories", "memory maintenance", "check memory health", or invokes /rekal-hygiene. Run monthly or…

janbjorge/rekal · 77 tokens

rekal-usage

Operational guide for rekal memory tools. Precise rules for when/how to call each tool, with exact parameters and decision trees. Use at session start, when onboarding to a rekal workspace, or when user asks "how do I use rekal", "what rekal tools", "help with memory". Trigger: /rekal-usage.

janbjorge/rekal · 75 tokens

vault-for-llm

Connect OpenClaw to Vault Agent Memory as a local-first governed project memory layer. Search first, then bounded-read cited source ranges; propose new memories as candidates instead of writing directly into active memory.

zycaskevin/Vault-Agent-Memory · 46 tokens