# Git hooks

> Git hooks is an open-source agent skill for developer tools. Pre-commit and pre-push git hooks that run your project's justfile checks. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/zerotechdebt/ffflow/tree/main/plugin/skills/git-hooks
- **Repository:** https://github.com/zerotechdebt/ffflow
- **GitHub stars:** 6
- **License:** Apache-2.0
- **Skill name:** git-hooks
- **Collection:** https://github.com/zerotechdebt/ffflow
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill sets up git hooks for a project that uses a justfile. The pre-commit hook runs check-only format, lint and typecheck recipes so it stays quick. The pre-push hook runs the project's check-all recipe, which is level-aware, plus optional architecture and docs checks when the justfile defines them.

The hooks deliberately never rewrite files. Fixing formatting or lint issues is left to the developer, who runs the fixer recipes, re-stages and commits again, so the commit that lands is the one that was checked. The skill includes shell scripts for direct installation into .git/hooks and a configuration for the pre-commit framework, which suits teams because it stays in the repository.

It expects a justfile with recipes such as format-check, lint-check, typecheck and check-all, and it adds hooks-install and hooks-remove recipes for setup and removal. Git and the just command runner are needed, and the pre-commit framework is optional.

## When your agent uses it

> Pre-commit and pre-push hooks that call justfile recipes. Level-aware: pre-commit is fast; pre-push runs the level's gates.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/zerotechdebt/ffflow/tree/HEAD/plugin/skills/git-hooks)
- [License: Apache-2.0](https://github.com/zerotechdebt/ffflow/tree/HEAD/plugin/skills/git-hooks)

## Features

- **Fast pre-commit checks:** Runs format, lint and typecheck verification recipes on every commit without rewriting files.
- **Level-aware pre-push gates:** Runs the project's check-all recipe, which adapts its gates to the project level.
- **Optional audit checks:** Runs architecture and documentation drift checks only when the justfile defines those recipes.
- **Pre-commit framework config:** Provides a .pre-commit-config.yaml so hooks are versioned with the repository and shared by the team.
- **Install and remove recipes:** Adds justfile recipes that install hooks through pre-commit or by copying scripts into .git/hooks.
- **Check-only philosophy:** Keeps hooks from fixing files after staging, so committed code matches what CI verifies.

## Good for

- Add pre-commit formatting and lint checks to a new project
- Set up a pre-push hook that runs the full check suite before pushing
- Install git hooks for a team using the pre-commit framework
- Remove previously installed git hooks from a repository
- Make local checks match the gates CI runs

## Install

### Claude Code

This skill ships in the `fff` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add zerotechdebt/ffflow
/plugin install fff@ffflow
```

Or copy only this skill to `~/.claude/skills/git-hooks`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/git-hooks &&
cp -R "$tmp/plugin/skills/git-hooks" ~/.claude/skills/git-hooks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/git-hooks` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/git-hooks` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/git-hooks &&
cp -R "$tmp/plugin/skills/git-hooks" ~/.agents/skills/git-hooks &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/git-hooks` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/git-hooks` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/git-hooks &&
cp -R "$tmp/plugin/skills/git-hooks" ~/.cursor/skills/git-hooks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/git-hooks` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/zerotechdebt/ffflow.git --path plugin/skills/git-hooks
```

Or copy the folder to `~/.gemini/skills/git-hooks` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/git-hooks`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/git-hooks &&
cp -R "$tmp/plugin/skills/git-hooks" ~/.copilot/skills/git-hooks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/git-hooks` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/zerotechdebt/ffflow.git
```

Then copy `ffflow/plugin/skills/git-hooks` into your agent's skills folder as `git-hooks`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the pre-commit hook run?

It runs the just recipes format-check, lint-check and typecheck, and stops on the first failure.

### Does the hook fix formatting or lint errors automatically?

No. Hooks only check. When a check fails, the developer runs just format lint, re-stages the changes and commits again.

### How do I skip the hooks?

Use git commit --no-verify or git push --no-verify. The skill advises this only for cases such as WIP commits on feature branches.

### Which tools does Git hooks need?

It needs the just command runner and a justfile in the project. The pre-commit framework is optional and used for the team setup.

### How do I install Git hooks in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/git-hooks to use it in all your projects, or to .claude/skills/git-hooks in one project. Or install the fff plugin, which includes it: /plugin marketplace add zerotechdebt/ffflow, then /plugin install fff@ffflow.

### Does Git hooks run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Git hooks?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Git hooks?

The closest alternatives to Git hooks are Init prettier git hooks, Justfile, Code quality tooling edho ferdian, Vibe pre commit audit and Ci gates.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Init prettier git hooks](https://ai-powered.com/skills/init-prettier-git-hooks): Init prettier git hooks is an open-source agent skill for developer tools.
- [Justfile](https://ai-powered.com/skills/justfile): Justfile is an open-source agent skill for developer tools.
- [Code quality tooling edho ferdian](https://ai-powered.com/skills/code-quality-tooling-edho-ferdian): Code quality tooling edho ferdian is an open-source agent skill for developer tools.
- [Vibe pre commit audit](https://ai-powered.com/skills/vibe-pre-commit-audit): Vibe pre commit audit is an open-source agent skill for security.
- [Ci gates](https://ai-powered.com/skills/ci-gates): Ci gates is an open-source agent skill for developer tools.
- [Git commits and reporting](https://ai-powered.com/skills/git-commits-and-reporting): Git commits and reporting is an open-source agent skill for developer tools.
- [Stack init](https://ai-powered.com/skills/stack-init): Stack init is an open-source agent skill for developer tools.
- [Session hardening](https://ai-powered.com/skills/session-hardening): Session hardening is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/git-hooks
