/claude-remote:setupfrom claude-remote
This skill should be used when the user wants to prepare a repository for Claude Code on the web (cloud sessions), or to upgrade an existing claude-remote setup to the latest template (e.g. to enable mise lockfile usage and avoid GitHub API rate limits). Detects the project stack (Ruby/Rails, Node, Python, Go, PHP, mise, databases), generates a per-repo bootstrap script, a SessionStart hook, walks the user through generating mise.lock for cloud platforms, optionally adds a mise bundler deps provider for Ruby projects, and wires everything into .claude/settings.json with the claude-remote plugin enabled from the fabn-claude-plugins marketplace. On re-run with existing scripts, saves .bak files and regenerates from the latest template. Also prints the next steps for pasting the canonical user-level setup script into the web UI environment. Activates on: "setup claude remote", "configure claude remote", "prepare repo for claude web", "prepare repo for cloud", "claude on the web setup", "cloud session bootstrap", "remote bootstrap", "web session setup", "upgrade claude remote", "update claude remote setup", "regenerate setup scripts", "fix mise rate limit", "add mise lockfile", "configura claude remote", "prepara repo per claude web", "setup sessione cloud", "aggiorna claude remote", "rigenera script claude remote".
Trending skills
7-day visitors to each skill page
Ships in claude-remote. 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.
Read when SKILL.md points to them.
Generates everything a repository needs to run correctly inside a Claude
Code web (cloud) session: a per-repo setup script, a SessionStart hook, and
the .claude/settings.json wiring that enables this plugin from the
fabn-claude-plugins marketplace.
Reference doc: https://code.claude.com/docs/en/claude-code-on-the-web
${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh — canonical
user-level script that must be pasted into the web UI "Setup script"
field. Source of truth; never edit in the web UI. It runs the
.claude/scripts/setup.sh of every repo cloned under /home/user/
(each in its own repo root, isolated, in sorted order) and never aborts:
failures are listed in a === Setup summary === block at the end of the log.
It also installs a user-level SessionStart hook
(~/.claude/claude-remote-session-start.sh, registered in
~/.claude/settings.json) that trusts every repo's mise.toml and puts
every repo's mise tools on PATH, so multi-repo sessions need no change in
the repos themselves.${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/repo-setup-template.sh —
parametric template for the per-repo .claude/scripts/setup.sh.${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/session-start-template.sh —
parametric template for .claude/scripts/session-start.sh.${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/settings-snippet.json —
canonical JSON to merge into the repo's .claude/settings.json.${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/web-environment.md —
web-UI configuration instructions (shown to user at the end).Gemfile, package.json, mise.toml, etc.).claude/settings.json, reference templatesconfig/database.yml, docker-compose.ymlchmod +x, bash -n, jq . for verificationRun these detections in parallel:
Gemfile + Gemfile.lock → Rubypackage.json → Node; lockfile picks pm: pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun, else npmpyproject.toml / requirements.txt → Python (prefer uv if uv.lock present)go.mod → Gocomposer.json → PHP[tools] section in mise.toml is the ONLY lock source. Since mise 2026.7, mise lock no longer generates entries from .tool-versions — not even with a sibling mise.toml — and errors with ! No tools configured to lock. Detect three layouts:
mise.toml with a [tools] section → mise block included; lockfile flow viable..tool-versions (whether or not a mise.toml without [tools] exists) → mise block included BUT raise the issue in Step 2 so the user can opt into copying the versions into [tools] before lockfile generation.mise --version. Lockfile generation requires mise ≥ 2026.7 — that release changed the lockfile entry format (a per-tool options fingerprint, e.g. ruby's precompiled_url); newer mise rejects entries written by older versions with <tool> is not in the lockfile, even when the platform entry exists. Cloud sessions always run the latest mise, so the lockfile must be generated with a matching version. If the local mise is older, tell the user to upgrade it (e.g. brew upgrade mise) before Step 5.mise.lock (matters for cloud rate-limit avoidance — see Step 5)mise.toml for [settings] containing locked = true (matters for Step 5 proposal)mise.toml for [deps.bundler] (matters for Step 6 proposal)config/database.yml, docker-compose.yml, docker-compose.*.yml, .env.example:
adapter: mysql2 or mysql: image → MySQLadapter: postgresql or postgres: image → PostgreSQLredis: image or REDIS_URL → Rediselasticsearch: / opensearch: → flag and ask (not auto-configured).claude/scripts/setup.sh exists → upgrade scenario
.claude/scripts/session-start.sh exists → upgrade scenario
Read the existing setup.sh and check the mise invocation pattern. Three eras to recognise:
mise install with no lockfile guard or warn. Vulnerable to GitHub API rate limits.mise install --locked with a fallback to plain mise install. Works, but the --locked flag is redundant once mise.lock is present (mise auto-prefers locked versions) and forces a fallback path that defeats fail-fast on missing lockfile entries.mise install with a mise.lock-missing warn block, paired with [settings] locked = true in mise.toml to enforce strict mode at project scope. This is what the current template generates.Both v0.2 and v0.3 are reasons to re-run this skill.
Do NOT write anything yet.
Use AskUserQuestion to present the detected stack and let the user correct it:
Runtimes detected (checkboxes, pre-selected)
Services detected (checkboxes, pre-selected)
Services the user wants to add manually
Whether to create .claude/settings.remote.json (permissive fallback for the sandbox)
If tool versions live only in .tool-versions (from Step 1 — whether mise.toml is missing or just lacks [tools]): ask the user how to proceed before Step 5 generates the lockfile. Tool versions MUST be in [tools] inside mise.toml for the lockfile flow (mise 2026.7+ ignores .tool-versions when locking). Two valid layouts:
actions/setup-node or similar with node-version-file: '.tool-versions' — that action does not support mise.toml): copy the tool versions into [tools] inside mise.toml AND keep .tool-versions for CI. The two files now duplicate the versions and must be kept in sync on every bump — add a comment above [tools] saying so. Note ruby/setup-ruby reads mise.toml natively, so only non-ruby runtimes force this duplication.jdx/mise-action@v2 in CI, or whose actions/setup-* steps can read another file such as package.json engines): migrate .tool-versions content into [tools] inside mise.toml, drop .tool-versions, and update CI workflows accordingly. The skill does NOT do the CI migration for the user — only flags it.If the user is unsure or wants to defer, default to the hybrid layout (lower-risk, no CI changes required) and include [settings] locked = true per Step 5. When copying versions, translate asdf-style tool names to mise names (golang → go, nodejs → node).
If upgrade-mode (Step 1 found existing scripts): confirm "Regenerate .claude/scripts/setup.sh and .claude/scripts/session-start.sh from the latest template?" with the explanation: the skill saves a .bak of each existing file before overwriting. If the user declines, skip Steps 3–4 and continue with the lockfile / bundler / settings steps so they still benefit from the parts of the upgrade that don't touch the scripts.
.claude/scripts/setup.shRead ${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/repo-setup-template.sh.
Strip the __SECTION:foo__ ... __END:foo__ blocks for runtimes/services
that were NOT selected in Step 2. Keep them for selected ones. Remove the
sentinel comment lines themselves.
If the file already exists (upgrade mode), copy it to
.claude/scripts/setup.sh.bak first. Then write the new version,
chmod +x, and run bash -n on it. Abort and show the error if the
syntax check fails — restore from .bak if needed.
.claude/scripts/session-start.shSame procedure with session-start-template.sh. Keep:
CLAUDE_CODE_REMOTE gate at the top (always).$CLAUDE_ENV_FILE PATH persistence block (always). It handles both
layouts: a session opened on the repo itself, and one opened on a parent
folder holding several repos (it then trusts each child repo's
mise.toml and puts each repo's mise tools on PATH).If the file already exists, save a .bak first. Then chmod +x and bash -n.
mise.toml and no .tool-versions)The __SECTION:mise__ block in the generated setup.sh calls plain
mise install. Per the official docs,
when mise.lock is present mise automatically prefers the locked URLs
and checksums over the version ranges in mise.toml — no --locked
flag needed. Without the lockfile, mise falls back to GitHub API calls
for latest resolution and GitHub-backed backends — cloud sessions are
unauthenticated and frequently hit the rate limit. To make this contract
enforceable, this skill recommends two complementary changes:
mise.lock (if missing)If Step 1 detected a mise config but no mise.lock:
linux-x64; the lockfile must
contain URLs for that platform. If the user develops on macOS,
pre-populating both platforms is required.[tools] section in
mise.toml. If tool versions live only in .tool-versions and Step 2
deferred the layout decision, copy them into [tools] now (default to
hybrid layout from Step 2) before invoking mise lock — otherwise it
errors with ! No tools configured to lock.options fingerprint the cloud's
up-to-date mise expects. If it's older, have the user upgrade first.AskUserQuestion) to run the generator now via Bash:
mise lock --platform linux-x64,macos-arm64
mise is on PATH locally and the user accepts → run it, then
verify mise.lock exists and bash -n-equivalent for TOML via
mise lockfile-status (best effort) or just [ -s mise.lock ].
Watch the output for Failed to resolve tool version list warnings —
they mean a tool was skipped and the lockfile is incomplete.mise is missing locally or the user declines → print the exact
command and tell them to run it before pushing. Do NOT block the
rest of the workflow.mise.lock already exists, confirm it's committed (warn if
git ls-files --error-unmatch mise.lock fails) AND that it was
generated by mise ≥ 2026.7 — old-format locks have no
[tools.<name>.options] blocks for tools that take options (e.g.
ruby). When in doubt, regenerating with a current mise is cheap and
idempotent; a stale-format lock makes the cloud install fail with
<tool> is not in the lockfile despite the entry being present.provenance — any hit means it was generated
without github_attestations = false (see Step 5b) and the cloud
install will fail with a downgrade attack error. Delete mise.lock
and regenerate after applying the setting.[settings] locked = true in mise.tomlStrict mode is what makes the cloud-session lockfile contract
enforceable. Without it, a future tool bump that misses mise lock
regeneration silently falls back to GitHub API resolution and the next
unauthenticated cloud session rate-limits. Propose adding it via
AskUserQuestion (opt-in, default Yes) unless Step 1 already detected
the section in mise.toml.
If the user accepts, append to mise.toml using Edit:
[settings]
# Require mise.lock to contain pre-resolved URLs/checksums for the current
# platform on every `mise install`. Regenerate after bumping versions:
# mise lock --platform linux-x64,macos-arm64
locked = true
# Don't record/verify GitHub attestation provenance: verification needs
# authenticated GitHub API calls that cloud sandboxes can't make (403),
# and a lock entry with provenance is *required* at install time.
# Integrity is still guaranteed by the sha256 checksums in mise.lock.
github_attestations = false
github_attestations = false is NOT optional for the cloud flow: with the
default (true), a lock generated on an authenticated dev machine records
provenance = "github-attestations" on entries for tools distributed via
GitHub releases (e.g. ruby's precompiled builds from jdx/ruby), and the
unauthenticated cloud install then fails with Lockfile requires github-attestations provenance ... but no verification was used. The
setting must be active at LOCK-GENERATION time; if the lockfile already
contains provenance lines, delete mise.lock and regenerate — a plain
re-run of mise lock preserves existing provenance fields.
Document the scope caveat to the user before they accept (per the mise docs: "Setting locked = true in a project's mise.toml applies to all tool resolution, including tools from your global ~/.config/mise/config.toml"):
When you
cdinto this project locally, mise will also enforce strict mode on tools you've configured in~/.config/mise/config.toml. If you have global tools, runmise lock -gonce to generate a global lockfile (~/.config/mise/mise.lock) so they keep installing cleanly. Cloud sessions are unaffected — they have no user-level mise config.
If the user declines: leave mise.toml untouched and warn that without
strict mode a missed mise lock regeneration will silently rate-limit
the next cloud session.
mise.toml only)If the repo has Gemfile AND mise.toml AND Step 1 did not find an
existing [deps.bundler] section, propose adding:
[deps.bundler]
auto = true
Use AskUserQuestion — this is opt-in. Benefit: when the user later runs
mise run <task> after a Gemfile.lock change, mise reinstalls
bundler dependencies automatically. It is harmless to add even for
projects that never use mise run.
If the user accepts, append the snippet to mise.toml using Edit
(not Write — we must not clobber existing content). Run bash -n
equivalent for TOML by parsing it via mise config --json (best effort)
or just visually verifying via Read.
.claude/settings.jsonRead ${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/settings-snippet.json.
Read the target repo's .claude/settings.json (create {} if missing).
Deep-merge the two with these rules:
extraKnownMarketplaces: add fabn-claude-plugins if absent. An
existing entry with the same source only gains "autoUpdate": true (a
third-party marketplace never auto-updates otherwise); one with a different
source is never overwritten — ask instead.enabledPlugins: add claude-remote@fabn-claude-plugins: true;
leave other enabled plugins alone.hooks.SessionStart: if the array already exists, append the new
entry only if no existing entry already points to
.claude/scripts/session-start.sh (idempotent).Write the result back with 2-space indentation. Validate with jq ..
Before composing the SessionStart hook block, consult the
plugin-dev:hook-development skill if available (use the Skill tool) so
the hook syntax matches current Claude Code conventions. If that skill
isn't available, fall back to the snippet in the reference file.
settings.remote.jsonThis file is only useful when the repo's committed .claude/settings.json
contains restrictive entries (permissions.deny or permissions.ask) that
would block unattended operation in the sandbox. Check for those first:
Read the repo's .claude/settings.json.
Inspect permissions.deny and permissions.ask. If both are empty or
absent, the sandbox can already run unattended — skip this step and do
NOT create settings.remote.json.
Otherwise, and only if the user opted in during Step 2 and the file does
not already exist, create .claude/settings.remote.json with a
permissive baseline for unattended remote sessions:
{
"permissions": {
"allow": ["*"],
"deny": [],
"ask": []
}
}
Important caveat to communicate to the user: specific deny or
ask entries in the repo's committed settings.json are NOT overridden
by "allow": ["*"]. If a tool is explicitly denied or gated in
settings.json (e.g. deny: ["node"]), it stays denied/gated in the
sandbox unless you add an explicit allow entry for that exact tool in
settings.remote.json. Inspect the repo's settings and, for each
deny/ask entry, ask the user whether to add a matching explicit allow
entry in settings.remote.json.
The user-setup script copies this to settings.local.json at session
start, giving the sandbox permissive defaults without touching the
locally-restrictive settings.json.
Ask the user via AskUserQuestion whether to add a short instruction
to the repo's CLAUDE.md telling Claude to run /claude-remote:verify
at the start of every cloud session. This is opt-in — do NOT write
it without confirmation.
If the user agrees:
Read the repo's CLAUDE.md (create it if it doesn't exist).
Check whether a <!-- claude-remote-plugin --> marker is already
present. If yes, leave the file alone — it's already configured.
Otherwise append this block at the end of the file:
<!-- claude-remote-plugin -->
## Claude Code on the web
When running inside a Claude Code web (cloud) session (`CLAUDE_CODE_REMOTE=true`),
before acting on the user's first request, run `/claude-remote:verify` to
confirm the environment is ready (runtimes installed, services up). If
verify reports failures, do not proceed with the task — follow its
recommendation to run `/claude-remote:debug` for a full diagnosis.
Tell the user what was added and remind them to commit CLAUDE.md
together with the other generated files.
If the user declines: skip silently.
Tell the user:
.claude/scripts/setup.sh,
.claude/scripts/session-start.sh, .claude/settings.json,
mise.lock (if Step 5 generated it), mise.toml (if Step 6
added the bundler provider), CLAUDE.md (if updated in Step 9),
and (if created) .claude/settings.remote.json.
Delete any .bak files left from upgrade mode once the new scripts
are verified working in a cloud session.${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh
into the Claude Code web UI's Setup script field for the target
environment — or re-paste it if the environment already has an older
copy (pre-0.5.0 copies set up only the first repo of a multi-repo
session). Reference the web-environment doc for full instructions:
Read ${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/web-environment.md
and show the relevant excerpt.CLAUDE_CODE_REMOTE — it is a Claude Code built-in and is
automatically set inside the SessionStart hook context.claude --remote "check-tools" from the repo root./claude-remote:verify to confirm
the environment is ready. If anything fails, run /claude-remote:debug
for a full diagnosis.Run:
bash -n .claude/scripts/setup.sh
bash -n .claude/scripts/session-start.sh
jq . .claude/settings.json > /dev/null
Report all green or the first failure.
| Symptom | Action |
|---|---|
bash -n fails on a generated script | Show the error, re-emit the section from template without mangling, retry once, else leave the file for user to inspect |
jq . fails on merged settings.json | Roll back to pre-edit contents (keep a backup in .claude/settings.json.bak), report the diff, ask the user to resolve manually |
Existing extraKnownMarketplaces.fabn-claude-plugins entry with different config | AskUserQuestion whether to overwrite |
mise.toml present but no runtime detected | Warn that mise will still install but nothing is tied to it; proceed |
| MySQL detected | Warn that MySQL isn't pre-installed on the web VM; the generated setup.sh will apt-get install mysql-server, which adds startup time |
mise lock not on PATH locally during Step 5 | Print the command and ask the user to install mise locally first, or skip lockfile generation and continue (cloud sessions will still work but may rate-limit) |
mise lock errors with ! No tools configured to lock | Tool versions live only in .tool-versions; mise 2026.7+ locks only tools declared in mise.toml [tools]. Loop back to Step 2 and copy the versions into [tools] (hybrid layout) before retrying. |
Cloud mise install fails with <tool> is not in the lockfile even though mise.lock has a linux-x64 entry for it | Lockfile was generated by mise ≤ 2026.5; 2026.7 added a per-tool options fingerprint to entries and rejects the old format. Upgrade local mise (≥ 2026.7) and regenerate mise.lock. |
mise lock prunes existing entries and warns Failed to resolve tool version list | [settings] locked = true is active but the tool can't be resolved against the (stale or empty) lockfile — chicken-and-egg during regeneration. Ensure the tool is in [tools], then re-run mise lock; the warning disappears once entries are written in the current format. |
mise.lock exists but only contains macOS URLs | Tell the user to re-run mise lock --platform linux-x64,macos-arm64 so the cloud session has linux-x64 URLs to install from. With [settings] locked = true (Step 5b), the next install will fail fast on missing entries instead of silently rate-limiting. |
User accepts [settings] locked = true but already has tools in ~/.config/mise/config.toml without a global lockfile | Suggest running mise lock -g once locally so global tools keep installing cleanly. Cloud sessions are unaffected. |
Existing setup.sh.bak already present (second upgrade run) | Overwrite it without asking — it's a transient artifact |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/debugclaude-remote:debugThis skill should be used when a Claude Code web (cloud) session is not
working correctly after /claude-remote:setup was run, or when the user
suspects the web-UI Setup script is misconfigured. Reads
/tmp/claude-user-setup.log, verifies repo-side files
(.claude/scripts/setup.sh, .claude/scripts/session-start.sh,
.claude/settings.json), checks the web-UI script against the canonical
reference bundled with this plugin, matches log patterns to known failure
modes, and prints a concrete fix.
Activates on: "debug claude remote", "claude remote broken",
"claude web session broken", "setup script failed", "remote session not
working", "diagnose cloud session", "why is my remote session failing",
"debug /tmp/claude-user-setup.log", "diagnostica claude remote",
"sessione cloud rotta".
/verifyclaude-remote:verifyThis skill should be used when the user wants to confirm a Claude Code
web (cloud) session is ready to work — runtimes installed, services up,
environment healthy — before acting on their request. Parses the
generated .claude/scripts/setup.sh and .claude/scripts/session-start.sh
to derive the expected toolset dynamically (instead of hardcoding), runs
a deterministic battery of checks, reports PASS/FAIL, and offers to
chain into /claude-remote:debug for a full diagnosis on failure.
Activates on: "verify claude remote", "verify remote session",
"check tools", "check environment", "am I ready", "ready to work",
"are all tools installed", "session ready", "health check claude remote",
"verifica claude remote", "verifica ambiente", "tutto a posto",
"tutto installato", "pronti a lavorare", "verifica tool".
npx claudepluginhub fabn/claude-plugins --plugin claude-remote