hmem-setup

hmem-setup is a skill for Claude Code from Bumblebiber/hmem. It costs 56 tokens per session (2,984 once invoked), scanned C, original, MIT.

A first-time setup procedure for hmem, a memory system for coding tools such as Claude Code, Gemini CLI, and OpenCode. It installs the server, memory files, configuration, and optional automatic hooks.

In plain words
What is it for?
Use it to install hmem, initialize project or system-wide memory, configure tool integrations, add memory skills, and verify the setup.
Why use it?
It removes the manual work of connecting hmem to supported tools and creating its memory directory and configuration.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it to install hmem, initialize project or system-wide memory, configure tool integrations, add memory skills, and verify the setup.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bumblebiber/hmem/hmem-setup"><img src="https://agentmods.dev/badge/skills/bumblebiber/hmem/hmem-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,984 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00056 $0.02984
Opus 5.5 $0.00022 $0.01194
Sonnet 5.5 $0.00011 $0.00597
Haiku 4.5 $0.00006 $0.00298

Measured 1mo ago against content hash 51136e24c13a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

hmem-setup scanned grade C with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Linux (Debian/Ubuntu) | `sudo apt install python3 make g++` |

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`hmem init` registers 4 hooks in `~/.claude/settings.json`. Each hook is a bash script in `~/.claude/hooks/`.
skills/hmem-setup/SKILL.md · 272 lines

How it starts

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

hmem Setup

Install hmem globally, then run the interactive installer:

npm install -g hmem
hmem init

hmem init performs all setup steps automatically:

  1. Detects installed AI tools (Claude Code, Gemini CLI, OpenCode, Cursor, Windsurf, Cline)
  2. Asks for installation scope (system-wide or project-local)
  3. Creates the memory directory and optional example database
  4. Writes .mcp.json with the correct paths for each detected tool
  5. Adds session-start instructions to the tool's config file (CLAUDE.md, GEMINI.md, etc.)
  6. Creates hmem.config.json with sensible defaults
  7. Installs all 4 auto-memory hooks (Claude Code only — see Hook Reference below)
  8. Copies skill files (slash commands) to the tool's skill directory

After hmem init, install the slash-command skills:

npx hmem update-skills

Restart your AI tool and call read_memory() to verify.

Non-interactive mode (CI / scripting):

hmem init --global --tools claude-code --dir ~/.hmem --no-example

Hook Reference (Claude Code)

hmem init registers 4 hooks in ~/.claude/settings.json. Each hook is a bash script in ~/.claude/hooks/.

1. UserPromptSubmit — memory load + checkpoint reminder

Script: ~/.claude/hooks/hmem-startup.sh

  • First message: injects additionalContext telling the agent to call read_memory() silently. Also injects H-entries (ID + title; pinned H-entries include their L2 children inline so canonical identity/preference info is visible without extra reads — since v1.3.3), active device apps, infrastructure favorites, recent projects, checkpoint status, and an --- hmem-sync --- block showing link state (✓ linked / ⚠ partial / ✗ not linked / ✗ not configured). Block is always emitted since v1.2.9.
  • Every Nth message (N = checkpointInterval, default 20): injects a checkpoint reminder.
    • checkpointMode: "remind" — adds an additionalContext nudge; the agent decides what to save.
    • checkpointMode: "auto" — checkpoint is handled by the Stop hook instead (no reminder injected).
  • Subagents (messages with parentUuid) are skipped.
  • Uses a per-session counter file at /tmp/claude-hmem-counter-{SESSION_ID}.

Read the full file on GitHub · 272 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. 1mo ago First seen · 272 lines · 56 tokens per session scan C 51136e24c13a

Subscribe to this mod's changes

hmem-setup is a skill published in the GitHub repository Bumblebiber/hmem (24 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 2,984 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). 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, CLAUDE.md bi-sync, 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 · 69 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