hub-memory

hub-memory is a skill for Claude Code, Codex from fthsrbst/mnema. It costs 66 tokens per session (1,495 once invoked), scanned A, original, MIT.

Shared-memory instructions for coding agents. The hub is a persistent store where agents on different devices can save and retrieve project context, decisions, and session notes.

In plain words
What is it for?
Use them at the start of coding tasks, when checking why a technical decision was made, when finding where previous work stopped, and when recording durable project knowledge.
Why use it?
They help an agent recover important context after a session ends and avoid repeating earlier investigation. They also describe when to search for project facts or save new information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/fthsrbst/mnema/hub-memory
Any agent
npx skills add fthsrbst/mnema --skill hub-memory
Clone the repo
git clone --depth 1 https://github.com/fthsrbst/mnema

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fthsrbst/mnema/hub-memory.svg)](https://agentmods.dev/skills/fthsrbst/mnema/hub-memory)
Your own site
<a href="https://agentmods.dev/skills/fthsrbst/mnema/hub-memory"><img src="https://agentmods.dev/badge/skills/fthsrbst/mnema/hub-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,495 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.1 $0.00066 $0.01495
Opus 5 $0.00033 $0.00747
Sonnet 5 $0.00013 $0.00299
Haiku 4.5 $0.00007 $0.00150

Measured 5d ago against content hash 749a826a2160, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

hub-memory 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 5d 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/hub-memory/SKILL.md · 45 lines

How it starts

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

Hub Hafıza Kullanımı — Katmanlı Bağlam

Hub, tüm cihazlardaki tüm agentların paylaştığı hafızadır. Sen kapanınca bağlamın silinir; hub silinmez. Bağlam üç katmandır: otomatik gelen (bridge/recall), görev başında çektiğin (project_get/memory_search), çalışırken yazdığın (memory_save/session_log). Doğru davranış katmanına göre değişir.

Katman 1 — Otomatik gelen (okuman yeter)

  • <hub-bridge> (oturum başı): aktif projenin map'i + son oturum özeti. Kaldığın yeri buradan al. Map'in gerçekle çeliştiğini görürsen görevin ortasında bile project_update ile düzelt.
  • <hub-recall> (mesaj başı): mesajla yüksek benzerlikli az sayıda kayıt. Sistem bilinçli olarak az ve isabetli enjekte eder; boş olması "hafızada yok" demek değildir — şüphen varsa Katman 2'ye in.

Katman 2 — Görev başında sen çek

  1. Projede çalışıyorsan ve bridge gelmediyse project_get(name): özet, stack, kararlar, odak, sıradaki adımlar + kod haritası (architecture/modules/entry_points/commands).
  2. "Neden X kullanıyoruz", "bunu daha önce nasıl çözmüştük" → memory_search(query).
  3. Doküman/öğrenme notu/araştırma arşivi → rag_search(query).
  4. "Nerede kalmıştım" → session_recent(project).

Katman 3 — Çalışırken yaz

Durum Aksiyon
Teknik karar alındı (kütüphane, mimari, yaklaşım) memory_save type=decision — gerekçeyi mutlaka yaz
Zor bir bug çözüldü memory_save type=howto — belirti, kök neden, çözüm
Kullanıcı tercih belirtti (stil, araç, workflow) memory_save type=preference
Tekrar lazım olacak komut/kurulum/config memory_save type=howto
Uzun araştırma/öğrenme çıktısı, doküman, talimat/prompt metni rag_add — memory DEĞİL (öğrenme notu: project='learning', uri='learning/')

Kayıt kalite kuralları

  • Ölçüt: "Başka bir cihazdaki agent 2 hafta sonra bundan faydalanır mı?" Hayırsa kaydetme (oturuma özel detay, koddan/git'ten okunabilen şey, geçici durum).
  • Boyut: memory "bir bakışta okunur tek bilgi"dir. Gövde ~1500 karakteri aşıyorsa büyük ihtimalle doküman yazıyorsun → rag_add.
  • project alanı: project_list'teki kanonik ad. Makine/cihaz adı (fatih-pc gibi) proje DEĞİLDİR — cihaza özgü bilgiye tags ekle. Yeni gerçek proje açılıyorsa önce project_update ile map oluştur.
  • importance: varsayılan 1 çoğu kayıt için doğrudur. 2 = aylar sonra bile öne geçmesi gereken kritik karar/tercih (nadir!). 0.5 = önemsiz detay. Enflasyon skorlamayı bozar.
  • Dedup: memory_save benzer kayıt uyarısı dönerse ciddiye al — mevcut kaydı memory_update ile zenginleştir, yeni açtığını memory_delete ile geri al.
  • Yanlışlanan bilgiyi gördüğün an düzelt (memory_update) veya sil (memory_delete). Çelişkili hafıza, hafızasızlıktan kötüdür.

Read the full file on GitHub · 45 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. 5d ago First seen · 45 lines · 66 tokens per session scan A 749a826a2160

Subscribe to this mod's changes

hub-memory is a skill published in the GitHub repository fthsrbst/mnema (2 stars, last pushed 6d ago), licensed MIT. It adds 66 tokens to every session and 1,495 once invoked, about $0.0003 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.