Claude Code Kit

Scripts

Utility scripts included in Claude Code Kit for health checks, validation, and more.

Scripts

The kit includes utility scripts in scripts/. These are not hooks — they're standalone tools you run manually.

doctor.sh

Usage: ./scripts/doctor.sh

Health check for your Claude Code Kit installation. Verifies:

  • Core files exist (CLAUDE.md, CODEBASE_MAP.md, agent_docs/, tasks/)
  • Hook files are executable
  • settings.json is valid JSON
  • Hooks in .claude/hooks/ are referenced in settings.json (detects orphans)
  • CODEBASE_MAP.md has no unfilled placeholders
  • Agents and skills directories exist with expected counts
  • Skills pass validation (if validate-skills.sh is available)
./scripts/doctor.sh
  Claude Code Kit — Doctor
  ========================

  Core files
  ----------
  ✓ CLAUDE.md exists
  ✓ CODEBASE_MAP.md exists
  ✓ agent_docs/ exists
  ✓ tasks/ exists

  Hooks
  -----
  ✓ .claude/hooks/ exists
  ✓ protect-files.sh is executable
  ✓ branch-protect.sh is executable
  ...

  Summary
  -------
  18 passed, 0 failed, 1 warnings

validate.sh

Usage: ./scripts/validate.sh [path/to/CODEBASE_MAP.md]

Checks CODEBASE_MAP.md for unfilled placeholders and empty sections. Detects patterns like [command], [module], ..., and HTML comments.

./scripts/validate.sh

validate-skills.sh

Usage: ./scripts/validate-skills.sh [path/to/skills]

Validates skill files for completeness and quality:

CheckType
YAML frontmatter existsRequired
name field presentRequired
description field (10-200 chars)Required
Problem/Solution/Verification sectionsRequired
Context/Notes sectionsOptional
Unfilled placeholdersWarning
Code examples presentWarning
Extended structure consistencyInfo
./scripts/validate-skills.sh

statusline.sh

Usage: Configure in .claude/settings.json

Status line script that shows model name, git branch, context usage (progress bar), and session cost.

{
  "statusLine": {
    "command": "./scripts/statusline.sh"
  }
}

Reads JSON from stdin with fields: model, contextWindow, contextUsed, costUSD, sessionId.

Output example:

opus-4 | feat/my-branch | ████████░░ 80% | $0.42

convert.sh

Usage: ./scripts/convert.sh

Multi-tool export script for converting agent definitions to different formats.


gen-skill-docs.sh

Usage: ./scripts/gen-skill-docs.sh [--out <dir>] [--agents] [--dry-run]

Generates web-ready Fumadocs MDX documentation from SKILL.md files. Reads each .claude/skills/*/SKILL.md, strips YAML frontmatter, and produces a Fumadocs-compatible MDX file. With --agents, also generates agent docs from .claude/agents/*.md. This prevents drift between kit skills/agents and web documentation.

FlagDescription
--out <dir>Output directory (default: ../web/content/docs)
--agentsAlso generate agent docs from .claude/agents/*.md
--dry-runShow what would be generated without writing files
# Generate all skill docs to default output directory
./scripts/gen-skill-docs.sh

# Generate skill + agent docs
./scripts/gen-skill-docs.sh --agents

# Preview without writing
./scripts/gen-skill-docs.sh --dry-run

# Custom output directory
./scripts/gen-skill-docs.sh --out ./docs/content

build-skills.sh

Usage: ./scripts/build-skills.sh [--list | --dry-run | <name>]

Builds SKILL.md files from .tmpl templates by replacing {{PLACEHOLDER}} tags with content from shared blocks.

FlagDescription
(none)Build all templates
--listList available templates and blocks
--dry-runShow what would be generated without writing
<name>Build a single template by name
# List available blocks and templates
./scripts/build-skills.sh --list

# Preview what would be generated
./scripts/build-skills.sh --dry-run

# Build all templates
./scripts/build-skills.sh

# Build a single skill
./scripts/build-skills.sh code-quality-audit

Templates live in .claude/skills/_templates/*.tmpl and shared blocks in .claude/skills/_shared/blocks/*.md. The block filename maps to the placeholder: preamble.md becomes {{PREAMBLE}}, scope-rules.md becomes {{SCOPE_RULES}}.