precommit

precommit is a skill for Claude Code from alexmond/jhelm. It costs 19 tokens per session (411 once invoked), scanned A, original, Apache-2.0.

A pre-commit check for a Java Maven project. It formats code, checks style rules, and runs tests in that order, for one module or the whole project.

In plain words
What is it for?
Use it before committing Java changes in a multi-module Maven project. It helps prepare a clean commit and reports which checks passed or failed.
Why use it?
It catches formatting, style, and test failures before a commit. This avoids committing changes that do not meet the project's checks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it before committing Java changes in a multi-module Maven project. It helps prepare a clean commit and reports which checks passed or failed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexmond/jhelm/precommit
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.

Any agent
npx skills add alexmond/jhelm --skill precommit
Clone the repo
git clone --depth 1 https://github.com/alexmond/jhelm

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/alexmond/jhelm/precommit/github.svg)](https://agentmods.dev/skills/alexmond/jhelm/precommit)
Your own site
<a href="https://agentmods.dev/skills/alexmond/jhelm/precommit"><img src="https://agentmods.dev/badge/skills/alexmond/jhelm/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/alexmond/jhelm/precommit"><img src="https://agentmods.dev/badge/skills/alexmond/jhelm/precommit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 411 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.
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.00019 $0.00411
Opus 5.5 $0.00008 $0.00164
Sonnet 5.5 $0.00004 $0.00082
Haiku 4.5 $0.00002 $0.00041

Measured 1mo ago against content hash 932125491236, 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 1mo 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 · 72 lines

What it actually says

Pre-commit Check: Format → Validate → Test

Run this before every commit to catch format and checkstyle issues early.

$ARGUMENTS is an optional module name (e.g. jhelm-core). If omitted, runs against all modules.


Step 1: Auto-format

Single module:

./mvnw spring-javaformat:apply -pl $ARGUMENTS

All modules:

./mvnw spring-javaformat:apply

Step 2: Validate (checkstyle)

Single module:

./mvnw validate -pl $ARGUMENTS 2>&1 | grep -E "^\[ERROR\]|violations"

All modules:

./mvnw validate 2>&1 | grep -E "^\[ERROR\]|violations"

If violations remain after auto-format, invoke the /checkstyle skill to fix them manually. Do not proceed to Step 3 until validate passes cleanly.


Step 3: Run tests

Single module:

./mvnw test -pl $ARGUMENTS 2>&1 | tail -20

All modules (full build):

./mvnw install 2>&1 | tail -20

Outcome

Report a summary:

Step Result
Format Applied / Already clean
Checkstyle 0 violations / N violations (list them)
Tests X passed, 0 failures / list failures

If everything is green, the working tree is ready to commit. If anything fails, fix it before committing.

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. 1mo ago First seen · 72 lines · 19 tokens per session scan A 932125491236

Subscribe to this mod's changes

precommit is a skill published in the GitHub repository alexmond/jhelm (7 stars, last pushed 3d ago), licensed Apache-2.0. It adds 19 tokens to every session and 411 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-08-31.

Related

Other skills, from other repositories

release-notes

Update CHANGELOG.md and README.md for an Azure SDK for Java package based on a GitHub PR. Use when the user wants to write or update release notes, changelogs, or readme docs from a PR reference.

Azure/azure-sdk-for-java · 50 tokens

codegen

Generate code from TypeSpec via tsp-client (update, sync, generate). Requires a tsp-location.yaml in the current working directory. Supports updating the commit hash before running.

Azure/azure-sdk-for-java · 37 tokens

feature-workflow

Taking a multi-PR feature from "shape unknown" to merged without five review rounds per PR: spike until interfaces stop moving, write the contract, cut PRs along contract seams, one review per PR. Use when starting a feature that touches more than one lifecycle object or public interface, when a PR review keeps…

apache/tika · 77 tokens

release-plugin

Prepare and execute a new release for the flutter-intellij plugin, including updating dependencies, compatibility bounds, changelogs, and verification.

flutter/flutter-intellij · 30 tokens

java

Use when writing, reviewing or refactoring modern Java (21+, 25 LTS) — records and sealed interfaces as algebraic data types, exhaustive pattern-matching switch over instanceof ladders, virtual-thread concurrency, structured concurrency and ScopedValue replacing ThreadLocal, Stream and Optional pipelines…

ericrisco/rsc-harness · 89 tokens

plugin-code-review-orchestrated

Orchestrates a code review of the spring-plugin repository through scope/context passes, routing, domain reviewer subskills, and per-artifact validation. Use when asked to review a PR, diff, commit, branch, module, or file set, to run a full orchestrated review, or to produce a validated review report.

explyt/spring-plugin · 72 tokens