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 warningsvalidate.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.shvalidate-skills.sh
Usage: ./scripts/validate-skills.sh [path/to/skills]
Validates skill files for completeness and quality:
| Check | Type |
|---|---|
| YAML frontmatter exists | Required |
name field present | Required |
description field (10-200 chars) | Required |
| Problem/Solution/Verification sections | Required |
| Context/Notes sections | Optional |
| Unfilled placeholders | Warning |
| Code examples present | Warning |
| Extended structure consistency | Info |
./scripts/validate-skills.shstatusline.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.42convert.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.
| Flag | Description |
|---|---|
--out <dir> | Output directory (default: ../web/content/docs) |
--agents | Also generate agent docs from .claude/agents/*.md |
--dry-run | Show 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/contentbuild-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.
| Flag | Description |
|---|---|
| (none) | Build all templates |
--list | List available templates and blocks |
--dry-run | Show 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-auditTemplates 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}}.