pre-commit

pre-commit is a skill for Claude Code from RealDougEubanks/ClaudeMarketplace. It costs 46 tokens per session (3,314 once invoked), scanned A, original, MIT.

A Git hook that checks files before Git creates a commit. It looks for exposed secrets, dead code, naming problems, merge-conflict markers, and commits made directly to the main branch.

In plain words
What is it for?
Use it to scan staged or modified files, or install it as a pre-commit hook with `/pre-commit install` so the checks run automatically.
Why use it?
It catches common problems before they enter the project's history. It can block a commit when it finds a critical issue.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; positional $N argument.

Part of the pre-commit plugin — 1 skill shipped together

Good fit Use it to scan staged or modified files, or install it as a pre-commit hook with /pre-commit install so the checks run automatically.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/realdougeubanks/claudemarketplace/pre-commit
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 RealDougEubanks/ClaudeMarketplace --skill pre-commit
Clone the repo
git clone --depth 1 https://github.com/RealDougEubanks/ClaudeMarketplace

Made for: Claude Code.

Or install pre-commit, the plugin that ships this one along with the rest of its 1 skill.

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 pre-commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/realdougeubanks/claudemarketplace/pre-commit/github.svg)](https://agentmods.dev/skills/realdougeubanks/claudemarketplace/pre-commit)
Your own site
<a href="https://agentmods.dev/skills/realdougeubanks/claudemarketplace/pre-commit"><img src="https://agentmods.dev/badge/skills/realdougeubanks/claudemarketplace/pre-commit/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 pre-commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/realdougeubanks/claudemarketplace/pre-commit"><img src="https://agentmods.dev/badge/skills/realdougeubanks/claudemarketplace/pre-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,314 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.00046 $0.03314
Opus 5.5 $0.00018 $0.01326
Sonnet 5.5 $0.00009 $0.00663
Haiku 4.5 $0.00005 $0.00331

Measured 5d ago against content hash 1d3fa41f2653, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pre-commit 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 5d 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/pre-commit/SKILL.md · 215 lines

How it starts

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

pre-commit

Invoked via /pre-commit. This skill acts as a pre-commit quality gate — it runs a fast subset of checks before committing and blocks the commit if critical issues are found. It can also install itself as a git hook.


Mode A — Run checks now (default)

When invoked without arguments, run immediately against staged files (or all modified files if nothing is staged):

  1. Use Bash to get the list of files to check. git diff exits 0 even when it prints nothing, so an || fallback would never fire; test for empty output explicitly:

    FILES=$(git diff --cached --name-only --diff-filter=ACMR)
    if [ -z "$FILES" ]; then
      FILES=$(git diff --name-only --diff-filter=ACMR)
    fi
    printf '%s\n' "$FILES"
    

    If both lists are empty, report "Nothing staged or modified — nothing to check." and stop.

  2. Secret scan — Use Grep across all staged files for hardcoded secret patterns:

    • Assignments (= or : — covers code, YAML, and JSON): (?i)(password|passwd|pwd|api_key|apikey|api_token|access_token|secret_key|client_secret|secret)\s*[=:]\s*['"][^'"]{8,}['"]
    • Shell exports: export\s+[A-Z_]*(KEY|TOKEN|SECRET|PASSWORD)[A-Z_]*=\S{8,}
    • AWS: (?i)(aws_access_key_id|aws_secret_access_key)\s*[=:]\s*['"][^'"]{16,}['"] and literal AKIA[0-9A-Z]{16}
    • Modern token prefixes: sk-ant-, sk-proj-, github_pat_, ghp_, glpat- (GitLab), npm_ (npm), AIza (Google API key), xox[baprs]-, sk_live_
    • Private key headers: -----BEGIN (RSA|DSA|EC|OPENSSH) PRIVATE KEY-----
    • High-entropy heuristic: any assignment of a 32+ char mixed-case alphanumeric literal to a variable whose name contains key, token, secret, or auth
    • Exclude: *.example, *.sample, node_modules/, vendor/
    • BLOCKER if found, except in test files (*.test.*, *.spec.*), where a match is a WARNING: fixtures usually hold fake values, but real credentials do get pasted into tests, so they are still scanned and reported. Report file and line number. When reporting, redact the matched value (show the first 4 characters only).

Read the full file on GitHub · 215 lines

Files

What ships with it

4 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. 5d ago Changed · +47 lines 1d3fa41f2653
  2. 1mo ago First seen · 168 lines · 46 tokens per session scan A b324558ada51

Subscribe to this mod's changes

pre-commit is a skill published in the GitHub repository RealDougEubanks/ClaudeMarketplace (1 stars, last pushed 4d ago), licensed MIT. It adds 46 tokens to every session and 3,314 once invoked, about $0.0002 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

commit

One-shot conventional commit; bundled scripts adaptively gather diff context, draft the message, and stage+commit — pass ask to confirm first or add a hint for the title. Use only when the user asks for a commit.

foyzulkarim/skills · 49 tokens

patch-notes

Generate player-facing patch notes from git history, sprint data, and internal changelogs. Translates developer language into clear, engaging player communication.

IdoCohen560/claude-unity-game-studio · 33 tokens

uw-unity-project-setup

Full project initialization wizard from ProjectConfig, including folders, packages, Git, and MCP setup. Use when setting up a new Unity project from scratch, creating the folder structure, or bootstrapping infrastructure. Triggers on requests like "set up a new project", "create folder structure", "initialize the…

IdoCohen560/claude-unity-game-studio · 87 tokens

git-commit

Turn the working changes into one or more atomic commits with well-written messages. Use whenever the user runs /git-commit or asks to commit their work, wrap up a feature, or "commit what I have.".

thoughtbot/rails-consultant · 47 tokens

start-task

Bootstrap a task into a synced feature branch — one shot, zero confirmations. Detects the source from the args: GitHub issue ('#100', 'issue 100', 'gh issue 100', or bare '100'), Jira key ('PROJ-42'), or a local spec file path; ad-hoc conversation otherwise. Fetches the task, derives {type}/{number}/{slug}, syncs the…

foyzulkarim/skills · 125 tokens

move-to-worktree

After /start-task: park the current clean, pushed feature branch in its own issue-numbered nested worktree (.worktrees/ ) and return the primary checkout to current main, so the next parallel lane can start. Use when the user says to move the branch or task to a worktree or open a parallel lane.

foyzulkarim/skills · 72 tokens