From auto-repo-setup
Diagnoses and standardizes repository setup and Git workflows for Claude Code. Covers environment repair, session sync, hook diagnosis, onboarding handoff, and guarded commit/push/conflict/history-cleanup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/auto-repo-setup:auto-repo-setup [repository path][repository path]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Make the repository usable without changing the user's normal way of working.
Make the repository usable without changing the user's normal way of working. Treat setup as an evidence-driven repository task, not as a special interface for people with a particular job title.
Classify the request before changing anything. Do not combine modes merely because they all contain the word "setup".
| User outcome | Mode | First action |
|---|---|---|
| "It won't run", missing dependency, new machine | Environment repair | Read project instructions and detect the actual stack |
| "Sync before we work", "pull the latest" | Session routine | Use project instructions or execute the user's natural-language request |
| Repeated or unexpected hook output | Hook diagnosis | Count registrations and firing sessions before editing configuration |
| A teammate needs a repeatable handoff | Repository handoff | Audit existing onboarding and fill only the missing operational contract |
| Commit, push, conflict, leaked secret/history | Git safety | Read references/git_safety.md before mutation |
| Behavior must happen before the first prompt | Startup automation | Read references/startup_automation.md and pass its hook gate |
Read only files that exist, in this order:
If no onboarding guide exists, infer the setup path from authoritative manifests and exercised commands. Do not stop to ask whether to create documentation unless a durable handoff is part of the request.
Use the bundled scripts/check_env.py against the repository root when a Python 3.10+ runner is already available. It detects the declared ecosystem and checks only the relevant toolchain; it does not install dependencies or read secret values. If Python is itself the missing prerequisite, perform the same read-only manifest inventory directly instead of installing Python merely to run the audit.
uv run python scripts/check_env.py --repo <repo-root>
uv run python scripts/check_env.py --repo <repo-root> --json
Treat the inventory as evidence, not as the project setup specification. A custom runbook or CI workflow can require tools the generic inventory cannot infer.
Expected result:
For each failed requirement:
Do not restart, reinstall everything, or switch package managers as a first move. Do not print .env or credential contents; verify presence and behavior without echoing values.
Run the project's documented smoke test, build, or start command. If none exists, derive one from CI/task-runner configuration and label the derivation. Verify the observable result, not merely a zero exit code.
Report:
For "sync before work", prefer a short project instruction shared by the agents that use the repository. The routine is:
A collaborator may also simply say:
Sync the latest remote version before starting.
That is a normal Agent instruction, not a degraded fallback.
Do not register SessionStart merely to automate this routine. Static behavior belongs in AGENTS.md/CLAUDE.md; the Agent can inspect context and handle exceptional Git states instead of hiding them in a shell process.
Create or revise onboarding only when the user wants a durable handoff and the existing project map does not already provide one.
Use references/onboarding_template.md as a checklist, not as a literal Python/video template:
Validate every command on the target operating systems that matter to the user.
Read references/startup_automation.md before adding or changing any hook.
The bundled initializer is Claude Code-specific and installs only a lightweight startup context nudge. It preserves unrelated settings, adds matcher startup, validates the guide path, writes atomically, and is idempotent.
Preview first:
uv run python scripts/init_session_start_hook.py \
--repo <repo-root> \
--guide ONBOARDING.md \
--dry-run
After the user confirms that pre-prompt injection is genuinely required, run the same command without --dry-run. Remove only the managed entry with --remove.
Never copy this configuration into Codex by analogy. Codex project behavior should normally live in AGENTS.md; if a Codex hook is truly required, verify the installed version's root/subagent behavior and payload first.
Read references/git_safety.md before commit, push, conflict resolution, or history rewrite. The load-bearing rules are:
Use references/pii_guard.md for public-distribution content review. A green scanner does not replace semantic review.
For a read-only history scan, the existing scripts/sanitize_history.sh remains available. It never rewrites history; treat its findings as candidates and do not execute rewrite commands without explicit approval.
Use counter-review when the approved work materially changes security policy, shared lifecycle hooks, CI/CD, dependencies, or destructive Git behavior. Do not spawn a review team for an ordinary setup check or a one-line project instruction. Filter every finding by probability, cost, real usage, and direct verification.
npx claudepluginhub p/daymade-auto-repo-setup-auto-repo-setupInteractive wizard configures repositories for Claude Code best practices by creating CLAUDE.md, slash commands, agents, hooks, and permissions. Activates on 'setup claude', 'init claude', or repo setup requests.
Sets up CWF environment: selects hook groups, detects external tools, bootstraps setup-contract and project config, enables optional Agent Teams, Codex integration, git hooks, capability and repo indexes.
Automates Git repository analysis, branching strategy detection, semantic commit impact analysis, and workflows for commits, branches, and releases.