From Claude Code Setup
Install and adapt this verification bundle (claim-guard, scope-lock, bash guard) into the current project. Use when the user says 'install this setup', 'set up claude code for this project', 'add these hooks', 'deploy the guardrails', or points at the claude-code-setup repo and asks to apply it. Reads the project first, asks a few questions, shows a plan, and only then writes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-setup:deploy-setupThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are installing guardrails into **someone else's working project**. The
You are installing guardrails into someone else's working project. The failure mode is not "install too little" — it is destroying a config that took them months. Eight such incidents are documented publicly; in one, an installer removed an MCP server and reduced four custom agents to stubs, losing ~600 lines while reporting "preserving configuration".
Read docs/instruction-mechanics.md if you have not. It explains why these
specific hooks exist. Do not install mechanisms you cannot explain to the user.
CLAUDE.md. Append inside a marked block, or
write alongside. Same for any file the user already has.settings.json if the plugin path is available. Hooks
ride in hooks/hooks.json inside the plugin. That file is the whole reason
this bundle is a plugin.tests/run-all.sh and shown the
output.Before touching anything:
.claude/ exists, copy it to .claude.backup-<timestamp>/Claude Code keeps its own timestamped backups of settings.json, but only the
last five — a multi-step install can push the pre-install state out of the
window. Do not rely on it.
Do this with your own tools; there is no detector script and there should not be.
package.json /
pyproject.toml / Cargo.toml / go.mod for the restnx.json, turbo.json, pnpm-workspace.yaml) — these can
coexist, do not stop at the firstCLAUDE.md, AGENTS.md, .cursorrules,
.claude/settings.json, .claude/hooks/, installed pluginspython3 must exist. Check it. A hook whose
interpreter is missing is not an error — it is silently treated as absent, so
a guard you install would quietly guard nothing..claude/skills/config-audit/ is present, running its audit-config.py
gives you a fast structured read of what is already thereReport what you found in three or four lines. Do not narrate the whole repo.
At most three questions. Lead with the profile; it frames everything else.
| Profile | Hooks | For |
|---|---|---|
| core | scope-lock, claim-guard trio, stop-evaluator, bash-validator | the default — three mechanisms, no opinions |
| core + git | above + branch and checkout guards | teams with a branch discipline worth enforcing |
| full | above + telemetry, reminders, staleness, prompt classifier | mature repos with docs to keep fresh |
Anything past core is opinionated and imposes the author's workflow. Say that
out loud rather than letting them discover it.
Second question, only if their answer to the first leaves it open: do they want
a CONTRACT.md with a writable-path allowlist. This is the mechanism for "stop
inventing files I did not ask for". If yes, you need the list of paths, and that
requires knowing what they are building — ask.
If AskUserQuestion is unavailable (you are running as a subagent, or in a
harness without it), fall back to a numbered list in plain text and wait. Never
guess an answer to skip the stop.
A three-column list, no prose:
CREATE .claude/scope-lock.json allowlist for writable paths
CREATE CONTRACT.md human-readable contract
APPEND CLAUDE.md 5 lines, inside <!-- setup:begin --> markers
LINK ~/.claude/skills/claude-code-setup plugin (carries the hooks)
UNTOUCHED .claude/settings.json your hooks and permissions stay as they are
Then wait. If they change anything, redo the plan — do not patch it verbally.
Only what the approved plan lists.
~/.claude/skills/<name>/ so it loads as a
skills-directory plugin on the next session. No settings.json edit.CLAUDE.md: if absent, write a short one — hard rules, stack, commands,
nothing else. If present, append inside
<!-- claude-code-setup:begin --> / <!-- claude-code-setup:end --> markers
so a future run updates only that block and leaves their prose alone.
Do not write a repository overview: measured to add cost without improving
outcomes (docs/instruction-mechanics.md §4)..claude/scope-lock.json: only if they asked for it. Without this file
the hook is inert, which is the correct default..gitignore: append the runtime-state lines listed in the README..claude/.setup-manifest.json — bundle version, the tag
or SHA installed, the list of files created or modified, and the backup path.
Without it there is no honest update and no rollback.Run tests/run-all.sh and show the user the real output.
Then state, per hook, whether it is active and what will trip it. If something is installed but cannot fire in their setup, say so plainly — a guard believed to be working while it is not is worse than no guard.
Finally: one paragraph on what changes for them tomorrow, and the exact command to undo everything (git revert, or restore the backup directory).
Read .claude/.setup-manifest.json first. Compare the recorded version with
this one. Show a diff of what would change; never overwrite files the user has
edited since install — the manifest's checksums tell you which those are. If a
file drifted, show both versions and ask.
main instead of a pinned tag — a future compromise of the source would
then propagate into every project this was ever run in~/.claude/settings.json (their global config, shared with every
other project)npx claudepluginhub akuroglo/claude-code-setup --plugin claude-code-setupGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.