init-scaffolding

init-scaffolding is a command for coding agents from komluk/scaffolding. It costs 0 tokens per session (1,440 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

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

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/komluk/scaffolding/init-scaffolding
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Or install scaffolding, the plugin that ships this one along with the rest of its 35 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.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.svg" alt="Measured on agentmods" 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,440 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.00000 $0.01440
Opus 5 $0.00000 $0.00720
Sonnet 5 $0.00000 $0.00288
Haiku 4.5 $0.00000 $0.00144

Measured 5d ago against content hash 1be747a88546, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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.

5. Copies `settings.json` to `$CWD/.claude/settings.json` — always overwrites with latest from plugin
commands/init-scaffolding.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 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/ to .gitignore
  4. Copies CLAUDE.md to $CWD/CLAUDE.md — always overwrites with latest from plugin
  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 · 151 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. 5d 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 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,440 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.