markdown-hierarchical-memory: Skill for Cursor

.cursor/skills/memory-manager/SKILL.md

memory-manager is a skill for Cursor from masaki-kato-119/markdown-hierarchical-memory. It costs 126 tokens per session (1,040 once invoked), scanned A, original, MIT.

A memory-management workflow for organizing hierarchical memory stored in Markdown files, using the mdmem tool server.

In plain words
What is it for?
Use it when adding conversation details to memory, organizing memory files, compressing them, or reviewing archive candidates.
Why use it?
It helps decide whether memory should be searched, appended, split, summarized, archived, or linked while keeping changes consistent.

Skill for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Claude Code.

This is masaki-kato-119/markdown-hierarchical-memory's own configuration. It tells Cursor how to work on markdown-hierarchical-memory itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything markdown-hierarchical-memory configures →

Reuse

Borrowing it

Nothing to install: this file belongs to masaki-kato-119/markdown-hierarchical-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/masaki-kato-119/markdown-hierarchical-memory/main/.cursor/skills/memory-manager/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/masaki-kato-119/markdown-hierarchical-memory

Made for: Cursor.

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 memory-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager/github.svg)](https://agentmods.dev/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager)
Your own site
<a href="https://agentmods.dev/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager"><img src="https://agentmods.dev/badge/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager/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 memory-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager"><img src="https://agentmods.dev/badge/skills/masaki-kato-119/markdown-hierarchical-memory/memory-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,040 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.00126 $0.01040
Opus 5 $0.00063 $0.00520
Sonnet 5 $0.00025 $0.00208
Haiku 4.5 $0.00013 $0.00104

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

Security

Grade A, and why

memory-manager 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 9d 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.

.cursor/skills/memory-manager/SKILL.md · 62 lines

What it actually says

Memory Manager Agent

仕様書はリポジトリ直下の markdown-hierarchical-memory-spec.mdmdmem MCPサーバーが機械的実行層(読み書き・楽観的並行制御・双方向リンク整合・変更ログ)を提供し、 意味的判断はすべてこの Agent が行う。ツール側にLLM呼び出しはない。

MCPツール

サーバー名: Cursor では user-mdmem(設定キーは mdmem)、Claude Code では mcp__mdmem__*

ツール 用途
get_index / list_memory_files / search_memory / get_links 探索
read_memory_file 全文取得(access_count 更新)
create_memory_file / append_to_memory_file 作成・追記
link_memory_files 双方向リンク(§12・不可分)
split_memory_file 分割
summarize_and_archive_memory_file / move_to_archive 要約archive / 移動
check_archive_candidates / get_change_log 提案・ログ

書き込み系は必ず expected_updated(直前の frontmatter.updated)を渡す。ConflictError なら再読込→再試行。 actor役割のみ "memory-manager"。クライアント名(cursor 等)は自分で名乗らない—— サーバーが MDMEM_ACTOR から補い cursor/memory-manager と結合する。自称が8種類に分岐した原因。 rationale に判断根拠を簡潔に書く(§10・§17)。

基本フロー(§10)

  1. 候補探索: search_memory(既定1-hop、不足時のみ2-hop)。無ければ get_index

  2. 追記可否(§4 Step1): 同一テーマ/補足/サイズ内なら append_to_memory_file。 サイズは list_memory_filessize_level/line_count(§5: ≤100そのまま、100–300章整理、≥300は§9)。

  3. 独立ファイル化(§4 Step2): create_memory_file のあと必ず link_memory_files。片方だけのリンクは禁止(§12)。完了前に A→B 参照と B の parent を自己確認。

  4. サイズ超過(§9): 下表はヒント。最終判断は文脈で下す(§17)。

    凝集度 参照頻度 重要度 アクション
    split_memory_file
    章整理のみ
    summarize_and_archive_memory_file実行前にユーザー確認
    章整理のみ
    要約して積極的にarchive(同様に確認)

    分割は凝集度主導、要約は重要度×参照頻度主導。

importance / pinned / 忘却(§11・§13)

  • importance を自動で下げない。候補は check_archive_candidates で提示し、archive実行は明示確認後のみ。
  • pinned はユーザー明示維持のみ true。
  • 完全削除禁止。archiveは移動、index は (archived) 表示で残す。

完了報告

判断内容・呼んだツール・根拠を簡潔に報告する。archive/要約は不確実なら確認を仰ぐ。

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. 9d ago First seen · 62 lines · 126 tokens per session scan A 4a56960fc4d0

Subscribe to this mod's changes

memory-manager is a skill published in the GitHub repository masaki-kato-119/markdown-hierarchical-memory (0 stars, last pushed 20d ago), licensed MIT. It adds 126 tokens to every session and 1,040 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens