setup-git-hooks
Set up, change, or repair a repository's git hooks with prek.
Skill by feelepxyz
Chalk Labs
Need help deploying setup-git-hooks?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/feelepxyz-setup-git-hooks
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/setup-git-hooks
What's inside
- Skill name
setup-git-hooks- Description
- Set up, change, or repair a repository's git hooks with prek. Use when the user wants git hooks installed or reconfigured, mentions prek or pre-commit, or reports that hooks stopped running.
- License
- GPL-3.0
- Instructions
- 101 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (4)
- SKILL.md
- openai.yaml · agents/
- extending.md · references/
- setup-git-hooks.sh
SKILL.md (first lines)
# Set up git hooks
`setup-git-hooks.sh` is the skill. It reads the repository, proposes a hook set
matched to what the project can actually run, and — once the user has confirmed —
writes `prek.toml` and installs the shims.
Yours are the two jobs the script cannot do: getting the user's confirmation, and
wording the README.
## Run it
bash ~/.agents/skills/setup-git-hooks/setup-git-hooks.sh
Run through `bash` — skills install without the exec bit. No flags inspects and
prints the candidate table; `--apply` writes `prek.toml` and the shims, `--heal`
repairs an existing setup, `--scan` widens detection, `--status` reports. `--help`
lists every flag.
## The main line
1. **Plan.** Run the script with no flags.
2. **Confirm.** Relay the two tables verbatim — the user is choosing from them —
then ask one `AskUserQuestion` with four options: _Accept recommended_,
_Customize pre-commit_, _Customize pre-push_, _Customize both_. To customize,
follow up with a multi-select of that stage's ids, recommended ones first.
3. **Apply.** `--apply --accept`, or `--apply --pre-commit=<ids> --pre-push=<ids>`.
4. **README.** The script reports whether hooks are documented and hands you a
snippet. Place it to match the README's existing voice and heading style.
Skip this when the report already says `hooks already documented`.
5. **Verify.** Run `prek run --all-files` and report what it found. Hooks that
fail here would have blocked the user's next commit, so say so plainly.
Done when `prek.toml` exists, the shims are installed, and step 5 has actually
been run — not merely suggested.
**Apply is declarative.** It writes exactly the ids you name and drops the rest,
so pass the complete list for both stages. Naming no ids for a stage empties it.
**`--extra` offers hooks; the selection still decides.** An extra joins the
candidate table as recommended, so `--accept` takes it. With an explicit
`--pre-commit=`/`--pre-push=` list you must name it there too — passing an extra
you do not name is an error, not a silent drop. Its `stage` field says which list
it belongs in.
**The placement rule:** correctness blocks the commit — formatters, linters,
typecheck, hygiene, secrets. Running the code blocks the push — tests, build.
Use it when the user asks why something sits where it does.
## Heal
When a repo already has prek and something is quietly wrong, `--heal` names the
drift: a stage with hooks but no shim, a shim belonging to husky or another
manager, a hook pointing at an npm script or make target that no longer exists,
a tool missing from PATH, a config that won't parse.
Relay the findings, ask before repairing, then `--heal --fix`.
`--fix` installs and removes shims freely, but it edits the config only when this
skill wrote it. On someone else's config it reports the dead entry and leaves the
file byte-identical — say that rather than editing by hand.
## Scan, and closing the loop
`--scan` is for a repo whose real checks the heuristics miss — a bespoke
`script/` directory, an unfamiliar task runner, a monorepo boundary. Reach for it
when `--plan` finds only builtin hygiene hooks, or when the user says the
proposal missed something.
It prints two extra tables: `detected`, and `probed`. In `probed`, `absent` means
the script looked and found nothing; **`not-probed` means it has no detector for
that marker at all** — that is the gap worth spending a scan on.
Then:
1. Explore the repo yourself and find the checks it really runs.
2. Write them to a JSON array of `{id, name, entry, stage, files, pass_filenames}`
and apply with `--extra=<file.json>`.
3. **Fold the gap back in** — teach the detectors what the scan found, following
`references/extending.md`.
## When it reports an error
Every error carries `cause:` and `help:` — act on the `help:` line.
Two are refusals rather than failures, and both are correct:
- **`prek.toml` exists and was not written by this skill**, or the repo already
uses husky, lefthook, or `.pre-commit-config.yaml`. Nothing was touched.
Offer `--heal`, the migration path, or `--apply --force` — and let the user
choose, since `--force` discards their existing setup.
- **unknown hook id** — the valid ids for both stages are printed with it.
## Boundary
Setting hooks up is the whole job. Running them beyond the one verification pass,
authoring new linters, and changing CI happen when the user asks.
For anything about prek itself — its config reference, workspace mode, language
support — use the `prek` skill.From feelepxyz/dotfiles, GPL-3.0.
More from feelepxyz/dotfiles
- 0.563score
setup-worktrunk
feelepxyz
Set up, change, or repair a repository's worktrunk hooks so a new worktree opens a herdr workspace with the agent and dev servers already running.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
branch
feelepxyz
Land on a branch worth working on — fetch, cut off the fresh default, carry uncommitted work across, or report the branch already here.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
commit
feelepxyz
Commit the working tree with a generated Conventional Commits message, then name the next step.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
mission
feelepxyz
Orchestrate projects too large or complex for one reliable agent context.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
pr
feelepxyz
Open a pull request for the current branch, watch its checks, and land it — squash, rebase, run hooks, push, then merge and clear the worktree away.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
setup-github
feelepxyz
Converge a GitHub repository's settings — merge hygiene, a guardrail ruleset on the default branch, Dependabot and secret scanning.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
tdd
feelepxyz
Implement or change software through a focused test-driven loop.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
add-dotfiles-skill
feelepxyz
Scaffold a new personal skill in this dotfiles repo (skills/custom/) and install it into Claude/Codex/pi via npx skills.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
setup-repo
feelepxyz
Set a repository up across all three areas — git hooks, worktrunk and GitHub housekeeping — in one pass and one commit.
SkillBFreshness: B★ 2Claude Code +9 - 0.554score
shape
feelepxyz
Turn a request into a compact contract — the observable destination, the implementation brief, and the validation contracts that prove it.
SkillBFreshness: B★ 2Claude Code +9 - 0.552score
minto
feelepxyz
Answer in Minto pyramid order — conclusion first, then the arguments that carry it, then the evidence.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
hunk
feelepxyz
Open the working diff, last commit, or branch range in the Hunk terminal viewer — and with `auto`, review it inline.
SkillBFreshness: B★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Jul 29, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- Repository
- github.com/feelepxyz/dotfiles
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from feelepxyz
- 0.563score
setup-worktrunk
feelepxyz
Set up, change, or repair a repository's worktrunk hooks so a new worktree opens a herdr workspace with the agent and dev servers already running.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
branch
feelepxyz
Land on a branch worth working on — fetch, cut off the fresh default, carry uncommitted work across, or report the branch already here.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
commit
feelepxyz
Commit the working tree with a generated Conventional Commits message, then name the next step.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
mission
feelepxyz
Orchestrate projects too large or complex for one reliable agent context.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
pr
feelepxyz
Open a pull request for the current branch, watch its checks, and land it — squash, rebase, run hooks, push, then merge and clear the worktree away.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
setup-github
feelepxyz
Converge a GitHub repository's settings — merge hygiene, a guardrail ruleset on the default branch, Dependabot and secret scanning.
SkillBFreshness: B★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get setup-git-hooks running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
setup-git-hooks skill. Agent Mart. https://agentmart.dev/skills/feelepxyz-setup-git-hooks (last updated 2026-10-24)