prek-pro

prek-pro is a skill for Claude Code, Codex from jscraik/Agent-Skills. It costs 32 tokens per session (1,312 once invoked), scanned A, original, Apache-2.0.

A guide for setting up and fixing prek, a tool that runs checks automatically around Git commits.

In plain words
What is it for?
Use it to edit prek.toml, install or validate hook shims, migrate pre-commit setups, and investigate changes to staged files during commits.
Why use it?
It helps diagnose hook failures and configuration differences when moving from pre-commit to prek.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to edit prek.toml, install or validate hook shims, migrate pre-commit setups, and investigate changes to staged files during commits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jscraik/agent-skills/prek-pro
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jscraik/Agent-Skills --skill prek-pro
Clone the repo
git clone --depth 1 https://github.com/jscraik/Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prek-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/jscraik/agent-skills/prek-pro/github.svg)](https://agentmods.dev/skills/jscraik/agent-skills/prek-pro)
Your own site
<a href="https://agentmods.dev/skills/jscraik/agent-skills/prek-pro"><img src="https://agentmods.dev/badge/skills/jscraik/agent-skills/prek-pro/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prek-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/jscraik/agent-skills/prek-pro"><img src="https://agentmods.dev/badge/skills/jscraik/agent-skills/prek-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,312 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01312
Opus 5 $0.00016 $0.00656
Sonnet 5 $0.00006 $0.00262
Haiku 4.5 $0.00003 $0.00131

Measured 6d ago against content hash 8402a01d6e7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prek-pro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Skills/agent-ops/prek-pro/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prek Pro

Philosophy

  • Keep the skill focused on the decision and workflow the user actually requested.
  • Preserve important context through progressive disclosure instead of trimming it away.
  • Prefer repo-local contracts, wrappers, and validation before generic advice.

When To Use

  • The user is editing or debugging prek.toml.
  • A project needs prek shims, hook installation, or validation.
  • A pre-commit setup is being migrated to prek.
  • A commit hook reports unstaged changes, stashes to a prek patch, restores a patch unexpectedly, or leaves staged/unstaged state different from the state observed before commit.

Avoid

  • Generic linting with no prek hook surface.
  • Changing hook behavior without running the repo hook validation.
  • Treating prek and pre-commit as identical when their config differs.

Inputs

  • prek.toml path
  • hook failure output
  • runtime manager
  • migration source
  • validation command

Outputs

  • config guidance or patch
  • shim/install notes
  • failure diagnosis
  • validation evidence
  • remaining blockers
  • Schema-bound outputs include schema_version.

Workflow

  • Start with 2-3 focused surfaces before expanding scope.
  • Read the existing hook config and repo instructions first.
  • Identify whether the task is setup, migration, validation, or debugging.
  • Use docs-backed prek syntax and project-local wrappers.
  • Keep hook changes scoped to the failing behavior.
  • Run the hook or validation command that proves the fix.
  • For commit-hook stash failures, inspect git status --short --branch, staged and unstaged file lists, and the reported ~/.cache/prek/patches/*.patch before applying, discarding, or retrying anything.
  • Treat a prek patch as evidence, not as intended work, until its hunks match the user-authorized change set.
  • Prefer a fully staged, clean working tree before running commit hooks that may rewrite generated files. Avoid git commit --only, path-limited commits, or partial index commits when repo hooks can sync projections, format docs, or restore prek patches.
  • If prek mutates the worktree during commit, stop before retrying unless the mutation is clearly hook-generated and inside the authorized change scope.

Read the full file on GitHub · 132 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 132 lines · 32 tokens per session scan A 8402a01d6e7d

Subscribe to this mod's changes

prek-pro is a skill published in the GitHub repository jscraik/Agent-Skills (8 stars, last pushed 8d ago), licensed Apache-2.0. It adds 32 tokens to every session and 1,312 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

magpie-setup-upstream-fix

Turn a framework bug or quirk the agent hit while running a Magpie skill or tool into a fix PR against apache/magpie — one PR per issue. First confirms the problem is a framework defect (not a local misconfiguration or a stale snapshot), then searches apache/magpie for an existing issue or PR that already covers it…

apache/magpie · 110 tokens

mk:resolving-merge-conflicts

Resolve an in-progress git merge or rebase conflict end to end: read the conflict state, recover each side's original intent, resolve every hunk, run the project's checks, and prepare the merge/rebase for an explicitly approved finish. Use when asked to "resolve merge conflicts", "fix this rebase", "finish the merge"…

ngocsangyem/MeowKit · 139 tokens

github-auth-recovery

Recover from broken GitHub auth flows when git/gh operations fail. Use when gh is not logged in, HTTPS push/pull asks for credentials or errors like could not read Username, a repo remote is HTTPS but SSH may already work, or when GitHub operations fail and the agent needs a deterministic path to diagnose auth method…

davidtoby/agent-skills · 90 tokens

issue-solver

Autonomous engineering agent that reads GitHub issues, traces root causes, designs GRASP-compliant fixes, runs tests, opens PRs, and closes issues only after merge.

conectlens/lenserfight · 39 tokens

refactor-planner

Turn a messy code area into a scoped refactor plan with risk controls.

conectlens/lenserfight · 20 tokens

git-flow

A shared set of rules for common Git work, including commits, branches, pushes, merges, rebases, and pull requests. Git is the version-control system used to record and combine code changes.

Xakki/ai-agents-skills · 99 tokens