一键导入
precommit
Format, validate checkstyle, and run tests before committing — in the correct order
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Format, validate checkstyle, and run tests before committing — in the correct order
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | precommit |
| description | Format, validate checkstyle, and run tests before committing — in the correct order |
| argument-hint | ["module"] |
| allowed-tools | Bash(./mvnw *) |
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.
Single module:
./mvnw spring-javaformat:apply -pl $ARGUMENTS
All modules:
./mvnw spring-javaformat:apply
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.
Single module:
./mvnw test -pl $ARGUMENTS 2>&1 | tail -20
All modules (full build):
./mvnw install 2>&1 | tail -20
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.
Check and fix Checkstyle violations in jhelm modules
jhelm project coding standards and conventions for Java 21 with Lombok and Maven
Implement a GitHub issue with branch and pull request workflow
Auto-format, fix violations, and run Maven validate (PMD + Checkstyle) in one step
jhelm project architecture and module structure for a Java Helm implementation
Code review automation for Java, TypeScript, JavaScript, Python, Go. Analyzes PRs for complexity and risk, checks code quality for SOLID violations and code smells, generates review reports. Use when reviewing pull requests, analyzing code quality, identifying issues, generating review checklists.