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.
git clone --depth 1 https://github.com/DyanGalih/spec-kit-memory-hubWrote 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/dyangalih/spec-kit-memory-hub/speckit.memory-md.init)<a href="https://agentmods.dev/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.init"><img src="https://agentmods.dev/badge/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.init.svg" alt="Measured on agentmods" 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.00015 | $0.01119 |
| Opus 5 | $0.00008 | $0.00560 |
| Sonnet 5 | $0.00003 | $0.00224 |
| Haiku 4.5 | $0.00002 | $0.00112 |
Grade A, and why
speckit.memory-md.init 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 8d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Init
Set up this repository to use the layered Spec Kit Memory workflow.
Tasks:
- Read
config-template.ymlat the extension root for default values. If the project has.specify/extensions/memory-md/config.yml, use those values instead. Fall back to defaults:memory_root: docs/memory,specs_root: specs. - MCP / Node Dependency Check:
- The memory hub fundamentally relies on SQLite cache via MCP or Node.js to manage project memory.
- Explain the minimum runtime requirements for the central MCP server: Node.js 18+, npm, local filesystem access, and the ability to install the
better-sqlite3native dependency. - Instruct the user to configure/start the
speckit-memory-hubMCP server through their AI client (e.g., present inmcp_config.jsonorconfig.toml) to enable all memory features.
- Ensure these folders exist:
{memory_root}(default: docs/memory){specs_root}(default: specs)- .github
- Ensure these subdirectories exist for flat date-based memory files:
{memory_root}/decisions/{memory_root}/architecture/{memory_root}/bugs/{memory_root}/worklog/
- Create or verify core memory files from the extension templates (located in
.specify/extensions/memory-md/templates/docs/memory/):{memory_root}/INDEX.md{memory_root}/PROJECT_CONTEXT.md
- Automatic Migration (Re-install Scenario):
- Check if legacy monolithic files (
DECISIONS.md,ARCHITECTURE.md,BUGS.md,WORKLOG.md) exist in{memory_root}. - If they do, this is an upgrade/re-install. Automatically run
npx speckit-memory migrate-memoryornpm run migrate(if available in the project) to safely split them into the new flat subfolder format.
- Check if legacy monolithic files (
- Create or update spec starter files so every feature folder can contain:
- spec.md
- plan.md
- tasks.md
{feature_memory_filename}(default: memory.md){memory_synthesis_filename}(default: memory-synthesis.md)
- Centralize Memory Governance:
- Mandatory: Create or Update
.specify/memory/workflow.md. If the file already exists, reconcile its content with the extension template (located at.specify/extensions/memory-md/templates/.specify/memory/workflow.md) to ensure it contains the latest mandatory command references, while strictly preserving any existing project-specific governance rules. - Migration: Detect active agent context files:
.github/copilot-instructions.md,AGENTS.md,CODEX.md,CLAUDE.md,GEMINI.md,WINDSURF.md,ANTIGRAVITY.md, and other local agent rules if present. - Inject Pointer: For each existing file, do NOT overwrite the whole file. Instead, find the
### Spec Kitsection (or create it) and replace it with the Pointer Model: "You MUST follow the memory-first workflow defined in.specify/memory/workflow.md. Before planning, prepare context using the best available path: MCP tools if configured, or/speckit.memory-md.prepare-contextif Spec Kit commands are available." - Create Missing Templates: For any agent file that does not yet exist but is in the standard set (
CODEX.md,CLAUDE.md,GEMINI.md,WINDSURF.md,ANTIGRAVITY.md), create it from the corresponding extension template (located in.specify/extensions/memory-md/templates/) only if the user confirms they use that agent. Never create agent files speculatively.
- Mandatory: Create or Update
- If
.specify/extensions/memory-md/config.ymldoes not exist, create it fromconfig-template.ymlwith default values. - Summarize the memory model:
- constitution / principles = stable operating rules
- durable project memory = reusable cross-feature knowledge
- active feature memory = feature-local constraints, open questions, and carry-forward context
- memory index = compact routing map for selecting relevant durable entries
- ephemeral run context = temporary prompt or terminal state that must not be committed
Guardrails:
- Safety First: Update existing files safely by targeting only managed sections (e.g.,
### Spec Kit). - No Destruction: Never overwrite project-specific memory or custom agent instructions without explicit approval.
- Reconciliation: If
.specify/memory/workflow.mdexists, treat it as a "living document"—improve its technical requirements without deleting its existing context.
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.
- 8d ago First seen · 66 lines · 15 tokens per session scan A 9f1e3c7cce4e
speckit.memory-md.init is a command published in the GitHub repository DyanGalih/spec-kit-memory-hub (15 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 1,119 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-30.
Other commands, from other repositories
wiki-query
Ask questions against the wiki. Synthesizes answers from wiki pages with cross-reference citations.
wiki-req
Capture and decompose a concept into atomic, traceable wiki requirements. Clarifies ambiguous requirements, splits them into atomic pieces, and persists them as wiki/requirements/ pages with status tracking.
wiki-retro
Save an atomic insight from the current task into the wiki. Creates a single markdown file that layered recall surfaces in future sessions.
wiki-discover
Auto-discover new sources from the web. Searches based on config topics and known knowledge gaps.
wiki-init
Initialize a new LLM Wiki in the current directory. Creates the full directory structure, config, and template files.
wiki-run
Run the full wiki cycle: discover → ingest → lint. Optionally schedule for auto-updates.