dream

dream is a command for Claude Code from solanabr/solana-ai-kit. It costs 31 tokens per session (1,468 once invoked), scanned A, original, MIT.

A command that cleans up the project's MEMORY.md and, with confirmation, the Project Learnings section of CLAUDE.md. It merges duplicates, checks contradictions, removes stale information, and ranks what remains.

In plain words
What is it for?
Use it after major refactors to organize patterns, pitfalls, preferences, architecture notes, tools, confidence levels, sources, and dates.
Why use it?
It keeps accumulated project notes accurate and usable after major refactors instead of allowing outdated or repeated guidance to build up.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; built for gstack.

Good fit Use it after major refactors to organize patterns, pitfalls, preferences, architecture notes…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/solanabr/solana-ai-kit/dream
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/solanabr/solana-ai-kit

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 dream

README.md
[![agentmods](https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/dream.svg)](https://agentmods.dev/commands/solanabr/solana-ai-kit/dream)
Your own site
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/dream"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/dream.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 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,468 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.00031 $0.01468
Opus 5 $0.00015 $0.00734
Sonnet 5 $0.00006 $0.00294
Haiku 4.5 $0.00003 $0.00147

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

Security

Grade A, and why

dream 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 7d 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.

.claude/commands/dream.md · 112 lines

How it starts

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

You are consolidating this project's memory. Like sleep, this pass doesn't add new knowledge — it merges duplicates, resolves contradictions, discards what's stale, and strengthens what's proven. Touch ONLY MEMORY.md and (with confirmation) the ## Project Learnings section of CLAUDE.md. Never modify project code.

Learning Schema

Every entry in MEMORY.md is typed and structured. Sections: ## Patterns, ## Pitfalls, ## Preferences, ## Architecture, ## Tools.

### kebab-case-key
- **Insight:** One clear sentence
- **Confidence:** N/10
- **Source:** command/agent/session that produced it (e.g. debug-user-tx, manual)
- **Files:** relative/path.rs, other/path.ts   (optional)
- **Date:** YYYY-MM-DD

Entries missing fields get them backfilled during consolidation (unknown source → legacy, missing date → today, missing confidence → 5/10).

Pipeline

1. Collect

  • Read MEMORY.md. If missing, create it with the five section headers above and report "fresh memory initialized" — then skip to step 6.
  • Read the ## Project Learnings section of CLAUDE.md if present (subsections like Recurring Issues / Fix Patterns / Config Conventions). These are the already-exported, always-loaded learnings — treat them as the authoritative set when checking contradictions.
  • Inventory: total entries, entries per section, malformed entries.

2. Dedupe / Merge

  • Same key appearing more than once → keep the latest dated entry, fold any extra detail from older ones into its Insight, take the max confidence. Older duplicates are deleted (consolidation is the one place append-only history gets compacted).
  • Different keys, same meaning (read the insights, don't just string-match) → merge under the clearer key, note the alias in the Insight if useful.

3. Contradiction Check

  • Same topic, opposing advice ("use X" vs "avoid X") — within MEMORY.md, or between MEMORY.md and CLAUDE.md Project Learnings.
  • Resolution order: (a) higher confidence + newer date wins; (b) if the referenced files reveal which is currently true, verify against the code; (c) genuinely ambiguous → ask the user, presenting both entries.
  • The losing entry is deleted, and the winner's Insight gains a one-line "supersedes: " note.

Read the full file on GitHub · 112 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. 7d ago First seen · 112 lines · 31 tokens per session scan A a12e2d1b5d2e

Subscribe to this mod's changes

dream is a command published in the GitHub repository solanabr/solana-ai-kit (101 stars, last pushed 17d ago), licensed MIT. It adds 31 tokens to every session and 1,468 once invoked, about $0.0002 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.