/memory-optimize
Choose the cheapest context path across direct read, markdown conversion, graph build, graph update, or graph query.
$ npx -y skills add yeaight7/agent-powerups --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/memory-optimize
Context preview
What this command does when you run it.
Choose the cheapest context path across direct read, markdown conversion, graph build, graph update, or graph query.
Command definition
memory-optimize.mdname: memory-optimize
description: Choose the cheapest context path across direct read, markdown conversion, graph build, graph update, or graph query.
argument-hint: "[path-or-url] [question]"
allowed-tools:
- Read
- Bash
- Glob
- Grep
Objective
Recommend the cheapest memory workflow that preserves answer quality and future reuse.
Context
Inputs:
- optional path or URL
- optional question or task goal
Optimization targets:
- lower token cost now
- lower reread cost later
- better persistence when repeated queries are likely
Process
1. Inspect input shape and reuse horizon:
- plain text or small local file
- noisy web page
- PDF/Office doc or other hard-to-read binary-ish source
- mixed corpus
- existing graph with new question
- existing graph with changed sources
2. Check requirements:
- `apx check graphify`
- `apx check markitdown-file-intake`
- `apx check defuddle`
3. Recommend exactly one primary path:
- direct read for small, simple, one-shot text
- `defuddle` -> Markdown -> read or build when web chrome is the main problem
- `markitdown-file-intake` -> Markdown -> read or build when document format is the main problem
- `graphify` full build when repeated questions or relationship navigation justify persistent memory
- `graphify --update` when a graph already exists and sources changed
- graph query against existing graph when the graph exists and the task is retrieval, tracing, or explanation
4. State why that path is cheapest:
- lower immediate token cost
- lower repeated reread cost
- better persistence across future sessions
5. Include exact next command(s) for the recommended path. 6. If a required tool for the best path is missing, either:
- recommend the next-best lower-capability path that still preserves answer quality, or
- stop and say the missing requirement makes the cheap path unavailable
Stop Conditions
- input is too ambiguous to choose between direct read, helper conversion, build, update, or query
- the recommended path depends on a missing tool and no credible fallback preserves answer quality
- user asks for persistent graph advice but the target path or URL is unavailable
Rules
- optimization target = lower token cost, lower reread cost, better persistence
- `graphify` is long-lived memory path
- helpers are normalization tools only
- keep `graphify` primary for persistent memory, helpers secondary, Obsidian optional
- do not recommend a graph build for trivial one-shot text when direct read is cheaper
- do not claim a helper or graph path is available before requirement checks pass
- do not claim bundled upstream code
Read more
name: memory-optimize description: Choose the cheapest context path across direct read, markdown conversion, graph build, graph update, or graph query. argument-hint: "[path-or-url] [question]" allowed-tools: - Read - Bash - Glob - Grep
Objective
Recommend the cheapest memory workflow that preserves answer quality and future reuse.
Context
Inputs:
- optional path or URL
- optional question or task goal
Optimization targets:
- lower token cost now
- lower reread cost later
- better persistence when repeated queries are likely
Process
1. Inspect input shape and reuse horizon:
- plain text or small local file
- noisy web page
- PDF/Office doc or other hard-to-read binary-ish source
- mixed corpus
- existing graph with new question
- existing graph with changed sources
2. Check requirements:
- `apx check graphify`
- `apx check markitdown-file-intake`
- `apx check defuddle`
3. Recommend exactly one primary path:
- direct read for small, simple, one-shot text
- `defuddle` -> Markdown -> read or build when web chrome is the main problem
- `markitdown-file-intake` -> Markdown -> read or build when document format is the main problem
- `graphify` full build when repeated questions or relationship navigation justify persistent memory
- `graphify --update` when a graph already exists and sources changed
- graph query against existing graph when the graph exists and the task is retrieval, tracing, or explanation
4. State why that path is cheapest:
- lower immediate token cost
- lower repeated reread cost
- better persistence across future sessions
5. Include exact next command(s) for the recommended path. 6. If a required tool for the best path is missing, either:
- recommend the next-best lower-capability path that still preserves answer quality, or
- stop and say the missing requirement makes the cheap path unavailable
Stop Conditions
- input is too ambiguous to choose between direct read, helper conversion, build, update, or query
- the recommended path depends on a missing tool and no credible fallback preserves answer quality
- user asks for persistent graph advice but the target path or URL is unavailable
Rules
- optimization target = lower token cost, lower reread cost, better persistence
- `graphify` is long-lived memory path
- helpers are normalization tools only
- keep `graphify` primary for persistent memory, helpers secondary, Obsidian optional
- do not recommend a graph build for trivial one-shot text when direct read is cheaper
- do not claim a helper or graph path is available before requirement checks pass
- do not claim bundled upstream code
Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more
Repo: yeaight7/agent-powerups
Other commands on agent-powerups.
- /bug-check
Run automated tests and build checks first, then agent code review. For each bug found, propose or document a regression test.
Open command - /build-fix
Use when a build, type check, or test suite is failing and needs to be unblocked with a minimal change.
Open command - /debug
Use when a bug needs systematic diagnosis before a fix is attempted.
Open command - /doctor
Use to diagnose environment, tooling, and Agent Powerups setup problems.
Open command - /implement
Use to turn a spec or user request into working, tested code.
Open command - /mcp-check
Use to check MCP server prerequisites before activating or using a server.
Open command

