setup-clones
Configure shadowclone clones on this machine. A clone is Claude Code or Codex that works as the user, in Docker, toward a draft pull request. Use it when the user asks for clones, cloud sessions, or a
SKILL.mdplugins/shadowclone/skills/setup-clones/SKILL.md
GitHubSet Up Clones
Do the whole setup for the user. The user answers questions in chat, pastes tokens into a file, and approves the skill files. Run the steps in order. Do not explain a step that works.
A clone runs Claude Code or Codex as the user, on the user's own subscription or key, in Docker on this machine. The user starts it from the CLI or from an agent that has the shadowclone MCP tools.
Rules
- Never ask for a token in chat, and never read the secrets file. The user pastes each token into the secrets file.
- Show the skill files to the user. Call the next step with
approve: trueonly after the user agrees. - If a step fails, show the exact error, fix what you can, and run the step again.
1. Check the machine (1 minute)
- Run
shadowclone --version. If the command is missing, install the CLI withnpm install -g @shadowclone/cli@latest. Never usesudo. - Run
gh auth status. If it reports no login, ask the user to rungh auth loginin a terminal. - Run
docker info. If Docker does not run, ask the user to start Docker Desktop, OrbStack, or Docker Engine.
2. Ask two questions (30 seconds)
Ask these in one message. Use your question tool if you have one. Put the recommended choice first.
- Which repository and which login? The login choices are
claude-subscription(default, fromclaude setup-token),chatgpt-subscription(never on a public repository),anthropic,openai,openai-compatible,ollama, orfoundry. - Keep the agent trailer? Each commit gets
Co-authored-byfor the agent unless the user says no.
3. Run setup
- Call the
shadowclone_clone_setuptool withoperation: "setup", the repository,provider, andbaseUrlormodelwhen they apply. - If the skills repository is missing, call
operation: "skills"in the repository checkout. Show the files, and call it again withapprove: trueafter the user agrees. Then call setup again.
If the tool is not available, run shadowclone clone setup --repo <owner/repository> in a terminal instead.
4. The user adds the tokens
- Give the user the secrets file path, the list of secrets from setup, and the
GH_TOKENlink. - For
claude-subscription, the user gets the token fromclaude setup-token. - For
chatgpt-subscription, ask the user to runshadowclone clone login --repo <owner/repository>in a terminal. - Wait until the user says done.
5. Check and report
- Call
shadowclone_clone_setupwithoperation: "status"and the repository. - If a line says
fail, give the user its detail, and check again after the user fixes it. - When every line says
pass, tell the user how to start a clone: theshadowclone_clonetool withoperation: "start", orshadowclone clone start --repo <owner/repository> "<task>". - Tell the user that
shadowclone_sessionsorshadowclone clone listshows each clone and its pull request.