memory-build

memory-build is a command for Claude Code from yeaight7/agent-powerups. It costs 27 tokens per session (755 once invoked), scanned A, original, Apache-2.0.

A command workflow for creating or refreshing graph-based memory from a folder of documents, code, notes, or other sources. It can optionally create an Obsidian vault, which is a folder structured for navigation in the Obsidian note-taking app.

In plain words
What is it for?
Use it to build a new memory graph, update one after source files change, or convert noisy web pages and office documents before graph processing.
Why use it?
It gives repeated questions across the same collection a persistent structure instead of requiring the sources to be reread each time. It also avoids using document-conversion helpers when the input is already readable.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the memory-optimization plugin — 6 skills, 3 commands, 2 agents shipped together

Good fit Use it to build a new memory graph, update one after source files change, or convert noisy web pages and office documents before graph processing.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/yeaight7/agent-powerups/memory-build
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/yeaight7/agent-powerups

Made for: Claude Code.

Or install memory-optimization, the plugin that ships this one along with the rest of its 6 skills, 3 commands, 2 agents.

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-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/yeaight7/agent-powerups/memory-build/github.svg)](https://agentmods.dev/commands/yeaight7/agent-powerups/memory-build)
Your own site
<a href="https://agentmods.dev/commands/yeaight7/agent-powerups/memory-build"><img src="https://agentmods.dev/badge/commands/yeaight7/agent-powerups/memory-build/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-build

Your own site · 80×15
<a href="https://agentmods.dev/commands/yeaight7/agent-powerups/memory-build"><img src="https://agentmods.dev/badge/commands/yeaight7/agent-powerups/memory-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 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.00027 $0.00755
Opus 5 $0.00014 $0.00378
Sonnet 5 $0.00005 $0.00151
Haiku 4.5 $0.00003 $0.00076

Measured yesterday against content hash c02901bbdf72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-15, from the pricing page.

Security

Grade A, and why

memory-build 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 yesterday.

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.

plugins/memory-optimization/commands/memory-build.md · 71 lines

How it starts

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

Objective

Build persistent graph-backed memory for a corpus. graphify is primary engine. defuddle and markitdown are preprocessing helpers only.

Context

Inputs:

  • target path from $ARGUMENTS, default . when omitted
  • --update to refresh an existing graph instead of rebuilding from scratch
  • --obsidian only when the user explicitly wants vault-style navigation

Expected outputs:

  • graphify-out/graph.json
  • updated graph report or other graphify-out/ artifacts from the graphify workflow
  • optional graphify-out/obsidian/ only when --obsidian was requested

Process

  1. Resolve target path. Default to current directory. Confirm it exists before any tool invocation.
  2. Check requirements:
    • apx check graphify
    • apx check markitdown-file-intake
    • apx check defuddle
  3. If graphify is missing, stop immediately. Report the missing requirement and point to apx check graphify --install-missing --dry-run. Do not continue with helper-only output.
  4. Inspect the corpus and choose one primary route:
    • ready docs/code/notes/images -> run graphify directly
    • web-heavy HTML/docs -> use defuddle first only if HTML chrome would pollute the graph
    • PDF/Office docs -> use markitdown-file-intake first only if direct input would be noisy or unreadable
    • mixed corpus -> normalize only the noisy subsets, then hand the corpus to graphify
  5. Decide build mode:
    • if graphify-out/graph.json already exists, prefer update flow
    • if user passed --update, use update flow even if only part of the corpus changed
    • if no graph exists yet, run a fresh build
  6. Keep Obsidian optional:
    • if --obsidian was requested, include Obsidian export in the graphify run
    • otherwise do not add vault generation by default
  7. Report what happened:
    • chosen route
    • requirement status
    • whether this was fresh build or update
    • exact next step if the build was blocked

Stop Conditions

  • target path does not exist or is clearly the wrong scope
  • graphify requirement check fails
  • no supported or readable source material is found after inspection
  • helper conversion is needed for source quality, but the required helper is missing
  • user asked for --update but there is no existing graph to update; switch to fresh build only if the user intent still clearly fits

Read the full file on GitHub · 71 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. yesterday First seen · 71 lines · 27 tokens per session scan A c02901bbdf72

Subscribe to this mod's changes

memory-build is a command published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 755 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-09-14.