add-custom

A command for adding a company or personal Git repository as a custom module source for claude-code-setup. Git repositories are folders tracked and downloaded with Git.

In plain words
What is it for?
Validating a repository URL, cloning a custom module repository, updating an existing matching checkout, and recording its version and URL.
Why use it?
It checks repository URLs and existing local files before cloning or updating, helping prevent accidental replacement of another custom repository.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/b33eep/claude-code-setup/add-custom
Clone the repo
git clone --depth 1 https://github.com/b33eep/claude-code-setup
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 783 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00783
Opus 5 $0.00000 $0.00392
Sonnet 5 $0.00000 $0.00157
Haiku 4.5 $0.00000 $0.00078

Measured 2d ago against content hash 669e10b341d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

add-custom scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

version=$(cat ~/.claude/custom/VERSION 2>/dev/null || echo "0")

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/.claude/custom
commands/add-custom.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add Custom Modules

Add a custom module repository (company or personal) to claude-code-setup.

Usage

/add-custom <git-url>

Tasks

  1. Validate URL format

    • Accept: git@... or https://...
    • Reject: plain http:// (insecure)
    • If invalid, show error and expected formats
  2. Check if ~/.claude/custom already exists

    • If exists and is a git repo:
      • Get current remote: git -C ~/.claude/custom remote get-url origin
      • If same URL: skip clone, run git pull instead
      • If different URL: warn and abort
    • If exists but NOT a git repo: warn and abort
    • If doesn't exist: proceed with clone
  3. Clone repository

    git clone <url> ~/.claude/custom
    
  4. Read VERSION and update installed.json

    • Read ~/.claude/custom/VERSION (if exists)
    • Update ~/.claude/installed.json:
      # Only if VERSION exists and installed.json exists
      if [[ -f ~/.claude/custom/VERSION ]] && [[ -f ~/.claude/installed.json ]]; then
          version=$(cat ~/.claude/custom/VERSION 2>/dev/null || echo "0")
          jq --arg v "$version" --arg u "<url>" \
             '.custom_version = ($v | tonumber) | .custom_url = $u' \
             ~/.claude/installed.json > tmp && mv tmp ~/.claude/installed.json
      fi
      
    • If VERSION doesn't exist, skip (legacy custom repo without versioning)
  5. Show available modules

    • Count skills in ~/.claude/custom/skills/
    • Count MCP servers in ~/.claude/custom/mcp/
    • Display: "Found X skills, Y MCP servers"
    • Display: "Custom version: vX" (if VERSION exists)
  6. Hint next step

    • "Run /claude-code-setup to select and install modules"

Output

Success (new clone):

Cloned custom modules from <url>

Custom version: v1
Found:
- 3 skills
- 2 MCP servers

Run /claude-code-setup to select and install modules.

Success (existing, pulled):

Custom repo already configured. Pulled latest changes.

Custom version: v2 (was v1)
Found:
- 3 skills
- 2 MCP servers

Run /claude-code-setup to install new modules.

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 122 lines · 0 tokens per session scan D 669e10b341d9

Subscribe to this mod's changes

add-custom is a command published in the GitHub repository b33eep/claude-code-setup (56 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 783 tokens. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories