AI-powered pre-commit quality gate for Java — auto-fixes imports, detects PMD violations and copy-paste code. Zero config, aligns with your CI.
npx claudepluginhub keepprogress/claude-java-toolkit --plugin claude-java-toolkitJava 專案的 Claude Code 開發工具 Plugin。
快速掃描專案的 code quality 弱點,自動修復常見問題,幫助你決定要導入什麼工具。
不需要 pom.xml — 丟進任何 Java 專案就能跑。如果有 pom.xml,會自動對齊 CI 的 PMD 版本和規則。
Pre-commit 程式碼品質關卡,兩階段漸進式檢查:
| 階段 | 內容 | 需要 Maven? |
|---|---|---|
| Phase 1 | PMD + CPD + import 修復 + suppression guard | 不需要 |
| Phase 2 | ArchUnit(自動搜尋測試類別) | 需要 |
核心特色:
pom.xml → PMD 版本自動對齊 CI,零 driftpom.xml → 使用 PMD 內建規則快速掃描src/main/java) 和多模組 (module/src/main/java) 專案| 項目 | 版本 | 必要? |
|---|---|---|
| Claude Code | 最新版 | 必要 |
| Java 17+ | 系統預設 | 必要(PMD CLI + google-java-format) |
| Git Bash / bash | 4.0+ | 必要(macOS 需 brew install bash) |
| curl + unzip | 任意 | 必要(首次下載工具) |
| Maven | 3.x | 選用(Phase 2) |
首次執行時自動下載 PMD CLI (~35MB) 和 google-java-format (~5MB) 到
~/.claude/tools/。 可透過環境變數CODE_GATE_TOOLS_DIR自訂安裝路徑。
注意事項:
brew install bash 升級至 4.0+--fix-imports-only 會同時重新排序 imports 為 Google style,可能與 IntelliJ 預設排序不同。如需跳過,使用 --report-only 模式github.com(PMD/GJF 下載)、repo1.maven.org(版本解析)/plugin marketplace add keepprogress/claude-java-toolkit
/plugin install claude-java-toolkit@claude-java-toolkit --scope user
重啟 Claude Code。
curl -fsSL https://raw.githubusercontent.com/keepprogress/claude-java-toolkit/master/install.sh | bash
自動完成 clone、cache 建立、註冊、啟用。完成後重啟 Claude Code。
移除:bash ~/.claude/plugins/claude-java-toolkit/install.sh --uninstall
# 自動偵測模組,增量掃描 branch 變更
/claude-java-toolkit:code-gate
# 指定模組
/claude-java-toolkit:code-gate MyModule
# 全量掃描
/claude-java-toolkit:code-gate MyModule --full
# 只報告不修復
/claude-java-toolkit:code-gate --report-only
# 包含測試程式碼
/claude-java-toolkit:code-gate --include-tests
# 掃描所有有變更的模組
/claude-java-toolkit:code-gate --all
# 生成 suppression allowlist(用於舊專案 baseline)
bash ~/.claude/plugins/claude-java-toolkit/skills/code-gate/scripts/check-suppressions.sh \
--generate-allowlist . > src/test/resources/lint-suppression-allowlist.txt
--full --report-only 快速看弱點,決定導入什麼工具pom.xml 時自動對齊 CI 的 PMD 版本和規則--generate-allowlist 建立 baseline,逐步改善claude-java-toolkit/
├── .claude-plugin/
│ ├── plugin.json ← Plugin manifest
│ └── marketplace.json ← Marketplace index
├── skills/
│ └── code-gate/
│ ├── SKILL.md ← Skill 定義
│ ├── scripts/
│ │ ├── detect-env.sh ← 環境偵測 + 工具下載
│ │ ├── resolve-pmd-version.sh ← PMD 版本解析(pom.xml or defaults)
│ │ ├── run-pmd.sh ← PMD / CPD runner
│ │ └── check-suppressions.sh ← Suppression guard
│ └── reference/
│ └── violation-fixes.md ← 自動修復規則參考
└── README.md
MIT
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Battle-tested Claude Code plugin for engineering teams — 38 agents, 156 skills, 72 legacy command shims, production-ready hooks, and selective install workflows evolved through continuous real-world use
UI/UX design intelligence. 67 styles, 161 palettes, 57 font pairings, 25 charts, 15 stacks (React, Next.js, Vue, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Nuxt, Jetpack Compose). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.