Clean Room Loopのロゴ

Clean Room Loop

コミュニティ
whit3rabbit
clean-room-loop

Front door for running the clean-room unattended loop as a Claude Code dynamic WORKFLOW using in-session subagents, so it never spends `claude -p` API tokens. Use when the user wants to run a clean-room / reverse-engineering / source-to-clean-implementation task hands-off but without paying per-token for `clean-room-skill run`, or says "clean-room as a workflow", "unattended clean-room without API cost", "/clean-room-loop". Runs a short discussion (authorization, end goal, target stack, policies, source roots, output roots, iterations) then launches the `clean-room-loop` workflow with the answers. NOT the enforced OS-level wall - that is `clean-room-skill run --agent-runtime claude`.

概要

公開者whit3rabbit
リポジトリclean-room-skill
スキル名clean-room-loop
スター
20
フォーク
3
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    whit3rabbitがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルClean Room LoopをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/whit3rabbit/clean-room-skill/tree/main/skills/clean-room-loop
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/whit3rabbit/clean-room-skill.git /tmp/clean-room-skill
mkdir -p .claude/skills
cp -r /tmp/clean-room-skill/skills/clean-room-loop .claude/skills/clean-room-loop
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでClean Room Loopを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にClean Room Loopを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Clean Room Loopは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Clean-room loop (discussion -> clean-room-loop workflow launch)

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.

What this is (and is NOT)

  • It drives the six clean-room roles with the workflow's OWN agent() subagents (in-session, subscription, no claude -p), gating every wall crossing with the real clean-room-skill artifact validate --role leakage + schema hooks.
  • It is a cost-free path with context-level separation, NOT the OS-enforced wall. A workflow cannot set 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).
  • The workflow READS the authorized source and WRITES clean specs, plans, code, and reports under the external artifact roots. Confirm authorization and paths before launching.

Steps

  1. 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.

  2. 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):

    • endGoal (free-text): what the clean implementation must do; its success definition.
    • targetStack: language / runtime / framework / packageManager / testFramework. Pass as a nested object.
    • compatibilityPolicy: public-behavior-and-API-names only (default) or public-behavior-only. Private structure/comments/internal names are NEVER mirrored.
    • featurePolicy (skippable): features to preserve / remove / add / non-goals.

    Batch B (policy):

    • licensePolicy: destination license + any blocked dep licenses.
    • dependencyPolicy: allow new deps? prefer stdlib? require approval for native deps.
    • codeHygienePolicy (skippable): max lines per code/test file, max files per iteration.
    • schemaProfile: speckit-feature-folder (default) / openspec-delta / gsd-planning-package / kiro-spec-folder.

    Batch C (roots + bounds - all safety-relevant):

    • sourceRoots (REQUIRED): absolute path(s) to the authorized source. No source = cannot run.
    • artifactBase: where run artifacts live (default ~/Documents/CleanRoom). Must be OUTSIDE the source tree and neutral-named.
    • project / taskId (skippable): neutral names; the CLI generates neutral ones if omitted.
    • maxIterations: finite inner-loop cap (default 3).
  3. 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:

    bash
    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).

  4. 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.

  5. Hand back the workflow's result (the terminal clean-room-result.json result string, task root, and clean/implementation roots).

よくある質問

AIスキル「Clean Room Loop」では何ができますか?

Front door for running the clean-room unattended loop as a Claude Code dynamic WORKFLOW using in-session subagents, so it never spends `claude -p` API tokens. Use when the user wants to run a clean-room / reverse-engineering / source-to-clean-implementation task hands-off but without paying per-token for `clean-room-skill run`, or says "clean-room as a workflow", "unattended clean-room without API cost", "/clean-room-loop". Runs a short discussion (authorization, end goal, target stack, policies, source roots, output roots, iterations) then launches the `clean-room-loop` workflow with the a...

TypingMindでClean Room Loopを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Clean Room Loopはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにClean Room Loopをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/whit3rabbit/clean-room-skill/tree/main/skills/clean-room-loopを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Clean Room Loopを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Clean Room Loopは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもClean Room Loopを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Clean Room Loop」は無料ですか?

はい。whit3rabbitがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇