Skip to content
Development
Command

/claude-code-setup

Manage your claude-code-setup installation: check status, upgrade, install, and remove modules.

From plugin
5712 skills12 commands1 hooks
shell
$ npx -y skills add b33eep/claude-code-setup --agent claude-code

Ships with claude-code-setup. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/claude-code-setup

Context preview

What this command does when you run it.

Manage your claude-code-setup installation: check status, upgrade, install, and remove modules.

Command definition

claude-code-setup.md

Claude Code Setup

Manage your claude-code-setup installation: check status, upgrade, install, and remove modules.

**Goal:** Any scenario completes in 2 permission prompts (1 discover + 1 execute).

Phase 1: Discovery (1 Bash call)

Clone repo and run setup-status.sh in a single Bash call:

temp=$(mktemp -d /tmp/claude-setup-XXXXXX) && \
git clone --depth 1 https://github.com/b33eep/claude-code-setup.git "$temp" 2>/dev/null && \
"$temp/lib/setup-status.sh"

The script reads `installed.json` and `templates/VERSION`, compares modules, and outputs JSON.

Parse the JSON output. Handle errors:

  • **Bash call fails** (no network, git clone fails):
  Unable to reach GitHub.

  Manual upgrade:
    cd /path/to/claude-code-setup
    git pull
    ./install.sh --update

Stop here.

  • **JSON has `"error": "not_installed"`** (no installed.json):
  claude-code-setup is not installed. Run install.sh first.

Clean up: `rm -rf "$temp"` → Stop.

  • **Success**: Parse JSON fields. The `temp_dir` field contains the repo path. Continue to Phase 2.

JSON structure reference

{
  "temp_dir": "/tmp/claude-setup-XXXXXX",
  "base": { "installed": 50, "available": 52, "update_available": true },
  "custom": { "configured": true, "installed": 1, "available": 2, "update_available": true, "commands": ["catchup.md"], "scripts": ["helper.sh"] },
  "new_modules": { "skills": ["name"], "mcp": ["name"], "plugins": ["id@marketplace"] },
  "installed_modules": { "skills": ["name"], "mcp": ["name"], "plugins": ["id@marketplace"] },
  "agent_teams": { "enabled": true }
}

Phase 2: Present + Ask (0 Bash calls)

Show status

Present a summary from the JSON:

claude-code-setup status:
- Base: v{base.installed} installed, v{base.available} available
- Custom: v{custom.installed} installed, v{custom.available} available
- Custom commands: {custom.commands} (only if non-empty)
- Custom scripts: {custom.scripts} (only if non-empty)
- Agent Teams: enabled / not configured

Modules available to install:
  Skills: {new_modules.skills}
  MCP Servers: {new_modules.mcp}
  External Plugins: {new_modules.plugins}

Version line variants:

  • Update available: `v50 installed, v52 available`
  • Up-to-date: `v52 (up-to-date)`
  • Custom not configured: `(not configured)` — add tip: `Use /add-custom <url> to add company modules.`

Agent Teams line:

  • `Agent Teams: enabled` if `agent_teams.enabled == true`
  • `Agent Teams: not configured` if `agent_teams.enabled == false`

If no new modules in any category: `All modules installed.`

Read CHANGELOG (if upgrade available)

If `base.update_available` is true, use the Read tool on `{temp_dir}/CHANGELOG.md`. Show relevant entries from content_version `base.installed` to `base.available`.

Check for new modules that require API keys

For each MCP in `new_modules.mcp`, read `{temp_dir}/mcp/{name}.json` using the Read tool. Check `requiresApiKey` field. Note which MCPs need API keys for Phase 3 handling.

AskUserQuestion (multiSelect: true)

Build options dynamically from JSON. Only include options where the condition is met:

| Condition | Option label | |-----------|-------------| | `base.update_available == true` | "Upgrade base (vX → vY)" | | `custom.update_available == true` | "Upgrade custom (vX → vY)" | | `new_modules.skills` or `new_modules.mcp` has entries | "Install new skills/MCP" | | `new_modules.plugins` has entries | "Install plugins" | | any `installed_modules` array is non-empty | "Remove modules" | | `agent_teams.enabled == false` | "Enable Agent Teams" |

If everything is up-to-date, no new modules, and Agent Teams already configured: → Show `All up-to-date.` → Clean up with a Bash call: `rm -rf "$temp"` (This path uses 2 prompts total: 1 discover + 1 cleanup. No Phase 3.)

Follow-up questions

**If user selected "Install new skills/MCP":** → Second AskUserQuestion (multiSelect) listing each module from `new_modules.skills` and `new_modules.mcp`.

**If user selected "Remove modules":** → Second AskUserQuestion (multiSelect) listing installed modules from `installed_modules.skills`, `installed_modules.mcp`, and `installed_modules.plugins`.

**If user selected "Install plugins":** → Second AskUserQuestion (multiSelect) listing each plugin from `new_modules.plugins`.

Phase 3: Execute (1 Bash call)

Build ONE chained Bash command from all user selections. **Cleanup always uses `;`** (ensures temp dir is removed even if a command in the chain fails).

Execution chains

| Action | Command segment | |--------|----------------| | Upgrade base | `cd "$temp" && ./install.sh --update --yes` | | Upgrade custom | `git -C ~/.claude/custom pull && new_v=$(cat ~/.claude/custom/VERSION 2>/dev/null \|\| echo "0") && jq --arg v "$new_v" '.custom_version = ($v \| tonumber)' ~/.claude/installed.json > ~/.claude/installed.json.tmp && mv ~/.claude/installed.json.tmp ~/.claude/installed.json && cd "$temp" && ./install.sh --refresh-custom` | | Install skill | `cd "$temp" && ./install.sh --add-skill <name>` | | Install MCP (no API key) | `cd "$temp" && ./install.sh --add-mcp <name>` | | Install MCP (API key) | See "MCP with API key" section below | | Install plugin | `claude plugin marketplace add <repo> 2>/dev/null; claude plugin install <id>@<marketplace> && jq --arg p "<id>@<marketplace>" '.external_plugins = ((.external_plugins // []) + [$p] \| unique)' ~/.claude/installed.json > ~/.claude/installed.json.tmp && mv ~/.claude/installed.json.tmp ~/.claude/installed.json` | | Remove skill | `cd "$temp" && ./install.sh --remove-skill <name>` | | Remove MCP | `cd "$temp" && ./install.sh --remove-mcp <name>` | | Remove plugin | `claude plugin remove <id> && jq '.external_plugins = (.external_plugins // [] \| map(select(. != "<id>@<marketplace>")))' ~/.claude/installed.json > ~/.claude/installed.json.tmp && mv ~/.claude/installed.json.tmp ~/.claude/installed.json` | | Enable Agent Teams | `[[ -f ~/.claude/settings.json ]] \

Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withclaude-code-setup

Persistent memory for Claude Code via Markdown files. 📖 Read the Documentation for detailed guides, tutorials, and reference.

Get the whole plugin, auto-invoked
Stats
57
Stars
0
Views
6
Forks
Maintained
Maintenance
Shell
Language
MIT
License
2mo ago
Last commit
6mo ago
Created

Repo: b33eep/claude-code-setup