Automation Scripts
18 Automation Scripts
Setup, maintenance, repo management, and utility scripts that keep the toolkit running smoothly.
init-marketplaces.sh
Clone every marketplace listed in the .gitmodules manifest fresh from its upstream, with push disabled (no_push).
When to run: To re-clone marketplaces or fix wrong remotes
install.sh
One-line installer (curl-pipe) for a fresh machine with no ~/.claude yet.
When to run: First-time setup on a clean machine
install-in-place.sh
Turns an existing ~/.claude (created by Claude Code itself) into a checkout of the toolkit without deleting anything. Tracked files it would overwrite are backed up first, extra settings.json keys are merged back, and it only fast-forwards.
When to run: Installing on a machine where Claude Code has already run
setup-hooks.sh
Install the repo's git hooks as thin wrappers that exec the tracked scripts in scripts/hooks/, so hook updates arrive with a normal pull.
When to run: After cloning
setup-new-machine.sh
Full setup pass: no_push protection on marketplace clones, marketplace registration, plugin installs, and verification.
When to run: After cloning the repo
generate-counts.mjs
Canonical public-source snapshot producer: committed marketplace HEAD blobs, complete manifest coverage, revisions/digests/date, public identity lists, numeric docs and explicit consumer destinations. --check is read-only; conflicting modes are rejected.
When to run: Explicitly after reviewed source changes, when publication is authorized
generate-index.mjs
Build the discovery layer from what is on disk: INDEX.md, index/graph.json, skills/MASTER_INDEX.md, and the name-only skillOverrides in settings.json (core tiers come from index/tiers.json).
When to run: Explicitly after public discovery/tiering changes, before refreshing counts
generate-showcase-images.mjs
Render count-bearing showcase screenshots from counts.json only through an explicit reviewed DESK renderer/work-folder contract. No implicit portfolio delivery.
When to run: Separately approved media operation after reviewing changed counts
regenerate-index.sh
Regenerate skills/MASTER_INDEX.md from skill files.
When to run: After adding/removing skills
update-counts.sh
Wrapper around the canonical count generator (generate-counts.mjs).
When to run: After adding/removing skills, agents, or marketplace repos
add-marketplace.sh
Add a marketplace: writes a manifest-only .gitmodules entry (no gitlink, no content), clones it locally into the gitignored plugins/marketplaces/ with no_push, and regenerates the index.
When to run: When adding a new marketplace repo
_pull-all-repos.sh
Fast-forward pulls the toolkit, every marketplace clone in the .gitmodules manifest (cloning missing ones), and optionally your project repos, enforcing no_push. Skips dirty or detached repos and never commits or pushes.
When to run: Runs daily in the background at session start; /pull-repos forces it
fix-marketplace-paths.sh
Fix OS-specific paths in known_marketplaces.json for cross-platform compatibility.
When to run: After running claude plugins install on a new machine
fix-plugin-line-endings.sh
Convert CRLF to LF in plugin files (Linux/Mac).
When to run: After encountering line ending issues
fix-plugin-line-endings.ps1
Convert CRLF to LF in plugin files (Windows).
When to run: After encountering line ending issues on Windows
hooks/commit-msg.sh
Enforce conventional commit message format.
When to run: Automatically on every commit
hooks/pre-commit.sh
Block staged marketplace clones/gitlinks, private-pattern leaks, credentials and ignored runtime files. No automatic generation, staging, budget checks or tests.
When to run: Automatically before every commit
hooks/pre-push.sh
Block unapproved non-fast-forward pushes to main/master and gitlinks or marketplace content in HEAD.
When to run: Automatically before every push