agentleFS
Miyamura80Miyamura80/MCP-Template/.claude/skills/prek-precommit-hook/SKILL.md

prek-precommit-hook

Skill1 starsChanged 5 months agoMITView on GitHub

Instructions for managing and running git hooks using `prek`. Use this skill for any mention of pre-commit hooks, as `prek` overrides pre-commit hooks.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the following commands to interact with prek:

    line 11

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prek Pre-commit Hook Skill

This skill provides instructions for using prek, a fast, native pre-commit runner that replaces the traditional Python-based pre-commit. prek should be used for any mention of pre-commit hooks and overrides traditional pre-commit hooks.

Commands

Use the following commands to interact with prek:

  • prek run: Runs the configured hooks on the staged files.
  • prek run --all-files: Runs the configured hooks on all files in the repository.
  • prek install: Installs the git hooks into .git/hooks.
  • prek uninstall: Uninstalls the git hooks.
  • prek list: Lists the configured hooks.

Configuration

The configuration is stored in prek.toml in the root of the repository.

Example prek.toml:

[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v4.6.0"
hooks = [
    { id = "check-added-large-files" },
]

[[repos]]
repo = "local"
hooks = [
    { id = "ruff-check", name = "Run ruff linter", entry = "uv run ruff check", language = "system", pass_filenames = false, always_run = true },
]

Workflow

  1. Before Committing: prek hooks will run automatically if installed via prek install.
  2. Manual Check: You can manually run checks using prek run --all-files.
  3. CI: In CI environments, you can use prek run --all-files to enforce checks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.