pre-commit-check
コミット前品質チェックスキル(Lint、テスト、ビルドの高速検証)
Best use case
pre-commit-check is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. コミット前品質チェックスキル(Lint、テスト、ビルドの高速検証)
コミット前品質チェックスキル(Lint、テスト、ビルドの高速検証)
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "pre-commit-check" skill to help with this workflow task. Context: コミット前品質チェックスキル(Lint、テスト、ビルドの高速検証)
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pre-commit-check/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pre-commit-check Compares
| Feature / Agent | pre-commit-check | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
コミット前品質チェックスキル(Lint、テスト、ビルドの高速検証)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Pre-Commit Check Skill - コミット前品質チェックスキル ## 役割 コミット前の品質チェックを高速に実行するスキルです。qa-checkよりも軽量で、開発中の頻繁なチェックに適しています。 ## qa-check との違い | 項目 | pre-commit-check | qa-check | |------|-----------------|----------| | 目的 | 開発中の頻繁なチェック | PR作成前の最終チェック | | 実行速度 | 高速(変更ファイルのみ) | 通常(全体チェック) | | テスト | 変更箇所のみ(オプション) | 全テスト実行 | | カバレッジ | チェックしない | 80%以上必須 | | ビルド | スキップ可能 | 必須 | | 使用タイミング | コミット直前 | PR作成直前 | ## 実行フロー ### Phase 1: 変更ファイル確認 ```bash # 変更されたファイルを確認 git status --short # ステージングされたファイルを確認 git diff --cached --name-only # 変更ファイルからBackend/Frontendを判定 ``` ### Phase 2: Backend チェック(変更がある場合) #### 2-1. Lint実行(変更ファイルのみ) ```bash cd backend # Checkstyle(変更ファイルのみ) ./gradlew checkstyleMain checkstyleTest # SpotBugs(変更ファイルのみ) ./gradlew spotbugsMain spotbugsTest ``` #### 2-2. テスト実行(skip_tests=false の場合) ```bash # 変更されたクラスに関連するテストのみ実行 ./gradlew test --tests "*[変更されたクラス名]Test" ``` #### 2-3. コンパイル確認 ```bash # ビルドはスキップしてコンパイルのみ ./gradlew compileJava compileTestJava ``` ### Phase 3: Frontend チェック(変更がある場合) #### 3-1. Lint実行 ```bash cd frontend # Biome Lint(全体) pnpm run lint:check ``` #### 3-2. テスト実行(skip_tests=false の場合) ```bash # 変更されたファイルに関連するテストのみ実行 pnpm run test:ci --changed ``` #### 3-3. 型チェック ```bash # TypeScript型チェック npx tsc --noEmit ``` ### Phase 4: 結果レポート #### 成功時 ```markdown ## Pre-Commit Check 完了 ### Backend - ✅ Lint: エラーなし - ✅ テスト: [実行数] 件成功 - ✅ コンパイル: 成功 ### Frontend - ✅ Lint: エラーなし - ✅ テスト: [実行数] 件成功 - ✅ 型チェック: エラーなし ### 次のステップ コミット可能です。 ``` #### 失敗時 ```markdown ## Pre-Commit Check 失敗 ### Backend - ❌ Lint: エラー [数] 件 - [エラー内容] - ❌ テスト: [失敗数] 件失敗 - [失敗テスト名] - ✅ コンパイル: 成功 ### Frontend - ✅ Lint: エラーなし - ✅ テスト: すべて成功 - ✅ 型チェック: エラーなし ### 修正が必要な項目 1. Backend Lintエラーを修正 2. Backend テスト失敗を修正 ### 次のステップ 上記を修正してから再度チェックしてください。 ``` ## 高速化のポイント ### 1. 変更ファイルのみチェック - git diffで変更ファイルを検出 - 関連するテストのみ実行 - ビルドをスキップ ### 2. 並行実行 - Backend/Frontendのチェックを並行実行 - Lint/テスト/型チェックを並行実行可能な場合は並行実行 ### 3. キャッシュ活用 - Gradleのビルドキャッシュ活用 - pnpmのキャッシュ活用 ## 使用ツール ### 必須ツール - **Bash**: Lint/テスト/コンパイル実行、git操作 ### 推奨ツール - **Grep**: エラーパターン検索 - **Read**: レポートファイル確認 ## 重要な注意事項 ### pre-commit-check は軽量チェック - PR作成前は必ず qa-check を実行すること - pre-commit-check は開発中の頻繁なチェック用 - カバレッジチェックは行わない ### テストスキップの判断 - skip_tests=true は緊急時のみ使用 - 通常は skip_tests=false でテストを実行すること - テストをスキップした場合は後で必ず実行 ## 参照ドキュメント ### 必須参照 - `documents/development/development-policy.md`: 開発ガイドライン ### 設定ファイル - `backend/config/checkstyle/checkstyle.xml`: Checkstyle設定 - `backend/config/spotbugs/spotbugs-exclude.xml`: SpotBugs設定 - `frontend/biome.json`: Biome設定
Related Skills
commit-work
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
shellcheck-configuration
Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.
security-compliance-compliance-check
You are a compliance expert specializing in regulatory requirements for software systems including GDPR, HIPAA, SOC2, PCI-DSS, and other industry standards. Perform compliance audits and provide implementation guidance.
pentest-checklist
This skill should be used when the user asks to "plan a penetration test", "create a security assessment checklist", "prepare for penetration testing", "define pentest scope", "follow security testing best practices", or needs a structured methodology for penetration testing engagements.
code-review-checklist
Comprehensive checklist for conducting thorough code reviews covering functionality, security, performance, and maintainability
aws-compliance-checker
Automated compliance checking against CIS, PCI-DSS, HIPAA, and SOC 2 benchmarks
caveman-commit
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
ghe-checkpoint
Posts a progress checkpoint to the currently active GitHub Issue thread. Saves work state including completed tasks, in-progress items, files changed, commits, and blockers without changing workflow phases. Requires an already-claimed in-progress thread. Use when user wants to save progress, record milestones, document blockers, or preserve state before ending a session.
triforce-sync-check
Verify 3-Mirror skill sync consistency across .public/skills, .codex/skills, and .claude/skills. Use after skill changes, before commits, or for CI validation.
quick-quality-check
Lightning-fast quality check using parallel command execution. Runs theater detection, linting, security scan, and basic tests in parallel for instant feedback on code quality.
backend-atomic-commit
Pedantic backend pre-commit and atomic commit Skill for Django/Optimo-style repos. Enforces local AGENTS.md / CLAUDE.md, pre-commit hooks, .security/* helpers, and Monty’s backend engineering taste – with no AI signatures in commit messages.
accessibility-check
Evaluate accessibility and WCAG compliance of UI components and pages. Use when the user asks to "check accessibility", "audit a11y", "WCAG review", "screen reader test", or needs to verify inclusive design practices.