hmem-context

hmem-context is a skill for Claude Code, Codex from Bumblebiber/hmem. It costs 31 tokens per session (506 once invoked), scanned A, original, MIT.

A procedure for loading focused information from hmem when a project summary does not contain the needed past decision, lesson, or code detail.

In plain words
What is it for?
Use it to search past decisions, find related lessons, or read a project’s codebase section.
Why use it?
It limits searches to relevant stored memories, reducing unnecessary context while finding information needed for the current task.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/bumblebiber/hmem/hmem-context
Any agent
npx skills add Bumblebiber/hmem --skill hmem-context
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-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/bumblebiber/hmem/hmem-context.svg)](https://agentmods.dev/skills/bumblebiber/hmem/hmem-context)
Your own site
<a href="https://agentmods.dev/skills/bumblebiber/hmem/hmem-context"><img src="https://agentmods.dev/badge/skills/bumblebiber/hmem/hmem-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.00506
Opus 5 $0.00015 $0.00253
Sonnet 5 $0.00006 $0.00101
Haiku 4.5 $0.00003 $0.00051

Measured 3d ago against content hash 871150696c61, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hmem-context 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 3d 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-context/SKILL.md · 65 lines

What it actually says

hmem-context

TRIGGER

Use when:

  • The current question requires a past decision not in the project brief
  • You need to recall a specific bug, pattern, or lesson
  • You need code details not in the Overview

Do NOT use for session start — use hmem-session-start instead.

STEP 1: Identify what type of information is needed

Pick ONE:

  • Past decision → use search_memory with keywords from that decision
  • Lesson or pattern → use find_related on the concept
  • Code details → use read_memory on P00XX.2 (Codebase section)

STEP 2: Run the search (pick ONE)

For keyword search: search_memory(query: "")

For semantic search: find_related(id: "P00XX", query: "")

For direct node: read_memory(id: "P00XX.2")

Replace P00XX with the active project ID (e.g., P0056).

STEP 3: Filter results

Select at most 3 nodes that directly answer the question.

  • Prefer L-Entries over O-Entries (more compact, already distilled)
  • Prefer entries with matching keywords in title
  • Discard everything else

STEP 4: Output

[CONTEXT LOADED]

If nothing relevant found:

[CONTEXT LOADED] No relevant context found for: [/CONTEXT LOADED]

→ If the missing info is code structure: dispatch an Explore agent to locate it in the filesystem. → After finding it, update the Codebase node immediately using the correct depth: L3 — module group (if the group is missing): append_memory(id="P00XX.2", title="Core modules") L4 — individual module with signature + purpose: append_memory(id="P00XX.2.N", title="moduleName.ts", body="functionName(param: Type): Return — purpose. src/path/moduleName.ts") L5 — optional extended notes (edge cases, caveats): append_memory(id="P00XX.2.N.M", title="Note", body="...")

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. 3d ago First seen · 65 lines · 31 tokens per session scan A 871150696c61

Subscribe to this mod's changes

hmem-context is a skill published in the GitHub repository Bumblebiber/hmem (24 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 506 once invoked, about $0.0002 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.