From claude-resources
Bootstraps a project so Claude Code on the web loads shared config (skills/agents/commands) from a public mirror. Writes a .claude/settings.json hook or provides an env-setup-script for the web UI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:dev-setup-webenv [--committed] [--env-script] [--self-only][--committed] [--env-script] [--self-only]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Make a project's **Claude Code on the web** sessions boot with your shared config
Make a project's Claude Code on the web sessions boot with your shared config
(skills, agents, commands) by fetching the public claude-resources mirror at
SessionStart and running its web loader (scripts/setup-web.sh).
This skill runs on the local terminal, not on web. Its only output is a small bootstrap committed into (or described for) the target project — the cloning and profile install happen later, inside the web container.
A committed .claude/settings.json is shared with everyone in the repo. On a
teammate's web session it would overwrite their ~/.claude/settings.json,
inject your skills, and disable their permission prompts (the web settings run in
auto mode). On the Mac terminal it no-ops ($CLAUDE_CODE_REMOTE is unset), so
teammates there are unaffected — but do not commit the hook to a shared repo
without the owner's agreement.
Pick the target accordingly:
| Repo | Target | Commits to repo? |
|---|---|---|
| Solo / personal | Committed hook (--committed) | yes — .claude/ |
| Team / shared | Env-script snippet (--env-script, default) | no — you paste it into the web UI |
When neither flag is passed, ask which applies and default to --env-script.
For --committed on a shared repo, prefer also passing --self-only (see below).
The public mirror must already contain the web profile (web/ +
scripts/setup-web.sh). Publish it with /claude-resources-share first.
The project's web network policy must allow github.com egress, or the
clone fails (the bootstrap degrades to a no-op in that case).
Resolve the target from the flag, or ask the user (default --env-script).
Confirm the source URL — https://github.com/Takazudo/claude-resources.
--committed)Write these two files into the target project. If .claude/settings.json already
exists, merge the SessionStart hook into it rather than overwriting.
.claude/settings.json:
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "/bin/bash \"$CLAUDE_PROJECT_DIR/.claude/web-bootstrap.sh\""
}
]
}
]
}
}
.claude/web-bootstrap.sh (chmod +x):
#!/bin/bash
# Web-only: load the author's shared Claude config into this web session by
# cloning the public claude-resources mirror and running its web loader.
# No-ops on the local terminal; degrades gracefully if github.com is unreachable.
set -euo pipefail
[ "${CLAUDE_CODE_REMOTE:-}" = "true" ] || exit 0
# --self-only gate (uncomment to limit loading to YOUR web sessions on a shared
# repo) WITHOUT committing any personal identifier. Opt in by setting
# CLAUDE_WEB_PROFILE_OPT_IN=1 in your per-user web env (Claude Code on the web →
# Environment variables — per-account, not tracked in git). Other accounts that
# never set it no-op; it supports multiple accounts (each opts in), survives
# account switches (set the var in the new account's env — no source change), and
# fails loudly, not silently.
# [ "${CLAUDE_WEB_PROFILE_OPT_IN:-}" = "1" ] || {
# echo "web-bootstrap: CLAUDE_WEB_PROFILE_OPT_IN not set — skipping" >&2
# exit 0
# }
SRC="$HOME/.claude-src"
URL="https://github.com/Takazudo/claude-resources"
if [ -d "$SRC/.git" ]; then
git -C "$SRC" pull --ff-only 2>/dev/null || true
else
git clone --depth 1 "$URL" "$SRC" 2>/dev/null || {
echo "claude-resources unreachable (network policy?) — skipping web profile"
exit 0
}
fi
bash "$SRC/scripts/setup-web.sh"
If --self-only is passed, uncomment the marker gate above. It gates on a marker
env var the user sets in their per-user web environment (Claude Code on the
web → Environment variables), e.g. CLAUDE_WEB_PROFILE_OPT_IN=1 — never on a
committed email/identity. This keeps any personal identifier out of the repo, is
deterministic (no dependency on the harness-supplied $CLAUDE_CODE_USER_EMAIL,
which can be unset or wrong on web), supports multiple accounts (each opts in
independently) and survives account switches (set the var in the new account's
env — no source change), and fails loudly. Tell the user to add
CLAUDE_WEB_PROFILE_OPT_IN=1 to each repo's web env vars once. Then commit both
files (use /commits) and push.
Avoid an email/hash-literal gate (
$CLAUDE_CODE_USER_EMAIL == [email protected]): it bakes identity into source, breaks on account switch, and depends on the harness email var being populated on web — a silent-failure trap.
--env-script, default)Do not write into the repo. Print the block below for the user to paste into their web environment's setup script field (Claude Code on the web → env settings). It only affects that user's sessions and is not tracked in git:
set -euo pipefail
SRC="$HOME/.claude-src"
URL="https://github.com/Takazudo/claude-resources"
if [ -d "$SRC/.git" ]; then
git -C "$SRC" pull --ff-only 2>/dev/null || true
else
git clone --depth 1 "$URL" "$SRC" 2>/dev/null || { echo "claude-resources unreachable — skipping"; exit 0; }
fi
bash "$SRC/scripts/setup-web.sh"
State which target was applied, the files written (committed mode) or where to
paste (env-script mode), and the two prerequisites (mirror must carry web/;
network policy must allow github.com).
settings.local.json is not an option — it is git-ignored and never
reaches the web container, which clones from the remote.
The bootstrap is plain bash and needs no skills pre-installed, so the first web
session self-populates ~/.claude.
setup-web.sh sources from its own location, so it correctly copies the
cloned mirror's config (not the consumer project) into ~/.claude.
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesConfigures SessionStart hook to install missing tools (helm, terraform, tflint, actionlint, gitleaks, just, pre-commit) for Claude Code web sessions when pre-commit hooks or justfile recipes fail due to absent infrastructure tools.
Generates Claude Code project setups including CLAUDE.md, hooks, permissions, commands, and agents. Analyzes stack (TypeScript, JavaScript, Python, Go, Rust, etc.) to create minimal/standard/full configs.
Generates SessionStart hook for Claude Code web sessions to auto-install dependencies, detect project stack/package manager/test runner/linter, and verify tests/linters on repo setup.