precommit

precommit is a skill for Claude Code from dataplat/dbatools. It costs 34 tokens per session (441 once invoked), scanned A, original, MIT.

A pre-commit checklist for the dbatools PowerShell project. It runs style, command-registration, TODO, and code-review checks on the current changes.

In plain words
What is it for?
Use it to review changed PowerShell files and get one pass-or-fail summary before committing.
Why use it?
It catches common problems before a commit, including incorrect PowerShell style, unregistered commands, unresolved TODOs, and issues in the working diff.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions Codex.

About the project

dbatools is a PowerShell toolkit for automating SQL Server administration and moving SQL Server instances between environments. It is for database administrators who manage SQL Server systems and migrations.

dataplat/dbatools · 2,829 stars · on GitHub · dbatools.io

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/dataplat/dbatools/precommit
Any agent
npx skills add dataplat/dbatools --skill precommit
Clone the repo
git clone --depth 1 https://github.com/dataplat/dbatools

Made for: Claude Code.

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 precommit

README.md
[![agentmods](https://agentmods.dev/badge/skills/dataplat/dbatools/precommit.svg)](https://agentmods.dev/skills/dataplat/dbatools/precommit)
Your own site
<a href="https://agentmods.dev/skills/dataplat/dbatools/precommit"><img src="https://agentmods.dev/badge/skills/dataplat/dbatools/precommit.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 441 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.00034 $0.00441
Opus 5 $0.00017 $0.00220
Sonnet 5 $0.00007 $0.00088
Haiku 4.5 $0.00003 $0.00044

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

Security

Grade A, and why

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 2d 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.

.claude/skills/precommit/SKILL.md · 36 lines

What it actually says

Precommit Quality Sweep

Run the same gates the Stop hooks enforce, but on demand and against the full working diff (including changes made via Bash, which the session-scoped auto-review can't see). Report a single pass/fail summary at the end.

Gates, in order

1. Style scan (changed PowerShell files)

For each changed *.ps1 (from git diff --name-only HEAD + untracked), check the dbatools style rules from CLAUDE.md: no backticks for line continuation, no = $true in parameter attributes, no ::new(), double quotes not single quotes, $splat<Purpose> naming, no ArrayList/List collection, hashtable = alignment, no trailing whitespace. Report violations as path:line — rule.

2. Registration check (new commands)

For each new public/*.ps1, confirm the function name appears in dbatools.psd1 (FunctionsToExport) AND dbatools.psm1.

3. TODO sweep

grep -n -i -E '\b(TODO|FIXME|HACK|XXX|WORKAROUND)\b' across changed code files (exclude .claude/). Each hit must be resolved or explicitly acknowledged by the user.

4. Codex review (if codex is installed)

Invoke the /codex skill with uncommitted scope. Skip with a note if codex is not installed.

5. Commit message reminder

Remind that the commit message must include the (do <CommandName>) CI targeting pattern.

Output

Finish with a table: gate | result (PASS / FAIL / SKIPPED-why) | details. If everything passes, say the changes are ready to commit.

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 · 36 lines · 34 tokens per session scan A e1a8666219c8

Subscribe to this mod's changes

precommit is a skill published in the GitHub repository dataplat/dbatools (2,829 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 441 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-09-03.

Related

Other skills, from other repositories

weather-fetcher

Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API.

shanraisshan/claude-code-best-practice · 21 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

analyzing-powershell-script-block-logging

Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression…

mukul975/Anthropic-Cybersecurity-Skills · 88 tokens

oh-my-posh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

JanDeDobbeleer/oh-my-posh · 47 tokens

claude-md-review

Audit a CLAUDE.md file for the patterns that actually degrade Claude Code's output — vagueness, unnamed files, stale facts, and bloat. Use when asked to review, audit, improve, shrink, or fix a CLAUDE.md, and when a project's results feel inconsistent or Claude keeps rediscovering the same context.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 69 tokens

best-practices

Searchable knowledge base of 152+ programming best practices across 30+ languages and frameworks. BM25-powered search over curated resources from industry leaders (Google, Airbnb, Uber, Mozilla, Shopify, OWASP).

dereknguyen269/programing-best-practices · 0 tokens