/claude-remote:debugfrom claude-remote
This 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".
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.
Diagnose why a Claude Code web (cloud) session isn't working. The user-level
setup script, the per-repo setup script, and the SessionStart hook all log
to a single file — /tmp/claude-user-setup.log — which makes this a
log-first workflow.
${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh — canonical
user-level script. Any deployed copy is compared against this.${CLAUDE_PLUGIN_ROOT}/skills/debug/reference/troubleshooting.md —
pattern → diagnosis → fix table. Read this early.${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/session-start-template.sh
and repo-setup-template.sh — reference templates for what the repo
files should look like./tmp/claude-user-setup.log, repo settings/scripts, reference filesdiff against canonical script, jq on settings.json, runtime health checksRead ${CLAUDE_PLUGIN_ROOT}/skills/debug/reference/troubleshooting.md in
full. The log patterns + fixes table guides the rest of this workflow.
tail -n 500 /tmp/claude-user-setup.log 2>&1 || echo "LOG_MISSING"
LOG_MISSING: either the user never started a remote session, or
the web UI "Setup script" field is empty. Show them
${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh and point them at
${CLAUDE_PLUGIN_ROOT}/skills/setup/reference/web-environment.md for
paste instructions. Stop here.Grep for the canonical marker lines:
=== User setup started at[1/5] Installing permissive settings[2/5] Installing mise[3/5] Installing common CLI tools[4/5] Installing Claude Code plugins[5/5] Delegating to repository setup=== Repo setup started at / === Repo setup complete at — one pair
per repository: a session can clone several repos under /home/user/
and the script runs every repo's .claude/scripts/setup.sh, each in its
own block (the repo: line inside names it). Pair each started with
the next complete; a block without its complete is that repo failing.=== Setup summary === — one OK/FAILED line per step (settings,
mise, session-hook, cli-tools, plugins) and per repo (repo <name>), with the
exit code on failures=== User setup complete at <timestamp> (exit: <status>) === — status is
ok, 1 failure or N failuresTake only the last run in the log (from the last === User setup started at): the file is appended to across sessions.
A log with [1/4] … [4/4] markers comes from a web-UI script older than
0.4.0: it does not install the repo's plugins. A completion marker without
(exit: ...) and no === Setup summary === comes from a script older than
0.5.0: it stops at the first failing command and delegates only to the
first repo setup it finds — in a multi-repo session the other repos
were never set up. In both cases tell the user to re-paste
${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh.
Since 0.5.0 the script never aborts on a failing command: start from the
FAILED lines of the summary and show the log section of each failing
step or repo block. If the summary or completion marker is missing, the
process was killed (timeout / OOM) or is still running — show the last
30 lines of the log. For a pre-0.5.0 log, determine the furthest marker
reached and show the last 30 lines above the point of failure.
For each log pattern in troubleshooting.md, grep the log. Collect every
match with its diagnosis and fix. Don't stop at the first hit — there may
be multiple independent failures.
Run these checks in the current working directory. If the working
directory is not itself a repo (e.g. /home/user holding several cloned
repos), run them in every /home/user/*/ repo listed in the log's
Found repo setup: lines:
Glob(".claude/scripts/setup.sh") — exists? executable?Glob(".claude/scripts/session-start.sh") — exists? executable?Read(".claude/settings.json") and verify:
enabledPlugins["claude-remote@fabn-claude-plugins"] === trueextraKnownMarketplaces["fabn-claude-plugins"] presenthooks.SessionStart[].hooks[].command matches
.claude/scripts/session-start.shjq . .claude/settings.json to confirm valid JSONReport each failing check with a concrete remediation (usually: re-run
/claude-remote:setup).
Ask the user (via AskUserQuestion) whether they still have a local copy
of the script they pasted into the web UI. Common locations:
~/.claude/scripts/setup.shIf they provide one, diff it against
${CLAUDE_PLUGIN_ROOT}/scripts/user-setup-template.sh and report any
drift. The canonical file is authoritative — any difference means the web
UI is stale and needs re-pasting.
If CLAUDE_CODE_REMOTE=true in the current environment, derive the
expected toolset the same way /claude-remote:verify does (by grepping
session-start.sh for ISSUES+=("... missing|down") assertions) and
run each check. This is the single most informative step if the log
pattern matching in Step 4 didn't produce a clear answer.
If /claude-remote:verify is available in the current session, you
can also invoke it directly via the Skill tool — it performs exactly
this derivation and tabulation:
Skill("claude-remote:verify")
Then compare the result against what session-start.sh last reported
(SETUP INCOMPLETE: ... line in the log). If anything regressed since
session start, that's a mid-session service crash — not a setup bug.
If Steps 3–7 haven't pinpointed the root cause — e.g. the log shows all
markers but something still doesn't work, or the failure mode doesn't
match any pattern in troubleshooting.md — run the bundled environment
dump script for a comprehensive snapshot:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/debug-environment.sh"
This tees a full report to /tmp/claude-env-debug.log covering identity,
PATH, tool versions, running services, listening ports, CLAUDE_ENV_FILE
contents, mise ls/mise settings, shell init files, and the tail of
/tmp/claude-user-setup.log. Read the output and look for:
CLAUDE_ENV_FILE unset or empty (PATH persistence block of
session-start.sh didn't run)mise ls showing versions different from mise.tomlmise activate bash lineSkip this step on quick/obvious failures — it produces ~200 lines of output and should only be invoked when the cheap pattern-matching above hasn't been enough.
Produce a structured report:
## Status
- Furthest phase reached: [marker]
- Setup summary: [OK/FAILED lines, or "missing (pre-0.5.0 script / killed)"]
- Detected failures: N
## Root cause
[the single most likely cause, drawn from Step 4 / Step 5]
## Fix
[specific file + edit, or specific command to run]
## Validate
[command to re-run locally or in a new remote session to confirm]
| Symptom | Action |
|---|---|
/tmp/claude-user-setup.log exists but is empty | User-level script started then was killed before any output; check web UI logs for OOM / timeout |
Log shows repeated [1/3]...[2/3]...[3/3] cycles | Session is being resumed and the setup script isn't actually being re-run — that's expected; only the SessionStart hook runs on resume. Look for hook output below the last repo-setup block. |
| Repo files look fine but session-start hook never runs | .claude/settings.json likely has a syntax error; jq . will catch it. Fall back to reading raw bytes. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fabn/claude-plugins --plugin claude-remote3 skills in this plugin
/setupclaude-remote:setupThis 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".
/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".