pre-commit-audit

pre-commit-audit is a skill for Claude Code, Codex from flonat/flonat-research. It costs 100 tokens per session (2,868 once invoked), scanned A, original, MIT.

A pre-commit scan that checks staged files for oversized files, identifying author details in papers, exposed secrets, and hidden Unicode characters.

In plain words
What is it for?
Use it before committing code or academic papers to review the files that are about to enter Git.
Why use it?
It catches files that could leak credentials, break anonymous review, contain concealed text, or make a commit unnecessarily large.

Skill for Claude CodeCodex

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/flonat/flonat-research/pre-commit-audit
Any agent
npx skills add flonat/flonat-research --skill pre-commit-audit
Clone the repo
git clone --depth 1 https://github.com/flonat/flonat-research

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/flonat/flonat-research/pre-commit-audit.svg)](https://agentmods.dev/skills/flonat/flonat-research/pre-commit-audit)
Your own site
<a href="https://agentmods.dev/skills/flonat/flonat-research/pre-commit-audit"><img src="https://agentmods.dev/badge/skills/flonat/flonat-research/pre-commit-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,868 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.1 $0.00100 $0.02868
Opus 5 $0.00050 $0.01434
Sonnet 5 $0.00020 $0.00574
Haiku 4.5 $0.00010 $0.00287

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

Security

Grade A, and why

pre-commit-audit 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check_invisible_unicode.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-audit/SKILL.md · 188 lines

How it starts

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

Pre-Commit Audit — File Size, Anonymity, Secrets

Three-pass safety scan before commit. Blocks pain-points: oversized commits (1.3GB parquet incident), CCS-style anonymity breaches, leaked credentials. Each pass is a hard gate; user OKs proceed.

Hard Rules

Existential — block proceed

  1. Size pass blocks anything >10MB unless gitignored OR user explicitly approves. Threshold matches block-large-files.sh hook for consistency.
  2. Anonymity pass runs only on paper-relevant paths: paper-*/, *.tex, *.bib, *.md inside paper directories. Scope is data-driven — we don't false-flag README authorship.
  3. Secrets pass uses an entropy heuristic + known-prefix list. No regex-only matching that misses high-entropy keys. Block on confirmed secret; warn on suspicious-but-uncertain.
  4. All four passes run on the same file set (default: staged for commit). Don't mix staged-only size check with all-files anonymity check.
  5. The Unicode pass is the one pass that is always in scope, including infra-only commits. It is identity-blind — it reads codepoints, never names — so it cannot false-flag authorship the way the anonymity pass can.

Format — catch in review

  1. Output a single consolidated table (file × pass × verdict) — not four separate reports.
  2. Severity tiers: BLOCK (must fix), WARN (proceed with confirm), OK.
  3. Always show the file path and line number when flagging — make it copy-paste-fixable.

When to Use

  • Before any git commit on a paper / project repo
  • Pre-submission checklist (research projects)
  • Before pushing to anonymous-artifact repo (the highest-risk anonymity surface)
  • After a sub-agent has written files (verify before committing their work)
  • Wired as a session-close Phase 4 sub-step (alternate path to running the hook)

When NOT to Use

  • Before commits on infrastructure-only changes (skills, hooks, rules) — anonymity scan would false-flag README author lines. Exception: Phase 4 (Unicode) stays valid there and can be run alone: pre-commit-audit --unicode-only
  • Auto-generated commits (CI, dependabot) — they don't need the scan
  • When the change is purely metadata (.gitignore, LICENSE, etc.)

Read the full file on GitHub · 188 lines

Files

What ships with it

1 file 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. 2d ago First seen · 188 lines · 100 tokens per session scan A afaa6c7ec827

Subscribe to this mod's changes

pre-commit-audit is a skill published in the GitHub repository flonat/flonat-research (131 stars, last pushed 10d ago), licensed MIT. It adds 100 tokens to every session and 2,868 once invoked, about $0.0005 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.