agentleFS
pesappesap/skills/prek/SKILL.md

prek

Skill1 starsChanged 3 months agoMITView on GitHub

Preserve hook coverage and behavior before optimizing runner performance. - Prefer prek run --all-files in CI over pre-commit run --all-files. - Keep hook definitions in existing .pre-commit-config.yaml unless migration requested. - Use SKIP=hook1,hook2 for temporary CI partitioning. - Preserve behavior first when migrating from pre-commit; optimize only after matching hook coverage. 1. Confirm the hook entrypoint and scope: local git hooks, CI job, migration, or flaky hook investigation. 2. Read existing hook config and nearby CI definitions before changing commands.…

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Prefer prek run --all-files in CI over pre-commit run --all-files.

    line 19
  2. Very specific:

    Keep hook definitions in existing .pre-commit-config.yaml unless migration requested.

    line 20
  3. Very specific:

    Use SKIP=hook1,hook2 for temporary CI partitioning.

    line 22
  4. Distinctive:

    Read existing hook config and nearby CI definitions before changing commands.

    line 30
  5. Distinctive:

    Prefer the smallest reliable change: command swap, cache fix, install step, or hook selection change.

    line 33
  6. Very specific:

    Keep hook pipeline simple: install deps once, then run prek.

    line 74
  7. Distinctive:

    Avoid duplicate hook execution across parallel jobs.

    line 76
  8. Distinctive:

    Prefer read-mostly caches and a single writer job.

    line 77

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

Preserve hook coverage and behavior before optimizing runner performance.

Defaults

  • Prefer prek run --all-files in CI over pre-commit run --all-files.
  • Keep hook definitions in existing .pre-commit-config.yaml unless migration requested.
  • Use SKIP=hook1,hook2 for temporary CI partitioning.
  • Preserve behavior first when migrating from pre-commit; optimize only after matching hook coverage.

Workflow

  1. Confirm the hook entrypoint and scope: local git hooks, CI job, migration, or flaky hook investigation.
  2. Read existing hook config and nearby CI definitions before changing commands.
  3. Determine whether the task is behavioral parity, performance improvement, or failure diagnosis.
  4. Prefer the smallest reliable change: command swap, cache fix, install step, or hook selection change.
  5. Validate with the narrowest useful command (prek run <hook> --all-files before full runs when possible).
  6. Report any intentional behavior differences from pre-commit.

Common gotchas

  • prek is a drop-in replacement for many flows, but surrounding install/cache steps may still be Python- or language-specific.
  • CI slowdowns often come from repeated environment setup, duplicate hook runs, or path-agnostic jobs rather than from the hook runner itself.
  • Temporary SKIP= usage is fine for partitioning, but leaving it baked into CI can silently reduce coverage.
  • Migration requests should preserve existing hook semantics unless the user explicitly asks to prune or redesign hooks.

Quick reference

# Install git hooks
prek install -f --install-hooks

# Run all hooks
prek run --all-files

# Run one hook
prek run ruff-check --all-files

# Skip specific hooks for one run
SKIP=julia-format,julia-lint prek run --all-files

# Update hook revisions
prek auto-update

# Validate updates in CI without rewriting files
prek auto-update --check

CI guidance

  • Keep hook pipeline simple: install deps once, then run prek.
  • Split language-heavy hooks into dedicated jobs with path-based rules.
  • Avoid duplicate hook execution across parallel jobs.
  • Prefer read-mostly caches and a single writer job.

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.