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

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00030 $0.00680
Sonnet 5.5 $0.00015 $0.00340
Haiku 4.5 $0.00008 $0.00170

Measured 2mo ago against content hash 0bcb9ac7c3bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 2mo 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. 2mo 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 (24 stars, last pushed 3mo ago), licensed MIT. It adds 76 tokens to every session and 1,701 once invoked, about $0.0003 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

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

nornweave-api

Give AI agents their own email inboxes using the NornWeave API. Use when building email agents, sending/receiving emails programmatically, managing inboxes, retrieving threads, searching messages, or integrating with email providers (Mailgun, SES, SendGrid, Resend). NornWeave provides LLM-ready markdown parsing and…

DataCovey/nornweave · 77 tokens

faf-expert

Expert in .faf (Foundational AI-context Format) files for persistent project context. Use when working with .faf files, project DNA, syncing project.faf into CLAUDE.md, faf-cli commands, MCP server configuration, or AI-readiness scoring (0-100%). Updated for v2.8.0 Tool Visibility System.

Wolfe-Jam/grok-faf-mcp · 72 tokens

knowledge-base

Retrieves and updates project-specific prompt knowledge from comparison evidence and user feedback. Use only for prompt analysis or post-comparison learning within a Rashomon evaluation.

shinpr/rashomon · 34 tokens

post-cortex-memory

Long-term project memory through the post-cortex MCP server (tools named session, semanticsearch, updateconversationcontext, assemblecontext, queryconversationcontext, getstructuredsummary, manageworkspace, manageentity, admin). Use it whenever those tools are available and the work could benefit from what was learned…

julymetodiev/post-cortex · 194 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