init-scaffolding

init-scaffolding is a command for Claude Code from komluk/scaffolding. It costs 0 tokens per session (1,803 once invoked), scanned B, original, MIT.

A project setup command that creates the files and folders used by a scaffolding system, including instructions, settings, hooks, and a private working-data directory. Scaffolding means the initial structure that helps a new project follow shared conventions.

In plain words
What is it for?
Run it at the root of a prepared project to create or refresh CLAUDE.md, settings, hooks, and the .scaffolding directory structure.
Why use it?
It saves you from copying setup files by hand and makes the agent’s project rules available from the project root. It also records the generated working-data directory in Git’s ignore list.

Command for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

Part of the scaffolding plugin — 39 skills, 9 commands, 13 agents shipped together

Good fit Run it at the root of a prepared project to create or refresh CLAUDE.md, settings, hooks, and the .scaffolding directory structure.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/komluk/scaffolding/init-scaffolding
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.

Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Made for: Claude Code.

Or install scaffolding, the plugin that ships this one along with the rest of its 39 skills, 9 commands, 13 agents.

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 init-scaffolding

README.md
[![agentmods](https://agentmods.dev/badge/commands/komluk/scaffolding/init-scaffolding/github.svg)](https://agentmods.dev/commands/komluk/scaffolding/init-scaffolding)
Your own site
<a href="https://agentmods.dev/commands/komluk/scaffolding/init-scaffolding"><img src="https://agentmods.dev/badge/commands/komluk/scaffolding/init-scaffolding/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 init-scaffolding

Your own site · 80×15
<a href="https://agentmods.dev/commands/komluk/scaffolding/init-scaffolding"><img src="https://agentmods.dev/badge/commands/komluk/scaffolding/init-scaffolding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 1,803 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.00000 $0.01803
Opus 5.5 $0.00000 $0.00721
Sonnet 5.5 $0.00000 $0.00361
Haiku 4.5 $0.00000 $0.00180

Measured 14d ago against content hash ff0420ebc5e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

init-scaffolding 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 14d 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.

grep -q "^\.claude/worktrees/" .gitignore || printf '\n# Claude Code legacy native worktrees\n.claude/worktrees/\n' >> .gitignore
commands/init-scaffolding.md · 163 lines

How it starts

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

/init-scaffolding Command

Bootstrap a new project with the scaffolding CLAUDE.md, settings.json, and .scaffolding/ directory structure.

Usage

/init-scaffolding

Run from the root of a project that was set up via /plugin install scaffolding@komluk-scaffolding. This command creates the .scaffolding/ directory structure, copies the routing protocol and settings into the project so Claude respects the agent delegation rules on every session.

What It Does

  1. Locates the installed plugin directory (searches known marketplace cache paths)
  2. Creates .scaffolding/ directory structure for agent memory, conversations, and specs
  3. Adds .scaffolding/ and .claude/worktrees/ to .gitignore
  4. Installs the routing protocol in $CWD/CLAUDE.md — never overwrites an existing file: left alone if it already has the protocol or an @...CLAUDE.md import, otherwise the protocol is appended (a new file is created if absent)
  5. Copies settings.json to $CWD/.claude/settings.json — always overwrites with latest from plugin
  6. Copies hooks/*.sh to $CWD/.claude/hooks/ — always overwrites with latest from plugin
  7. Reports what was copied

Steps

Follow these steps exactly:

1. Find the plugin root directory

Search for the plugin in the known Claude Code plugin cache location:

PLUGIN_ROOT=""

# Search helper: find latest version directory containing CLAUDE.md under a base path
find_plugin_root() {
  local base="$1"
  [ -d "$base" ] || return
  # Try versioned path: base/scaffolding/<version>/CLAUDE.md
  local latest
  latest=$(find "$base" -name "CLAUDE.md" -path "*/scaffolding/*/CLAUDE.md" 2>/dev/null | sort -V | tail -1 | xargs dirname 2>/dev/null || true)
  if [ -n "$latest" ] && [ -f "$latest/CLAUDE.md" ]; then
    echo "$latest"
    return
  fi
  # Fallback: any CLAUDE.md anywhere under this base
  latest=$(find "$base" -name "CLAUDE.md" 2>/dev/null | sort -V | tail -1 | xargs dirname 2>/dev/null || true)
  if [ -n "$latest" ] && [ -f "$latest/CLAUDE.md" ]; then
    echo "$latest"
    return
  fi
}

# Unix / macOS (Linux, macOS, WSL)
for base in \
  "$HOME/.claude/plugins/cache/komluk-scaffolding" \
  "$HOME/.claude/plugins/marketplaces/komluk-scaffolding"; do
  found=$(find_plugin_root "$base")
  if [ -n "$found" ]; then
    PLUGIN_ROOT="$found"
    break
  fi
done

# Windows (Git Bash / MSYS2) — USERPROFILE and LOCALAPPDATA are set by the shell
if [ -z "$PLUGIN_ROOT" ]; then
  for base in \
    "${USERPROFILE:-}/.claude/plugins/cache/komluk-scaffolding" \
    "${LOCALAPPDATA:-}/claude/plugins/cache/komluk-scaffolding"; do
    [ -n "$base" ] || continue
    found=$(find_plugin_root "$base")
    if [ -n "$found" ]; then
      PLUGIN_ROOT="$found"
      break
    fi
  done
fi

echo "Plugin root: ${PLUGIN_ROOT:-NOT FOUND}"

Read the full file on GitHub · 163 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. 14d ago Changed · -1 lines ff0420ebc5e4
  2. 15d ago Changed · +7 lines 77f0d50b22e1
  3. 16d ago Changed · +6 lines 81006b3e7188
  4. 2mo ago First seen · 151 lines · 0 tokens per session scan B 1be747a88546

Subscribe to this mod's changes

init-scaffolding is a command published in the GitHub repository komluk/scaffolding (15 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,803 tokens. 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.