setup

An installation command for deploying a collection of Claude Code files, including skills, commands, sounds, hooks, and plugins. It can install them for all projects or only the current project.

In plain words
What is it for?
Use it to install the files described by the project's manifest into a global or project-local Claude Code directory.
Why use it?
It removes the need to copy each part of the collection manually and handles platform-specific setup details.

Command for Claude Code

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/koolamusic/claudefiles/setup
Clone the repo
git clone --depth 1 https://github.com/koolamusic/claudefiles

Made for: Claude Code.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,622 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00024 $0.02622
Opus 5 $0.00012 $0.01311
Sonnet 5 $0.00005 $0.00524
Haiku 4.5 $0.00002 $0.00262

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

Security

Grade B, and why

setup 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 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.

Users can enable later by hand: copy the relevant `settings:` fragment from `claudefiles.yaml` into their `~/.claude/settings.json` (or project-local `.claude/settings.json`), or set `"enabledPlugins": { "<plugin>": true
.claude/commands/setup.md · 207 lines

How it starts

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

Your task

Install claudefiles by reading the manifest and deploying everything to the target directory.

Step 1: Read the manifest

Read claudefiles.yaml in this repo root. It declares what gets installed and how.

Step 2: Ask install target

Ask the user:

  • Global (recommended): Install to ~/.claude/ — available in all Claude Code sessions
  • Local: Install to ./.claude/ in the current project only

Step 3: Detect platform

Determine if running on macOS or Linux to resolve the {{sound_player}} template variable:

  • macOS → afplay
  • Linux → aplay
uname -s

Step 4: Create target directories

mkdir -p <target>/skills
mkdir -p <target>/commands
mkdir -p <target>/sounds
mkdir -p <target>/hooks

Step 5: Copy files

Copy the contents declared in install.targets:

# Skills — copy each skill directory
cp -R skills/* <target>/skills/

# Commands — copy all .md files
cp commands/*.md <target>/commands/

# Sounds — copy all files
cp sounds/* <target>/sounds/

# Hooks — copy all hook scripts and make executable
cp hooks/* <target>/hooks/
chmod +x <target>/hooks/*

Step 6: Deploy nvim plugin overlays (skip per-file if exists)

Overlay dotfiles/nvim/lua/plugins/ onto ~/.config/nvim/lua/plugins/. The nvim_plugins target in the manifest has skip_if_exists: true at the file level — never overwrite an existing plugin file the user already customized.

mkdir -p ~/.config/nvim/lua/plugins
for src in dotfiles/nvim/lua/plugins/*; do
  name=$(basename "$src")
  dest="$HOME/.config/nvim/lua/plugins/$name"
  if [ -e "$dest" ]; then
    echo "nvim plugin $name already exists — skipping"
  else
    cp "$src" "$dest"
    echo "nvim plugin $name installed"
  fi
done

Record per-file outcomes for the summary.

Step 7: Smart-merge global CLAUDE.md

Deploy the global agent directives to <target>/CLAUDE.md using a smart-merge strategy:

  1. Read dotfiles/CLAUDE.md from this repo (the source directives)
  2. If <target>/CLAUDE.md already exists and is non-empty: a. Back it up: cp <target>/CLAUDE.md <target>/CLAUDE.md.backup b. Read the existing CLAUDE.md c. Smart-merge: Compare by section header (## headings). For each section in the source:
    • If the section doesn't exist in the target → append it
    • If the section exists in the target → keep the target's version (user customizations win) d. Preserve any sections in the target that don't exist in the source (user's custom sections)
  3. If <target>/CLAUDE.md doesn't exist or is empty, copy the source as-is

Read the full file on GitHub · 207 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 · 207 lines · 24 tokens per session scan B f69e445bf62e

Subscribe to this mod's changes

setup is a command published in the GitHub repository koolamusic/claudefiles (132 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 2,622 once invoked, about $0.0001 per session on Opus 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.