dbatools: Skill for Claude Code

.claude/skills/precommit/SKILL.md

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.

This is dataplat/dbatools's own configuration. It tells Claude Code how to work on dbatools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dbatools configures →

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,858 stars · on GitHub · dbatools.io

Reuse

Borrowing it

Nothing to install: this file belongs to dataplat/dbatools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dataplat/dbatools/development/.claude/skills/precommit/SKILL.md
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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for precommit

Your own site · 80×15
<a href="https://agentmods.dev/skills/dataplat/dbatools/precommit"><img src="https://agentmods.dev/badge/skills/dataplat/dbatools/precommit.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.5 $0.00014 $0.00176
Sonnet 5.5 $0.00007 $0.00088
Haiku 4.5 $0.00003 $0.00044

Measured 2mo ago against content hash e1a8666219c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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,858 stars, last pushed 4d ago), licensed MIT. It adds 34 tokens to every session and 441 once invoked, about $0.0001 per session on Opus 5.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

precommit compared with skills from other repositories

precommit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
precommitdataplat/dbatoolsSkill2.9k4d agoMITA34Claude Code
team-reviewwesammustafa/Claude-Code-Everything-You-Need-to-KnowSkill3.5k3d agononeA34Claude Code, Codex
review-checklistwesammustafa/Claude-Code-Everything-You-Need-to-KnowSkill3.5k3d agononeA25Claude Code, Codex
code-auditorbahayonghang/my-ai-cli-toolkitSkill178d agoMITA176Claude Code
parity-guard-test-patternfabioc-aloha/Alex_Skill_MallSkill5yesterdayMITA28Claude Code, Codex
testing-guideAsiaOstrich/universal-dev-standardsSkill842d agononeA152Claude Code
journey-test-assistantAsiaOstrich/universal-dev-standardsSkill842d agononeA170Claude Code