Automation Scripts

18 Automation Scripts

Setup, maintenance, repo management, and utility scripts that keep the toolkit running smoothly.

Setup5 scripts
Setup

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

Setup

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

Setup

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

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

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

Maintenance5 scripts
Maintenance

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

Maintenance

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

Maintenance

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

Maintenance

regenerate-index.sh

Regenerate skills/MASTER_INDEX.md from skill files.

When to run: After adding/removing skills

Maintenance

update-counts.sh

Wrapper around the canonical count generator (generate-counts.mjs).

When to run: After adding/removing skills, agents, or marketplace repos

Repo Management2 scripts
Repo Management

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

Repo Management

_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

Utilities3 scripts
Utilities

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

Utilities

fix-plugin-line-endings.sh

Convert CRLF to LF in plugin files (Linux/Mac).

When to run: After encountering line ending issues

Utilities

fix-plugin-line-endings.ps1

Convert CRLF to LF in plugin files (Windows).

When to run: After encountering line ending issues on Windows

Git Hooks3 scripts
Git Hooks

hooks/commit-msg.sh

Enforce conventional commit message format.

When to run: Automatically on every commit

Git Hooks

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

Git Hooks

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