{{REPO}}-precommit

{{REPO}}-precommit is a skill for Claude Code, Codex from steph-dove/klaussy-agents. It costs 96 tokens per session (827 once invoked), scanned A, a copy of fastapi-precommit, MIT.

A final review workflow for staged or about-to-commit changes. It checks changed lines for silent failures, exposed secrets, debug leftovers, and unhelpful comments.

In plain words
What is it for?
Use it before committing or pushing to review the staged change for correctness and security issues without rewriting the code.
Why use it?
It catches last-minute problems that can slip through during development, especially errors that are swallowed or credentials accidentally added to a diff.

Skill for Claude CodeCodex

Part of the klaussy plugin — 80 skills, 3 hooks, 1 MCP server 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/steph-dove/klaussy-agents/precommit
Any agent
npx skills add steph-dove/klaussy-agents --skill precommit
Clone the repo
git clone --depth 1 https://github.com/steph-dove/klaussy-agents

Made for: Claude Code, Codex.

Or install klaussy, the plugin that ships this one along with the rest of its 80 skills, 3 hooks, 1 MCP server.

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 {{REPO}}-precommit

README.md
[![agentmods](https://agentmods.dev/badge/skills/steph-dove/klaussy-agents/precommit.svg)](https://agentmods.dev/skills/steph-dove/klaussy-agents/precommit)
Your own site
<a href="https://agentmods.dev/skills/steph-dove/klaussy-agents/precommit"><img src="https://agentmods.dev/badge/skills/steph-dove/klaussy-agents/precommit.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod 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.00096 $0.00827
Opus 5 $0.00048 $0.00413
Sonnet 5 $0.00019 $0.00165
Haiku 4.5 $0.00010 $0.00083

Measured yesterday against content hash 14bd16663a4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

{{REPO}}-precommit 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 yesterday.

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.

Origin

This is a copy

97% identical to fastapi-precommit — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

src/klaussy/templates/skills/precommit/SKILL.md · 44 lines

What it actually says

Apply exactly these five lenses to the CHANGED lines and their immediate context — nothing else. If no diff is inlined for you, read the staged change with git diff --cached first.

LENS 1 — Silent failures (your primary lens):

  • Empty or swallowing catch blocks (caught errors not rethrown, surfaced, or meaningfully handled)
  • Catch-and-continue where later code depends on the failed step
  • Fallback values that mask failures (return null/[]/default on error with no signal to the caller or user)
  • Success reported over partial failure (function returns ok / UI shows success when a sub-step failed)
  • Errors logged where nobody looks (console/debug-level) when the user or caller needed to know
  • Fire-and-forget promises / missing rejection handlers
  • Optional chaining or defaults that convert real bugs into silent no-ops
  • Killed/ignored exit codes, suppressed stderr

LENS 2 — Secrets & credentials (always Severity: High):

  • API keys, tokens, passwords, private keys, connection strings with credentials, high-entropy literals that look like secrets — in ADDED lines. Placeholder values that are obviously fake (e.g. "YOUR_API_KEY", "xxx") are NOT findings.

LENS 3 — Debug leftovers (Severity: Low):

  • Added print-debugging (console.log/print/dbg!) that is clearly scaffolding rather than intentional logging per this repo's conventions
  • Newly commented-out blocks of code
  • Added TODO/FIXME/HACK markers with no ticket reference

LENS 4 — Blatant correctness landmines (Severity: High ONLY — if you are not CERTAIN it is broken, do not report it):

  • Unreachable code introduced by the change
  • Conditions that are always true/false, inverted comparisons, assignment-in-condition
  • Off-by-default boolean confusion (e.g. flag checked with the opposite sense of every other use in the file)

LENS 5 — Excessive comments (Severity: Low):

  • Comments on ADDED lines that restate what the code plainly does ("// increment i", "// loop over the items", "// set x to 5"), narrate obvious steps, or just echo the function/variable name.
  • Multi-line block comments where a single short line (or no comment) would carry the same information.
  • Changelog / narration / "AI-tell" comments ("// Now we handle the case where…", "// This function will…", "// Added to fix the bug"). For each, the fix is: delete it (or condense to a short one-liner). Keep ONLY short comments that explain WHY — non-obvious intent, gotchas, links, or invariants. Do NOT flag: docstrings/JSDoc on public APIs, license/file headers, or genuinely clarifying "why" comments.

Explicitly NOT in scope: naming, formatting, performance, architecture, test coverage, lint-level nits, anything outside the diff. Do not suggest refactors. (Comment hygiene IS in scope — that is lens 5.)

Be precise and skeptical, but only report real issues — a deliberate, well-signposted degradation (comment explains it, user is notified elsewhere) is NOT a finding.

For each finding, give its severity, which lens caught it, the file:line, and the minimal fix in one or two lines. If there are no findings, say so plainly.

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. yesterday First seen · 44 lines · 0 tokens per session scan A 14bd16663a4d

Subscribe to this mod's changes

{{REPO}}-precommit is a skill published in the GitHub repository steph-dove/klaussy-agents (16 stars, last pushed 8d ago), licensed MIT. It adds 96 tokens to every session and 827 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to fastapi-precommit, differing in 4 lines, and is treated as a copy.

Related

Other skills, from other repositories

merge-seed

Merge upstream React Starter Kit updates (the seed remote) into main, preserving this project's identity, scope, and behavior. Use when asked to sync, pull, or merge the seed / starter kit / upstream template.

kriasoft/react-starter-kit · 49 tokens

saas-builder

Clone, verify, map, and build on top of ixartz/SaaS-Boilerplate for a user's SaaS idea. Use when a user wants to reuse SaaS Boilerplate, evaluate how their product fits it, or build product-specific pages, database schema, roles, permissions, MVP features, and launch scope on top of the boilerplate.

ixartz/SaaS-Boilerplate · 75 tokens

coding-standards

Detects code smells, anti-patterns, and readability issues. Use when implementing features, reviewing code, or refactoring.

shinpr/ai-coding-project-boilerplate · 30 tokens

task-analyzer

Classifies task intent, change risk, and execution scale, then selects skills from the project skills index. Use when starting work, routing a task, estimating scope, or selecting skills.

shinpr/ai-coding-project-boilerplate · 41 tokens

subagents-orchestration-guide

Coordinates subagents through scale-based planning, approval, implementation, verification, and escalation flows. Use when routing work to subagents, executing an approved work plan, or resuming autonomous execution.

shinpr/ai-coding-project-boilerplate · 45 tokens

typescript-testing

Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria. Use when writing or reviewing unit tests.

shinpr/ai-coding-project-boilerplate · 31 tokens