speckit.memory-md.init

speckit.memory-md.init is a command for Claude Code from DyanGalih/spec-kit-memory-hub. It costs 15 tokens per session (1,119 once invoked), scanned A, original, MIT.

A command that initializes folders and starter files for a repository memory and specification workflow. It can set up dated notes about decisions, architecture, bugs, and work logs.

In plain words
What is it for?
Use it to create or verify memory and specification directories, configure their locations, and prepare the repository for a SQLite-backed memory service.
Why use it?
It gives project history and specifications a consistent place to live instead of leaving important context scattered across conversations and files.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Good fit Use it to create or verify memory and specification directories, configure their locations, and prepare the repository for a SQLite-backed memory service.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.init
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.

Clone the repo
git clone --depth 1 https://github.com/DyanGalih/spec-kit-memory-hub

Made for: Claude Code.

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 speckit.memory-md.init

README.md
[![agentmods](https://agentmods.dev/badge/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.init.svg)](https://agentmods.dev/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.init)
Your own site
<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>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,119 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.00015 $0.01119
Opus 5 $0.00008 $0.00560
Sonnet 5 $0.00003 $0.00224
Haiku 4.5 $0.00002 $0.00112

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

Security

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.

commands/speckit.memory-md.init.md · 66 lines

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:

  1. Read config-template.yml at 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.
  2. 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-sqlite3 native dependency.
    • Instruct the user to configure/start the speckit-memory-hub MCP server through their AI client (e.g., present in mcp_config.json or config.toml) to enable all memory features.
  3. Ensure these folders exist:
    • {memory_root} (default: docs/memory)
    • {specs_root} (default: specs)
    • .github
  4. Ensure these subdirectories exist for flat date-based memory files:
    • {memory_root}/decisions/
    • {memory_root}/architecture/
    • {memory_root}/bugs/
    • {memory_root}/worklog/
  5. 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
  6. 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-memory or npm run migrate (if available in the project) to safely split them into the new flat subfolder format.
  7. 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)
  8. 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 Kit section (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-context if 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.
  9. If .specify/extensions/memory-md/config.yml does not exist, create it from config-template.yml with default values.
  10. 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.md exists, treat it as a "living document"—improve its technical requirements without deleting its existing context.

Read the full file on GitHub · 66 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. 8d ago First seen · 66 lines · 15 tokens per session scan A 9f1e3c7cce4e

Subscribe to this mod's changes

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.