dream

dream is a command for Claude Code from randomittin/heimdall. It costs 0 tokens per session (1,914 once invoked), scanned A, original, MIT.

An overnight command that reviews a codebase and produces a morning report with suggested improvements and issues to review.

In plain words
What is it for?
Testing code-improvement ideas against measured results and proposing fixes for recurring problems or open issues.
Why use it?
It lets maintenance and experiments run outside working hours while leaving risky changes for a person to approve.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the hmd plugin — 7 skills, 19 commands, 16 agents, 8 hooks, 1 MCP server shipped together

Good fit Testing code-improvement ideas against measured results and proposing fixes for recurring problems or open issues.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/randomittin/heimdall/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/randomittin/heimdall

Made for: Claude Code.

Or install hmd, the plugin that ships this one along with the rest of its 7 skills, 19 commands, 16 agents, 8 hooks, 1 MCP server.

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/randomittin/heimdall/dream/github.svg)](https://agentmods.dev/commands/randomittin/heimdall/dream)
Your own site
<a href="https://agentmods.dev/commands/randomittin/heimdall/dream"><img src="https://agentmods.dev/badge/commands/randomittin/heimdall/dream/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 dream

Your own site · 80×15
<a href="https://agentmods.dev/commands/randomittin/heimdall/dream"><img src="https://agentmods.dev/badge/commands/randomittin/heimdall/dream.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,914 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.00000 $0.01914
Opus 5.5 $0.00000 $0.00766
Sonnet 5.5 $0.00000 $0.00383
Haiku 4.5 $0.00000 $0.00191

Measured 5d ago against content hash e5bb2182fb25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 5d 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/dream.md · 151 lines

How it starts

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

/dream — sleep on it, wake to a report

/dream is Heimdall's OVERNIGHT self-improvement + maintainer pass. It does the deep work while you're away and leaves a morning report (a dream journal) to review — it does not auto-apply risky changes. Think of it as "sleep on the codebase and tell me what you learned." (There is no /sleep command — /dream is the canonical name. The underlying capability stays available as /hmd:self-improve.)

The heavy lifting is delegated to the deterministic orchestrator bin/heimdall-dream, which REUSES the existing pieces — it invents no new keep/rollback logic:

  • autoresearch / self-improve (bin/heimdall-self-improve) — form routing/planning hypotheses from real metrics + queue evidence, and TEST them with the falsifiable keep-or-rollback gate. An improvement persists ONLY on a measured delta over baseline.
  • maintainer sweep (seeker) — raise issues found (recurring dead-reason clusters + the live issue queue) WITH proposed fixes, as candidates for a human.

Invariants (never weakened)

  • Shadow-first — routing/planning suggestions are SURFACED for morning review, not auto-applied. Only the self-improve keep-gate (safe, measured, reversible) may persist a change overnight; everything else is a suggestion.
  • Agent-never-pushes — /dream runs no git push, no gh pr, no merge. It writes a local report; you review and apply in the morning.
  • Real, not fabricated — every line of the report is sourced from actual self-improve output + real queue state. With NO evidence yet (empty metrics.jsonl) the report says "Nothing to suggest" honestly rather than inventing work.

Run it

On-demand (runs the loop now, writes today's report):

# surface-only (default) — shadow-first: suggest routing changes, don't apply them.
heimdall-dream --repo . run --json

# also START one bounded, reversible experiment (safe per the keep-gate: unvalidated,
# snapshotted, auto-rolled-back next cycle if it does not beat baseline):
heimdall-dream --repo . run --overnight --start-experiment --json

Read the full file on GitHub · 151 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. 5d ago Changed e5bb2182fb25
  2. 8d ago Changed 43360932748e
  3. 1mo ago First seen · 151 lines · 0 tokens per session scan A 514575e6f807

Subscribe to this mod's changes

dream is a command published in the GitHub repository randomittin/heimdall (5 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,914 tokens. 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-31.

Related

Other commands, from other repositories

subagent-diagnose

Multi-agent failure-investigation orchestrator. Parallel to /subagent-implementation — same scratchpad + investigator + builder/surgeon + reviewer + FOLLOWUPS pattern — but starts from a failure, not a spec. Two modes share one loop: ci (failed CI run is the brief seed) and bug (freeform symptom paragraph is the brief…

damusix/atomic-claude · 0 tokens

deslop

Audit a standing codebase for accumulated slop — comment noise, AI-tell doc prose, speculative abstraction, reinvented stdlib, duplicate helpers, dead code, swallowed errors, convention drift. Fans out read-only auditors sharded by wiki domain and writes an indexed report into a scratchpad for you to read. /deslop…

damusix/atomic-claude · 116 tokens

review-branch

Review the current branch's diff against base by dispatching atomic-reviewer. No orchestration loop, no spec required — pre-flight before /commit pr or /commit merge.

damusix/atomic-claude · 35 tokens

implement

Implement in the main agent, with atomic-reviewer gating every checkpoint. For work whose context is already in this conversation, where a fresh subagent would have to re-read what you have already read. Same checkpoints, commit-per-green, and finalize as /subagent-implementation; you write the code.

damusix/atomic-claude · 61 tokens

quick-fix

Implement→review subagent loop with no planning phase, for a fix whose cause is known and whose shape is obvious, however many files it touches. No spec, no worktree, no docs or signals at the end; one audit. Routes to /subagent-diagnose on an unknown cause and to /atomic-plan on an open approach or contract choice.

damusix/atomic-claude · 73 tokens

simplify-analyze

Analyze code for simplification opportunities. Part of simplify- family.

axiomantic/spellbook · 13 tokens