pre-commit

pre-commit is a skill for Claude Code, Codex from RealDougEubanks/ClaudeMarketplace. It costs 46 tokens per session (2,344 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/realdougeubanks/claudemarketplace/pre-commit
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, Codex.

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.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.svg" alt="Measured on agentmods" 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 2,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00046 $0.02344
Opus 5 $0.00023 $0.01172
Sonnet 5 $0.00009 $0.00469
Haiku 4.5 $0.00005 $0.00234

Measured 4d ago against content hash b324558ada51, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 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 --cached --name-only 2>/dev/null || git diff --name-only
    
  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_, 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, *.test.*, *.spec.*, node_modules/, vendor/
    • BLOCKER if found. Report file and line number. Do not commit. When reporting, redact the matched value (show the first 4 characters only).
  3. Dead code scan — Use Grep across staged source files for:

    • ^\s*//.* blocks of 3+ consecutive commented-out code lines (not doc comments)
    • Common placeholder strings: TODO, FIXME, HACK, XXX, impl later, stub, placeholder
    • Exclude: *.md, *.txt, documentation files
    • WARNING (non-blocking) for TODO/FIXME; BLOCKER for stub/placeholder in non-test files.
  4. Naming check — Use Read on each staged source file. Load naming conventions from CLAUDE.md if present (Grep for "naming" section). Apply:

    • Flag obvious violations: ALL_CAPS variable names outside constants, single-letter variables outside loop counters, names < 3 chars in function signatures
    • WARNING (non-blocking).

Read the full file on GitHub · 168 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. 4d 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 1mo ago), licensed MIT. It adds 46 tokens to every session and 2,344 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-08-31.

Related

Other skills, from other repositories

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

swarm

Run a multi-agent audit of a codebase by spawning specialized parallel subagents (security, performance, tests, architecture, dead-code), then synthesize their findings into a single prioritized action plan. Use this whenever the user runs /swarm, asks to "audit the repo," "review this codebase," "find issues across…

Zintellix/Claude-Skills · 138 tokens

brainstorm

Guided game concept ideation — from zero idea to a structured game concept document. Uses professional studio ideation techniques, player psychology frameworks, and structured creative exploration.

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

balance-check

Analyzes game balance data files, formulas, and configuration to identify outliers, broken progressions, degenerate strategies, and economy imbalances. Use after modifying any balance-related data or design. Use when user says 'balance report', 'check game balance', 'run a balance check'.

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

memory-loop-setup

Bootstrap a battle-tested memory loop (shared warm-layer BRIEF · 6-type capture log · open-loops registry · session-card hook · deadman switch · human gate) into any repo or Obsidian vault. Triggers: (1) "set up the memory loop / second brain / warm layer here", (2) "install this memory structure in another…

Elliotoh-jin/claude-memory-loop · 100 tokens