kumiho-backfill

kumiho-backfill is a command for Claude Code, Codex from KumihoIO/kumiho-plugins. It costs 21 tokens per session (2,042 once invoked), scanned A, original, MIT.

A command that turns past Claude Code, Codex CLI, or supplied ChatGPT session histories into organized memories for Kumiho's knowledge graph.

In plain words
What is it for?
Use it to scan session files, extract typed memories, review a staging file, and ingest the approved results.
Why use it?
It lets you review extracted information locally before anything is uploaded, avoiding a blind import of old conversations.

Command for Claude CodeCodex

Written for Claude Code and Codex: argument-hint in frontmatter, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the kumiho-memory plugin — 1 skill, 5 commands, 7 hooks, 1 MCP server shipped together

Good fit Use it to scan session files, extract typed memories, review a staging file, and ingest the approved results.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add KumihoIO/kumiho-plugins
Claude Code
/plugin install kumiho-memory

Made for: Claude Code, Codex.

Or install kumiho-memory, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 7 hooks, 1 MCP server.

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 kumiho-backfill

README.md
[![agentmods](https://agentmods.dev/badge/commands/kumihoio/kumiho-plugins/kumiho-backfill/github.svg)](https://agentmods.dev/commands/kumihoio/kumiho-plugins/kumiho-backfill)
Your own site
<a href="https://agentmods.dev/commands/kumihoio/kumiho-plugins/kumiho-backfill"><img src="https://agentmods.dev/badge/commands/kumihoio/kumiho-plugins/kumiho-backfill/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 kumiho-backfill

Your own site · 80×15
<a href="https://agentmods.dev/commands/kumihoio/kumiho-plugins/kumiho-backfill"><img src="https://agentmods.dev/badge/commands/kumihoio/kumiho-plugins/kumiho-backfill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,042 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.00021 $0.02042
Opus 5 $0.00010 $0.01021
Sonnet 5 $0.00004 $0.00408
Haiku 4.5 $0.00002 $0.00204

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

Security

Grade A, and why

kumiho-backfill 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 7d 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.

claude/commands/kumiho-backfill.md · 154 lines

How it starts

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

Kumiho History Backfill

Mine the user's existing Claude Code session transcripts into ontology-typed memories so the graph knows their work from day one. Two stages, decoupled by a local staging file (~/.kumiho/backfill/staging.json): extract (local only, nothing uploaded) and ingest (uploads only after the user reviews the exact payload). Design: docs/BACKFILL_DESIGN.md in kumiho-plugins.

If the argument is extract or ingest, run only that stage. Default: both.

Sources. scan/manifest auto-discover Claude Code (~/.claude/projects) and Codex CLI (~/.codex/sessions); pass --source claude|codex|all (default all) to narrow. A ChatGPT history is a user-supplied data export — if the user has one, add --chatgpt-export /path/to/conversations.json to scan/manifest. All three flow through the same distill → review → ingest pipeline and land as source:<tool>-tagged, ontology-typed memories.

All scripts live at ${CLAUDE_PLUGIN_ROOT}/scripts/; if CLAUDE_PLUGIN_ROOT is unset, use the plugin directory relative to this file. Below, INV means:

python "${CLAUDE_PLUGIN_ROOT}/scripts/backfill_inventory.py"

Stage 1 — Extract (local only)

  1. Scan + consent. Run INV scan. Show the user the full output — including the processing disclosure — and ask which projects to include (all, or a subset; pass --projects a,b below). Wait for their answer.

  2. Manifest + packets. Run INV manifest [--projects ...], then INV packetize (default top-25; honor a user-requested size). Packets are pre-anonymized excerpts at ~/.kumiho/backfill/packets/<session-id>.md.

  3. Distill each packet (this is your job — no other LLM is involved). Read one packet at a time and produce a captures file, then record it:

    INV stage --session <session-id> --captures-file /tmp/<session-id>.json
    

    The captures file is {"captures": [...], "decompose": {...}} where every capture has type, title, content, event_date, space_hint, and optional evidence.

Read the full file on GitHub · 154 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. 7d ago Changed c37074e0e33d
  2. 12d ago First seen · 154 lines · 21 tokens per session scan A 53ae9d6aa054

Subscribe to this mod's changes

kumiho-backfill is a command published in the GitHub repository KumihoIO/kumiho-plugins (2 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 2,042 once invoked, about $0.0001 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.