Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/cbuntingde/kimi-memorynpx agentmods add commands/cbuntingde/kimi-memory/promoteWrote 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.
[](https://agentmods.dev/commands/cbuntingde/kimi-memory/promote)<a href="https://agentmods.dev/commands/cbuntingde/kimi-memory/promote"><img src="https://agentmods.dev/badge/commands/cbuntingde/kimi-memory/promote/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.
<a href="https://agentmods.dev/commands/cbuntingde/kimi-memory/promote"><img src="https://agentmods.dev/badge/commands/cbuntingde/kimi-memory/promote.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.01058 |
| Opus 5.5 | $0.00009 | $0.00423 |
| Sonnet 5.5 | $0.00005 | $0.00212 |
| Haiku 4.5 | $0.00002 | $0.00106 |
Grade A, and why
promote 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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/kimi-memory:promote
Promote project memories into the cross-project store. Use when auto-extract under-classified a fact (it stayed in the project DB when it should have gone to global) or when the operator is reconciling a project cache manually.
Usage
Two paths, with different safety defaults:
- MCP tool
memory_promote_to_global(cwd, memory_ids)— moves immediately. There is no dry run on this path, so confirm with the user before calling it. - CLI
node src/cli.js promote-to-global --memory-id <id>— dry run by default; re-run with--applyto perform the move.
node src/cli.js promote-to-global --memory-id <id> [--memory-id <id> ...] # dry run
node src/cli.js promote-to-global --memory-id <id> --apply # actually move
On the CLI, the dry run lists what would be moved and exits without
touching either database. Review the list, then re-run with --apply
to perform the move.
What this does
The plugin stores project memories under
$KIMI_CODE_HOME/kimi-memory/<project-key>/memory.sqlite and
cross-project memories under
$KIMI_CODE_HOME/kimi-memory/_global/memory.sqlite. This command
moves a row from the project DB to the global DB:
- The source row is removed from the project DB.
- The row is rewritten into
_global/memory.sqlitewithproject_key = '_global'. The id is preserved across the move so any caller holding the id keeps working. provenance.promoted_fromrecords the originating project key;provenance.promoted_atrecords the move timestamp.
The move is a two-phase commit with compensation: the global DB is written first, then the source DB is deleted; if the source-DB step fails, the global writes are rolled back so the operation is atomic from the caller's view.
Procedure
- Confirm the user wants to promote. Cross-project memory is visible from every project — promoting the wrong fact pollutes global recall.
- Identify the source memory ids. Use
memory_recall(scope: "project", query: ...)ormemory_list(scope: "project")to find the row. Confirm the title and content are genuinely cross-project (user preference, environment fact, reusable procedure) before promoting. - Move the rows. The MCP tool moves immediately — it has no dry run —
and returns
moved(each entry carryingid,new_global_id— the same value —type, andtitle),skipped(ids that did not exist, were duplicates, or matched a secret shape), and the countsmoved_count/skipped_count:
If you want a preview first, use the CLI instead; it is dry-run by default and needsmemory_promote_to_global(cwd: <project>, memory_ids: [...])--applyto move:node src/cli.js promote-to-global --cwd <project> --memory-id <id> # preview node src/cli.js promote-to-global --cwd <project> --memory-id <id> --apply # move - Confirm by calling
memory_recall(scope: "global", query: ...)and showing the user the row is now visible from any project.
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.
- 2mo ago Changed · +11 lines 0a1432720a0a
- 2mo ago First seen · 90 lines · 23 tokens per session scan A 674104b4e4dc
promote is a command published in the GitHub repository cbuntingde/kimi-memory (0 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 1,058 once invoked, about $0.0001 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-09-04.
promote compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| promotecbuntingde/kimi-memory | Command | 0 | 2mo ago | MIT | A | 23 | Claude Code |
| cancel-ralphanthropics/claude-plugins-official | Command | 49k | today | Apache-2.0 | A | 4 | Claude Code |
| wsdanielmiessler/LifeOS | Command | 21k | 14d ago | MIT | A | 0 | Claude Code |
| engage.actionshypnguyen1209/offensive-claude | Command | 436 | 1mo ago | MIT | A | 11 | Claude Code |
| promote-lessonskumaran-is/claude-code-onboarding | Command | 37 | 2d ago | MIT | A | 25 | Claude Code |
| focusData-Wise/claude-plugins | Command | 7 | yesterday | MIT | A | 0 | Claude Code |
| stuckData-Wise/claude-plugins | Command | 7 | yesterday | MIT | A | 0 | Claude Code |