setup:existing

setup:existing is a command for Claude Code from stefan-jansen/claude-code-toolkit. It costs 12 tokens per session (1,298 once invoked), scanned B, original, MIT.

A setup command that adds the Claude Code Framework to an existing software project and detects its language and development tools.

In plain words
What is it for?
Adding framework support to projects using languages such as Python, JavaScript, Go, or Rust, including frameworks such as Django, FastAPI, Next.js, or Express.
Why use it?
It avoids manually identifying the project type and creating the framework's folders and files.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/stefan/agents/plugins.

Part of the setup plugin — 1 skill, 6 commands shipped together

Good fit Adding framework support to projects using languages such as Python, JavaScript, Go, or Rust, including frameworks such as Django, FastAPI, Next.js, or Express.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add stefan-jansen/claude-code-toolkit
Claude Code
/plugin install setup

Made for: Claude Code.

Or install setup, the plugin that ships this one along with the rest of its 1 skill, 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup:existing

README.md
[![agentmods](https://agentmods.dev/badge/commands/stefan-jansen/claude-code-toolkit/setup-existing/github.svg)](https://agentmods.dev/commands/stefan-jansen/claude-code-toolkit/setup-existing)
Your own site
<a href="https://agentmods.dev/commands/stefan-jansen/claude-code-toolkit/setup-existing"><img src="https://agentmods.dev/badge/commands/stefan-jansen/claude-code-toolkit/setup-existing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup:existing

Your own site · 80×15
<a href="https://agentmods.dev/commands/stefan-jansen/claude-code-toolkit/setup-existing"><img src="https://agentmods.dev/badge/commands/stefan-jansen/claude-code-toolkit/setup-existing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,298 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.01298
Opus 5.5 $0.00005 $0.00519
Sonnet 5.5 $0.00002 $0.00260
Haiku 4.5 $0.00001 $0.00130

Measured 3mo ago against content hash 9ed5c9d09b1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

setup:existing scanned grade B with 1 finding 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 3mo 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.

cat >> .claude/transitions/$(date +%Y-%m-%d)/$(date +%H).md << 'EOF'
plugins/setup/commands/setup:existing.md · 178 lines

How it starts

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

Add Claude Framework to Existing Project

I'll add the Claude Code Framework to your existing project, auto-detecting the language and framework.

readonly CLAUDE_DIR=".claude"

echo "🔧 Adding Claude Code Framework to existing project..."
echo ""

# Auto-detect project type using shared-setup-patterns skill
echo "Detecting project characteristics..."

# Use framework detection patterns from skill to identify:
# - Language (Python, JavaScript, Go, Rust)
# - Framework (FastAPI, Django, Next.js, Express, etc.)
# - Tools (pytest, Jest, etc.)

# Create .claude directory structure
mkdir -p $CLAUDE_DIR/work
mkdir -p $CLAUDE_DIR/memory
mkdir -p $CLAUDE_DIR/reference
mkdir -p $CLAUDE_DIR/hooks
mkdir -p $CLAUDE_DIR/transitions

# Create hourly transition hook
cat > $CLAUDE_DIR/hooks/init-transition.sh << 'HOOK_EOF'
#!/bin/bash
# Initialize hourly transition file for session progress tracking
set -e
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
TRANSITIONS_DIR="$PROJECT_ROOT/.claude/transitions"
TODAY=$(date +%Y-%m-%d)
HOUR=$(date +%H)
TODAY_DIR="$TRANSITIONS_DIR/$TODAY"
HOURLY_FILE="$TODAY_DIR/${HOUR}.md"
mkdir -p "$TODAY_DIR"
if [ ! -f "$HOURLY_FILE" ]; then
    echo "# Session Progress: $TODAY ${HOUR}:00" > "$HOURLY_FILE"
    echo "" >> "$HOURLY_FILE"
    echo "---" >> "$HOURLY_FILE"
    echo "" >> "$HOURLY_FILE"
fi
exit 0
HOOK_EOF
chmod +x $CLAUDE_DIR/hooks/init-transition.sh
echo "✅ Created .claude/hooks/init-transition.sh (hourly progress tracking)"

# Get absolute path for hook
HOOK_PATH="$(pwd)/$CLAUDE_DIR/hooks/init-transition.sh"

# Create settings.json with plugins and hooks
cat > $CLAUDE_DIR/settings.json << SETTINGS_EOF
{
  "extraKnownMarketplaces": {
    "local": {
      "source": {
        "source": "directory",
        "path": "/home/stefan/agents/plugins"
      }
    }
  },
  "enabledPlugins": {
    "system@local": true,
    "workflow@local": true,
    "memory@local": true,
    "development@local": true,
    "transition@local": true
  },
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "$HOOK_PATH"
          }
        ]
      }
    ]
  }
}
SETTINGS_EOF
echo "✅ Created .claude/settings.json with plugins + transition hook"
echo ""
echo "I'll also create:"
echo "  - .claude/memory/* (project knowledge files)"
echo "  - CLAUDE.md (project instructions)"
echo ""

# Create project CLAUDE.md with progress tracking
PROJECT_NAME=$(basename "$PWD")
cat > CLAUDE.md << 'CLAUDE_EOF'
# PROJECT_NAME_PLACEHOLDER

## 🔄 Session Progress Tracking (MANDATORY)

**Write progress to the current hourly transition file throughout the session.**

**File**: `.claude/transitions/YYYY-MM-DD/HH.md` (hook creates this automatically)

### When to Update (Every 15-20 minutes or at milestones)

Append to the **current hour's file** with:
```markdown

Read the full file on GitHub · 178 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. 3mo ago First seen · 178 lines · 12 tokens per session scan B 9ed5c9d09b1e

Subscribe to this mod's changes

setup:existing is a command published in the GitHub repository stefan-jansen/claude-code-toolkit (101 stars, last pushed 4mo ago), licensed MIT. It adds 12 tokens to every session and 1,298 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

setup:existing compared with commands from other repositories

setup:existing next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
setup:existingstefan-jansen/claude-code-toolkitCommand1014mo agoMITB12Claude Code
pull-repostravisjneuman/.claudeCommand115yesterdayMITA13Claude Code
update-countstravisjneuman/.claudeCommand115yesterdayMITA13Claude Code
workflow-classifysangrokjung/claude-forgeCommand8862mo agoMITA18Claude Code
create-task-list.templateevan043/claude-cli-advanced-starter-packCommand624mo agoMITA0Claude Code
todo.templateevan043/claude-cli-advanced-starter-packCommand624mo agoMITA0Claude Code
update-check.templateevan043/claude-cli-advanced-starter-packCommand624mo agoMITA0Claude Code