/clean-room:clean-room-loopfrom Clean Room
Runs the clean-room unattended loop as a Claude Code dynamic workflow using in-session subagents to avoid API token costs. Use for reverse-engineering tasks hands-off.
Ships in Clean Room. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Conversational front door to the clean-room-loop dynamic workflow (.claude/workflows/clean-room-loop.js).
The workflow runs in the background with no way to ask anything mid-run, so the discussion happens
HERE; answers pass as args.
Claude Code only. Dynamic workflows are a Claude Code feature. In Pi/Codex/OpenCode the
Workflow() call will not exist - see the Fallback step. Only this workflow shortcut is Claude
Code specific; the underlying clean-room skills (/clean-room:unattended, clean-room-skill run)
work on every supported runtime.
Installed project-local. The workflow script ships to project-local .claude/workflows/
(not global). Workflow({ name }) discovers it from the current project's .claude/workflows/
(or ~/.claude/workflows/ if a personal copy exists). If the current project does not have it,
initialize a project-local install before launching - see Step 3.
agent() subagents (in-session,
subscription, no claude -p), gating every wall crossing with the real
clean-room-skill artifact validate --role leakage + schema hooks.CLEAN_ROOM_* env or install hooks, so nothing stops a clean subagent from reading
source off disk except the neutral-artifact discipline + the leakage gate. If the user needs the
enforced boundary, use clean-room-skill run --agent-runtime claude instead (that path costs API
tokens by design).Get the brief. Take the end goal from the invocation if present. If missing, ask what they are reimplementing and why they are authorized to.
Run the discussion. Collect the fields below with AskUserQuestion (batch - max 4 per call,
~3 calls); ask free-text ones plainly. Offer defaults so a terse brief is still runnable. Do NOT
infer the end goal or target stack from source - clean-room forbids it; if unknown, ask.
Batch A (goal + stack):
Batch B (policy):
Batch C (roots + bounds - all safety-relevant):
~/Documents/CleanRoom). Must be OUTSIDE the
source tree and neutral-named.Ensure the workflow is installed project-local, preview, STOP for confirmation, then launch.
First confirm this project has the workflow. Dynamic workflows load from project-local
.claude/workflows/. If .claude/workflows/clean-room-loop.js is absent in the current project
(and no ~/.claude/workflows/clean-room-loop.js personal copy exists), initialize a project-local
install before launching:
clean-room-skill --claude --local --yes
# or, without a global CLI:
npx clean-room-skill@latest --claude --local --yes
That writes clean-room-loop.js into the current project's .claude/workflows/ so
Workflow({ name }) can discover it. Then show a compact preview of the args
(at least endGoal, sourceRoots, artifactBase, targetStack, maxIterations) so a wrong
source path or output root is caught BEFORE a filesystem-writing, source-reading run starts. STOP
and wait for an explicit "yes". Do NOT call Workflow in the same turn as the preview. Only after
the user confirms:
Workflow({ name: "clean-room-loop", args: {
endGoal,
targetStack, // { language, runtime, framework, packageManager, testFramework }
compatibilityPolicy, featurePolicy,
licensePolicy, dependencyPolicy, codeHygienePolicy,
sourceRoots, // array of absolute paths (REQUIRED)
artifactBase, project, taskId,
schemaProfile, maxIterations,
specSliceRef, // optional
}})
Pass only what was gathered; omit the rest (the workflow defaults them).
Fallback. If Workflow() errors or is unavailable (non-Claude host, or dynamic workflows
disabled), do NOT hand-run the roles here. Route the user to /clean-room:unattended, which
prefers fresh-context in-harness roles on that harness and drops to the durable runner only as a
last resort: clean-room-skill run --agent-commands <adapter> on Codex/Pi/other runtimes (spawns
the harness CLI, shell: false), or --agent-runtime claude (spawns claude -p, Claude only,
per-token) last. Use the runner only once a runner-ready manifest with loop_context exists.
Hand back the workflow's result (the terminal clean-room-result.json result string, task
root, and clean/implementation roots).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
clean-room, reverse-engineering, workflow, unattended, cost-free
npx claudepluginhub whit3rabbit/clean-room-skill --plugin clean-room9 skills in this plugin
/attendedStarts the Clean Room startup wizard in attended controller mode for authorized source-to-implementation work with human review pauses at clean-room gates./clean-roomUse for authorized clean-room, reverse-engineering, source-to-implementation, compatibility rewrite, or migration tasks. Produces clean behavioral specs, implementation plans, clean code changes, verification reports, QC reports, open questions, and test plans without moving source expression into the clean implementation./initRecords Clean Room initialization preferences, separated artifact locations, model policy, schema profile, and clean-safe rule defaults before a clean-room run starts or resumes.Other plugins' skills for the same job