fastapi-precommit

fastapi-precommit is a skill for Claude Code, Codex from steph-dove/klaussy-agents. It costs 93 tokens per session (799 once invoked), scanned A, original, MIT.

A final review guide for staged changes or code about to be committed or pushed.

In plain words
What is it for?
It helps detect swallowed errors, leaked secrets, leftover debugging code, obvious correctness risks, and comments that add unnecessary narration.
Why use it?
It looks for last-minute problems that can quietly break behavior or expose sensitive information, while keeping the review limited to changed lines and nearby context.

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/fastapi-precommit
Any agent
npx skills add steph-dove/klaussy-agents --skill fastapi-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 fastapi-precommit

README.md
[![agentmods](https://agentmods.dev/badge/skills/steph-dove/klaussy-agents/fastapi-precommit.svg)](https://agentmods.dev/skills/steph-dove/klaussy-agents/fastapi-precommit)
Your own site
<a href="https://agentmods.dev/skills/steph-dove/klaussy-agents/fastapi-precommit"><img src="https://agentmods.dev/badge/skills/steph-dove/klaussy-agents/fastapi-precommit.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 799 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.00093 $0.00799
Opus 5 $0.00046 $0.00400
Sonnet 5 $0.00019 $0.00160
Haiku 4.5 $0.00009 $0.00080

Measured 5d ago against content hash fec44f3f2da7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fastapi-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 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

examples/fastapi/.agents/skills/fastapi-precommit/SKILL.md · 42 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. 5d ago First seen · 42 lines · 93 tokens per session scan A fec44f3f2da7

Subscribe to this mod's changes

fastapi-precommit is a skill published in the GitHub repository steph-dove/klaussy-agents (16 stars, last pushed 8d ago), licensed MIT. It adds 93 tokens to every session and 799 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-08-30.

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