shadow-frog-dream

An autonomous code-experiment tool that investigates a repository while the user is away, including bug hunting, feature design, refactoring, optimization, and security review.

In plain words
What is it for?
Use it to run named investigations, record findings in a ShadowFrog knowledge base, and save experiment work on persistent Git branches.
Why use it?
It lets experiments be implemented and tested in isolated Git worktrees, preserving the results for later review.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/microsoft/shadowfrog/shadow-frog-dream
Any agent
npx skills add microsoft/ShadowFrog --skill shadow-frog-dream
Clone the repo
git clone --depth 1 https://github.com/microsoft/ShadowFrog

Made for: Claude Code, Codex.

Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,545 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00106 $0.12545
Opus 5 $0.00053 $0.06273
Sonnet 5 $0.00021 $0.02509
Haiku 4.5 $0.00011 $0.01255

Measured 2d ago against content hash 2ba12893d226, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

shadow-frog-dream scanned grade B with 1 finding 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 2d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (_worktree_safety.py, dream-cleanup.sh, dream-coverage.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

`rm -rf` if `git worktree remove` silently fails — the failure mode that

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/shadow-frog-dream/SKILL.md · 1,208 lines

How it starts

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

ShadowFrog Dream

Autonomous experimentation while the user is away. Every task is an experiment — implement real code in a worktree, run it, persist as a named git branch pushed to a remote the user can write to. Dream's unique value is implementation experience that compounds across sessions.

Critical Invariants

These rules are stated ONCE here and enforced by helper scripts. Violating any of them is a completion criteria failure.

Prerequisite: .shadow/ must be git-tracked

Dream moves .shadow/ content through git — artifacts are committed onto the dream branch, pushed to the remote, then read back by the reconciler via git show origin/<branch> .shadow/.... If .shadow/ is gitignored (the "local only" option in shadow-frog-init), git add -A silently skips those files, nothing reaches the remote, and the reconciler finds no manifest — every discovery is lost without warning. dream-setup.sh runs git check-ignore .shadow up front and refuses to start if it's ignored. Use shadow-frog-update instead for local-only shadows.

Path Isolation

WORKTREE_BASE = /tmp/shadowfrog-dreams/<DREAM_NS>/
WORKTREE_DIR  = $WORKTREE_BASE/dream-<SLUG>
  • Worktrees are ALWAYS in /tmp/shadowfrog-dreams/<DREAM_NS>/, NEVER in the project directory. This prevents conflicts between parallel agents and keeps the main repo clean.
  • DREAM_NS (namespace) isolates branches per task/instance. Resolved from: DREAM_NAMESPACE env → TASK_INFO.json.env → repo basename.
  • Override only with DREAM_WORKTREE_BASE env var if /tmp is too small.
  • dream-setup.sh computes and enforces all paths. Use it.

Branch Naming

BRANCH_NAME = dream/<DREAM_NS>/<DREAM_ID>
DREAM_ID    = YYYYMMDD-HHMMSSZ-<SLUG>

Artifact Format

.shadow/_dreams/<DREAM_ID>/report.md
.shadow/_dreams/<DREAM_ID>/manifest.json
.shadow/_dreams/<DREAM_ID>/patch.diff

NEVER flat files (_dreams/<DREAM_ID>.md). Flat files break the pipeline.

Read the full file on GitHub · 1,208 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 1,208 lines · 106 tokens per session scan B 2ba12893d226

Subscribe to this mod's changes

shadow-frog-dream is a skill published in the GitHub repository microsoft/ShadowFrog (21 stars, last pushed 13d ago), licensed MIT. It adds 106 tokens to every session and 12,545 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.