java-checkstyle

A command-based Java formatting check and fixer using the project's Spotless Maven setup. Maven is a build tool commonly used for Java projects.

In plain words
What is it for?
Use it after changing Java files, or when a pull request reports a Java checkstyle or formatting failure; it can apply or verify formatting for the whole project or one Maven module.
Why use it?
It fixes formatting failures that can make continuous-integration checks reject a change. It can also check formatting without changing files.

Skill for Claude CodeCodex

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/open-metadata/openmetadata/java-checkstyle
Any agent
npx skills add open-metadata/OpenMetadata --skill java-checkstyle
Clone the repo
git clone --depth 1 https://github.com/open-metadata/OpenMetadata

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 939 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.00060 $0.00939
Opus 5 $0.00030 $0.00469
Sonnet 5 $0.00012 $0.00188
Haiku 4.5 $0.00006 $0.00094

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

Security

Grade A, and why

java-checkstyle 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.

skills/java-checkstyle/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Java Checkstyle / Spotless

OpenMetadata enforces Java formatting via the Spotless Maven plugin. Every CI build runs mvn spotless:check and fails the PR if any file is not formatted. This skill keeps the fix on a single, consistent command so reviewers never have to ask for it manually again.

When to activate

  • The user asks to "fix checkstyle", "fix Java formatting", "apply spotless", "run spotless", "format Java", or similar.
  • CI posts a Java checkstyle failed / Fix Java checkstyle comment on a PR (the project's bot phrases the instruction as "Please run mvn spotless:apply in the root of your repository and commit the changes to this PR").
  • After you have finished authoring or editing any .java files — before opening a PR or pushing a commit that touches Java.

Arguments

  • No arguments: run mvn spotless:apply at the repo root across all modules.
  • -pl <module>: scope to a single Maven module (e.g. -pl openmetadata-service). Useful when only one module changed and you want a faster run.
  • --check: run mvn spotless:check instead of apply. Use to confirm the tree is clean without touching files (e.g. to verify before push).

Process

Step 1: Run Spotless

From the repo root:

mvn spotless:apply                 # default — formats everything
# or
mvn -pl <module> spotless:apply    # scoped to one module
# or
mvn spotless:check                 # verify only, don't write

Spotless is fast (seconds, no compilation). If it fails with a plugin error (not a formatting diff), surface the error and stop — do not try to hand-edit formatting around the failure.

Step 2: Check what changed

git status --short
git diff --stat

Expect reformatting in .java files only. If Spotless touches pom.xml or other non-Java files, that's also fine — Spotless is configured for those too in this repo.

Step 3: Commit

Do not fold the reformat into an unrelated commit. If the user asked you to commit, follow their preference (fold into the in-progress commit, or make a separate one). Otherwise, when you are confident the change is a purely mechanical formatting reformat, you may commit it on its own as a Fix Java checkstyle commit — this matches the repo's existing history for bot-triggered formatting-only commits. If you are unsure whether the diff is purely mechanical, do NOT auto-commit: surface the changed-file list and let the user decide.

Read the full file on GitHub · 98 lines

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 · 98 lines · 60 tokens per session scan A 59f6556b2062

Subscribe to this mod's changes

java-checkstyle is a skill published in the GitHub repository open-metadata/OpenMetadata (15,032 stars, last pushed yesterday), licensed Apache-2.0. It adds 60 tokens to every session and 939 once invoked, about $0.0003 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

test-review

You are an expert DataHub test reviewer. Your role is to evaluate smoke tests and integration tests against established testing standards, identify issues, and provide actionable feedback.

datahub-project/datahub · 0 tokens

conventional-commit-message

Generate high-quality Conventional Commit messages for repositories using conventional-changelog-conventionalcommits.

conventional-changelog/conventional-changelog · 23 tokens

whodb

Query and explore databases via MCP. Use when the user asks to inspect schemas, run SQL, browse tables, analyze data quality, generate ER diagrams, or work with PostgreSQL, MySQL, MariaDB, TiDB, SQLite, MongoDB, Redis, ClickHouse, Elasticsearch, or DuckDB.

clidey/whodb · 64 tokens

schema-designer

Help design database schemas, create tables, and plan data models. Activates when users ask to create tables, design schemas, or model data relationships.

clidey/whodb · 34 tokens

oss-fuzz

Run Tika's OSS-Fuzz Jazzer targets locally against a working-tree checkout — build the image, build fuzzers from local source, fuzz a target, run a corpus as a regression pass, reproduce a crash, and add seeds. Use for "fuzz the OneNote parser", "run OneNoteParserFuzzer against these files", "reproduce an OSS-Fuzz…

apache/tika · 90 tokens

update-site-for-release

Update/publish the Apache Tika website (tika-site SVN repo) for a release — step 17 of the Release Process. Handles the 4.x track (Changes page + aggregate javadoc + Antora docs branch) vs the 3.x maintenance track (full per-version apt docs + javadoc). Use for "update the site", "publish the site for X.Y.Z", "the…

apache/tika · 92 tokens