Skip to content

chore: reorganize Claude commands and add hooks support - #103

Merged
keito4 merged 1 commit into
mainfrom
chore/cleanup-claude-commands
Aug 25, 2025
Merged

chore: reorganize Claude commands and add hooks support#103
keito4 merged 1 commit into
mainfrom
chore/cleanup-claude-commands

Conversation

@keito4

@keito4 keito4 commented Aug 25, 2025

Copy link
Copy Markdown
Owner
  • Remove unused command files (14 files deleted)
  • Add new commands: git-sync, setup-husky
  • Add .claude/hooks directory for user-defined hooks
  • Update claude-settings.json configuration

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Git sync utilities for branch updates, PR creation, stashing, and status reporting.
    • Introduced a safety check that blocks bypassing Git hooks (e.g., --no-verify/HUSKY=0).
  • Chores
    • Expanded development environment permissions to support broader git/gh/npm commands and web search.
  • Documentation
    • Added a concise guide for setting up Husky, lint-staged, and commitlint with CI examples.
    • Removed multiple outdated internal workflow guides (CI fixes, testing, quality checks, security, issue automation, etc.).

- Remove unused command files (14 files deleted)
- Add new commands: git-sync, setup-husky
- Add .claude/hooks directory for user-defined hooks
- Update claude-settings.json configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2025

Copy link
Copy Markdown

Walkthrough

Removes multiple .claude/commands documentation files, adds two new docs (git-sync and setup-husky), introduces a Python hook to block Git --no-verify/HUSKY=0 usage, and significantly updates .devcontainer/claude-settings.json permissions/allow-list and WebFetch domains.

Changes

Cohort / File(s) Summary
Retire legacy command docs
.claude/commands/check-coverage.md, .claude/commands/commit.md, .claude/commands/fix-ci.md, .claude/commands/init-project.md, .claude/commands/issue-auto-resolve.md, .claude/commands/issue-create.md, .claude/commands/issue-review.md, .claude/commands/n8n-mcp-setup.md, .claude/commands/pr.md, .claude/commands/quality-check.md, .claude/commands/review-feedback-processor.md, .claude/commands/test-all.md, .claude/commands/update-deps.md, .claude/commands/security-review.md
Deletes extensive documentation for various workflows and commands; security-review.md content cleared.
Add Git sync command docs
.claude/commands/git-sync.md
Adds documentation for bash-based Git sync utilities: sync-main, sync-current, create-pr, stash-and-sync, branch-status.
Add Husky setup guide
.claude/commands/setup-husky.md
Adds a minimal Husky + lint-staged + commitlint setup guide with hook scripts, configs, and CI example.
Introduce hook to block bypassing checks
.claude/hooks/block_git_no_verify.py
New Python script reading JSON tool input; blocks commands containing HUSKY=0 or --no-verify/-n after git commit; suggests sanitized command; exits with code 2 on block.
Revise devcontainer permissions
.devcontainer/claude-settings.json
Expands Bash/Git/GH/npx/npm allow-list, adds WebSearch, adjusts WebFetch domain allowances, introduces ask: [], and prunes some previous entries.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor UserTool as Claude Tool
  participant Hook as block_git_no_verify.py

  UserTool->>Hook: stdin JSON (tool_input.command)
  Hook->>Hook: shlex tokenize command
  alt Empty or non-git/ok
    Hook-->>UserTool: exit 0
  else Contains HUSKY=0 or --no-verify (-n after git commit)
    Hook->>Hook: Build sanitized command (remove blocked tokens)
    Hook-->>UserTool: stderr error + suggested cmd<br/>exit 2
  end
Loading
sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Git as Local Git
  participant Origin as origin/main
  participant GH as GitHub CLI

  rect rgba(200,230,255,0.3)
    note over Dev,GIT: sync-current
    Dev->>Git: Ensure clean state
    Git->>Origin: fetch origin/main
    Git->>Git: merge origin/main into current
    Git-->>Dev: status + recent commits
  end

  rect rgba(200,255,200,0.3)
    note over Dev,GH: create-pr
    Dev->>Git: push current branch
    Dev->>GH: gh pr create --fill
    GH-->>Dev: PR URL
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

Hop hop, I prune the docs, light as air,
Add syncy scripts with careful care.
A Husky barks, “no skipping checks!”
The hook says “nay” to sneaky specs.
In devcontainers, gates align—
Git flows neat, commits divine. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/cleanup-claude-commands

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@keito4 keito4 self-assigned this Aug 25, 2025
@keito4
keito4 merged commit a9b73c8 into main Aug 25, 2025
2 of 3 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1cf1efe and 42f7f55.

📒 Files selected for processing (18)
  • .claude/commands/check-coverage.md (0 hunks)
  • .claude/commands/commit.md (0 hunks)
  • .claude/commands/fix-ci.md (0 hunks)
  • .claude/commands/git-sync.md (1 hunks)
  • .claude/commands/init-project.md (0 hunks)
  • .claude/commands/issue-auto-resolve.md (0 hunks)
  • .claude/commands/issue-create.md (0 hunks)
  • .claude/commands/issue-review.md (0 hunks)
  • .claude/commands/n8n-mcp-setup.md (0 hunks)
  • .claude/commands/pr.md (0 hunks)
  • .claude/commands/quality-check.md (0 hunks)
  • .claude/commands/review-feedback-processor.md (0 hunks)
  • .claude/commands/security-review.md (0 hunks)
  • .claude/commands/setup-husky.md (1 hunks)
  • .claude/commands/test-all.md (0 hunks)
  • .claude/commands/update-deps.md (0 hunks)
  • .claude/hooks/block_git_no_verify.py (1 hunks)
  • .devcontainer/claude-settings.json (2 hunks)
💤 Files with no reviewable changes (14)
  • .claude/commands/test-all.md
  • .claude/commands/update-deps.md
  • .claude/commands/fix-ci.md
  • .claude/commands/issue-review.md
  • .claude/commands/issue-create.md
  • .claude/commands/commit.md
  • .claude/commands/init-project.md
  • .claude/commands/check-coverage.md
  • .claude/commands/pr.md
  • .claude/commands/quality-check.md
  • .claude/commands/issue-auto-resolve.md
  • .claude/commands/n8n-mcp-setup.md
  • .claude/commands/security-review.md
  • .claude/commands/review-feedback-processor.md
🧰 Additional context used
📓 Path-based instructions (1)
.claude/commands/**

📄 CodeRabbit inference engine (CLAUDE.md)

Store pre-configured development commands under .claude/commands/ (coverage, CI/CD troubleshooting, init, PR creation, quality, security, tests, dependency updates)

Files:

  • .claude/commands/setup-husky.md
  • .claude/commands/git-sync.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: keito4/config#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T22:54:12.179Z
Learning: Applies to .claude/commands/** : Store pre-configured development commands under .claude/commands/ (coverage, CI/CD troubleshooting, init, PR creation, quality, security, tests, dependency updates)
📚 Learning: 2025-08-17T22:54:12.179Z
Learnt from: CR
PR: keito4/config#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T22:54:12.179Z
Learning: Applies to .claude/commands/** : Store pre-configured development commands under .claude/commands/ (coverage, CI/CD troubleshooting, init, PR creation, quality, security, tests, dependency updates)

Applied to files:

  • .claude/commands/setup-husky.md
🪛 LanguageTool
.claude/commands/setup-husky.md

[grammar] ~5-~5: There might be a mistake here.
Context: ...な自動整形と静的チェックを行い、プッシュ前とCIで重い検証を実行します。 方針 • pre-commit: ステージ済みファイルに対して ESLint 自動修正...

(QB_NEW_EN)


[grammar] ~6-~6: There might be a mistake here.
Context: ...済みファイルに対して ESLint 自動修正と Prettier 整形を高速実行 • pre-push: 型チェックとテストを実行 • commit-msg: C...

(QB_NEW_EN)


[grammar] ~7-~7: There might be a mistake here.
Context: ...rettier 整形を高速実行 • pre-push: 型チェックとテストを実行 • commit-msg: Conventional Commits を com...

(QB_NEW_EN)


[grammar] ~8-~8: There might be a mistake here.
Context: ...g: Conventional Commits を commitlint で検証 • npm --prefix next で一貫して next/ の依存を使用 ...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...lint/cli @commitlint/config-conventional npm pkg set scripts.prepare="husky" npm ...

(QB_NEW_EN)


[grammar] ~16-~16: There might be a mistake here.
Context: ...onal npm pkg set scripts.prepare="husky" npm run prepare npx husky add .husky/pre...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ... scripts.prepare="husky" npm run prepare npx husky add .husky/pre-commit "npx lin...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ... add .husky/pre-commit "npx lint-staged" npx husky add .husky/commit-msg "npx com...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ...y/commit-msg "npx commitlint --edit $1" npx husky add .husky/pre-push "npm --pre...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...ripts(next/package.json) { "scripts": { "type-check": "tsc --noEmit", "lint": "e...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ...cripts": { "type-check": "tsc --noEmit", "lint": "eslint .", "format": "prettier ...

(QB_NEW_EN)


[grammar] ~29-~29: There might be a mistake here.
Context: ...ck": "tsc --noEmit", "lint": "eslint .", "format": "prettier --write .", "format:...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...lint .", "format": "prettier --write .", "format:check": "prettier --check .", "t...

(QB_NEW_EN)


[grammar] ~31-~31: There might be a mistake here.
Context: ...", "format:check": "prettier --check .", "test:ci": "jest --ci --runInBand" } } ...

(QB_NEW_EN)


[grammar] ~43-~43: There might be a mistake here.
Context: ...on(リポジトリルート) { "next/**/*.{ts,tsx}": [ "npm --prefix next exec eslint --cache -...

(QB_NEW_EN)


[grammar] ~44-~44: There might be a mistake here.
Context: ...n .cache/eslint --max-warnings=0 --fix", "npm --prefix next exec prettier --write...

(QB_NEW_EN)


[grammar] ~45-~45: There might be a mistake here.
Context: ...npm --prefix next exec prettier --write" ], "next/**/*.{js,jsx,json,md,css,scss}...

(QB_NEW_EN)


[grammar] ~46-~46: There might be a mistake here.
Context: ... --prefix next exec prettier --write" ], "next/**/*.{js,jsx,json,md,css,scss}": ...

(QB_NEW_EN)


[grammar] ~47-~47: There might be a mistake here.
Context: ...next/**/*.{js,jsx,json,md,css,scss}": [ "npm --prefix next exec prettier --write...

(QB_NEW_EN)


[grammar] ~60-~60: There might be a mistake here.
Context: ....eslintignore(任意、next/に配置) node_modules .next dist coverage public .prettierign...

(QB_NEW_EN)


[grammar] ~61-~61: There might be a mistake here.
Context: ...tignore(任意、next/に配置) node_modules .next dist coverage public .prettierignore(任意...

(QB_NEW_EN)


[grammar] ~62-~62: There might be a mistake here.
Context: ...re(任意、next/に配置) node_modules .next dist coverage public .prettierignore(任意、next...

(QB_NEW_EN)


[grammar] ~63-~63: There might be a mistake here.
Context: ...t/に配置) node_modules .next dist coverage public .prettierignore(任意、next/に配置) no...

(QB_NEW_EN)


[grammar] ~68-~68: There might be a mistake here.
Context: ...rettierignore(任意、next/に配置) node_modules .next dist coverage build package.json(...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...rignore(任意、next/に配置) node_modules .next dist coverage build package.json(任意、ルート...

(QB_NEW_EN)


[grammar] ~70-~70: There might be a mistake here.
Context: ...re(任意、next/に配置) node_modules .next dist coverage build package.json(任意、ルート。Node...

(QB_NEW_EN)


[grammar] ~71-~71: There might be a mistake here.
Context: ...t/に配置) node_modules .next dist coverage build package.json(任意、ルート。Nodeバージョン固定) ...

(QB_NEW_EN)


[grammar] ~77-~77: There might be a mistake here.
Context: ...json(任意、ルート。Nodeバージョン固定) { "engines": { "node": ">=20 <23" } } .nvmrc(任意、ルート) ...

(QB_NEW_EN)


[grammar] ~92-~92: There might be a mistake here.
Context: ...ons) .github/workflows/ci.yml name: CI on: push: branches: [main] pull_request:...

(QB_NEW_EN)


[grammar] ~93-~93: There might be a mistake here.
Context: ... .github/workflows/ci.yml name: CI on: push: branches: [main] pull_request: job...

(QB_NEW_EN)


[grammar] ~94-~94: There might be a mistake here.
Context: ...hub/workflows/ci.yml name: CI on: push: branches: [main] pull_request: jobs: nod...

(QB_NEW_EN)


[grammar] ~95-~95: There might be a mistake here.
Context: ...yml name: CI on: push: branches: [main] pull_request: jobs: node: runs-on: ubunt...

(QB_NEW_EN)


[grammar] ~96-~96: There might be a mistake here.
Context: ...on: push: branches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps...

(QB_NEW_EN)


[grammar] ~97-~97: There might be a mistake here.
Context: ...sh: branches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps: - us...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...anches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps: - uses: ac...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...uest: jobs: node: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - use...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ...heckout@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run:...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...t@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run: npm c...

(QB_NEW_EN)


[grammar] ~102-~102: There might be a mistake here.
Context: ...ons/setup-node@v4 with: node-version: 20 cache: npm - run: npm ci - run: npm ci w...

(QB_NEW_EN)


[grammar] ~103-~103: There might be a mistake here.
Context: ...0 cache: npm - run: npm ci - run: npm ci working-directory: next - run: npm run t...

(QB_NEW_EN)


[grammar] ~104-~104: There might be a mistake here.
Context: ...irectory: next - run: npm run type-check working-directory: next - run: npm run l...

(QB_NEW_EN)


[grammar] ~105-~105: There might be a mistake here.
Context: ...king-directory: next - run: npm run lint working-directory: next - run: npm run f...

(QB_NEW_EN)


[grammar] ~106-~106: There might be a mistake here.
Context: ...ectory: next - run: npm run format:check working-directory: next - run: npm run t...

(QB_NEW_EN)


[grammar] ~107-~107: There might be a mistake here.
Context: ...g-directory: next - run: npm run test:ci working-directory: next ⸻ トラブルシューティング ...

(QB_NEW_EN)


[grammar] ~120-~120: There might be a mistake here.
Context: ...re.hooksPath Husky の再初期化 rm -rf .husky npm run prepare npx husky add .husky/pre...

(QB_NEW_EN)


[grammar] ~121-~121: There might be a mistake here.
Context: ...sky の再初期化 rm -rf .husky npm run prepare npx husky add .husky/pre-commit "npx lin...

(QB_NEW_EN)


[grammar] ~122-~122: There might be a mistake here.
Context: ... add .husky/pre-commit "npx lint-staged" npx husky add .husky/commit-msg "npx com...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...y/commit-msg "npx commitlint --edit $1" npx husky add .husky/pre-push "npm --pre...

(QB_NEW_EN)

🔇 Additional comments (20)
.claude/hooks/block_git_no_verify.py (5)

1-5: LGTM! Clean implementation with proper imports.

The script uses appropriate imports and follows Python best practices for a command-line tool.


6-13: LGTM! Robust input handling with proper error handling.

The JSON parsing and command extraction logic handles edge cases well, including empty commands and missing keys.


14-18: LGTM! Well-structured state tracking variables.

The boolean flags and sanitized array provide clear state management for the filtering logic.


19-46: LGTM! Comprehensive blocking logic with proper context awareness.

The filtering logic correctly:

  • Blocks HUSKY=0 environment variable
  • Tracks Git command context to properly handle -n flag only after git commit
  • Blocks --no-verify in all contexts
  • Maintains sanitized command for user feedback

This aligns perfectly with the PR's goal of enforcing pre-commit hooks.


47-58: LGTM! Clear user feedback with appropriate exit codes.

The error message in Japanese matches the repository's language preference, provides clear guidance with emojis, and uses proper exit codes (2 for blocked, 0 for allowed).

.claude/commands/setup-husky.md (4)

1-10: LGTM! Clear documentation structure and consistent approach.

The document follows the established pattern for .claude/commands/ files and provides a clear overview of the Husky setup strategy with appropriate Japanese documentation.


13-21: LGTM! Complete setup instructions with proper hook configuration.

The setup commands are comprehensive and correctly configure all three hook types (pre-commit, commit-msg, pre-push) with appropriate scripts.


24-35: LGTM! Well-defined npm scripts for CI/CD pipeline.

The required scripts cover all necessary development workflow steps: type checking, linting, formatting, and testing.


40-57: LGTM! Comprehensive configuration files with proper tool integration.

The configuration files properly integrate lint-staged with the next/ workspace using npm --prefix next for consistency.

.claude/commands/git-sync.md (6)

1-6: LGTM! Clear documentation header following established patterns.

The document structure aligns with the .claude/commands/ conventions and provides clear purpose statements.


7-34: LGTM! Robust sync-main script with proper error handling.

The script includes good practices:

  • Uses set -e for error handling
  • Checks for uncommitted changes before proceeding
  • Provides informative output with emojis
  • Shows recent commits for verification

40-75: LGTM! Comprehensive sync-current script with branch-aware logic.

The script handles both scenarios (on main vs. feature branch) appropriately and maintains consistency with the sync-main approach.


81-120: LGTM! Well-designed PR creation workflow with user interaction.

The script properly:

  • Prevents PR creation from main branch
  • Handles uncommitted changes with user prompts
  • Uses gh pr create --fill for automated PR creation
  • Provides clear feedback throughout the process

126-168: LGTM! Sophisticated stash-and-sync with comprehensive state management.

The script elegantly handles the complex workflow of stashing changes, syncing with main, and restoring changes while tracking state appropriately.


174-243: LGTM! Comprehensive branch status reporting with detailed metrics.

The script provides thorough branch analysis including:

  • Remote tracking status with ahead/behind counts
  • Comparison with main branch
  • Local change categorization
  • Recent commit history

This is a valuable debugging and workflow tool.

.devcontainer/claude-settings.json (5)

9-14: LGTM! Essential filesystem and utility commands added.

The additions of mkdir, rm, chmod, curl, true, and node commands provide necessary capabilities for development workflows.


16-26: LGTM! Comprehensive Git command support enabling development workflows.

The expanded Git command permissions align perfectly with the new git-sync commands and support the full development lifecycle while working with the hook enforcement system.


31-36: LGTM! Enhanced GitHub CLI capabilities for PR workflows.

The additional gh pr and gh run commands support the automated PR creation and CI monitoring workflows described in the new command documentation.


50-60: LGTM! Complete npm and tooling ecosystem support.

The npm-related permissions provide comprehensive support for Node.js development workflows including installation, building, linting, formatting, and type checking.


62-68: LGTM! Modern permission structure with web capabilities.

The addition of WebSearch permission and the new ask: [] array provide enhanced capabilities while maintaining a clean permission structure.

Comment on lines +88 to +109
CI 例(GitHub Actions)

.github/workflows/ci.yml

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
node:
runs-on: ubuntu-latest
steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4
with:
node-version: 20
cache: npm - run: npm ci - run: npm ci
working-directory: next - run: npm run type-check
working-directory: next - run: npm run lint
working-directory: next - run: npm run format:check
working-directory: next - run: npm run test:ci
working-directory: next

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix GitHub Actions YAML formatting.

The CI workflow example has formatting issues that would cause syntax errors.

Apply this diff to fix the YAML structure:

-steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4
-with:
-node-version: 20
-cache: npm - run: npm ci - run: npm ci
-working-directory: next - run: npm run type-check
-working-directory: next - run: npm run lint
-working-directory: next - run: npm run format:check
-working-directory: next - run: npm run test:ci
-working-directory: next
+steps:
+  - uses: actions/checkout@v4
+  - uses: actions/setup-node@v4
+    with:
+      node-version: 20
+      cache: npm
+  - run: npm ci
+  - run: npm ci
+    working-directory: next
+  - run: npm run type-check
+    working-directory: next
+  - run: npm run lint
+    working-directory: next
+  - run: npm run format:check
+    working-directory: next
+  - run: npm run test:ci
+    working-directory: next
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CI 例(GitHub Actions)
.github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
node:
runs-on: ubuntu-latest
steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4
with:
node-version: 20
cache: npm - run: npm ci - run: npm ci
working-directory: next - run: npm run type-check
working-directory: next - run: npm run lint
working-directory: next - run: npm run format:check
working-directory: next - run: npm run test:ci
working-directory: next
jobs:
node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm ci
working-directory: next
- run: npm run type-check
working-directory: next
- run: npm run lint
working-directory: next
- run: npm run format:check
working-directory: next
- run: npm run test:ci
working-directory: next
🧰 Tools
🪛 LanguageTool

[grammar] ~92-~92: There might be a mistake here.
Context: ...ons) .github/workflows/ci.yml name: CI on: push: branches: [main] pull_request:...

(QB_NEW_EN)


[grammar] ~93-~93: There might be a mistake here.
Context: ... .github/workflows/ci.yml name: CI on: push: branches: [main] pull_request: job...

(QB_NEW_EN)


[grammar] ~94-~94: There might be a mistake here.
Context: ...hub/workflows/ci.yml name: CI on: push: branches: [main] pull_request: jobs: nod...

(QB_NEW_EN)


[grammar] ~95-~95: There might be a mistake here.
Context: ...yml name: CI on: push: branches: [main] pull_request: jobs: node: runs-on: ubunt...

(QB_NEW_EN)


[grammar] ~96-~96: There might be a mistake here.
Context: ...on: push: branches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps...

(QB_NEW_EN)


[grammar] ~97-~97: There might be a mistake here.
Context: ...sh: branches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps: - us...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...anches: [main] pull_request: jobs: node: runs-on: ubuntu-latest steps: - uses: ac...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...uest: jobs: node: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - use...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ...heckout@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run:...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...t@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run: npm c...

(QB_NEW_EN)


[grammar] ~102-~102: There might be a mistake here.
Context: ...ons/setup-node@v4 with: node-version: 20 cache: npm - run: npm ci - run: npm ci w...

(QB_NEW_EN)


[grammar] ~103-~103: There might be a mistake here.
Context: ...0 cache: npm - run: npm ci - run: npm ci working-directory: next - run: npm run t...

(QB_NEW_EN)


[grammar] ~104-~104: There might be a mistake here.
Context: ...irectory: next - run: npm run type-check working-directory: next - run: npm run l...

(QB_NEW_EN)


[grammar] ~105-~105: There might be a mistake here.
Context: ...king-directory: next - run: npm run lint working-directory: next - run: npm run f...

(QB_NEW_EN)


[grammar] ~106-~106: There might be a mistake here.
Context: ...ectory: next - run: npm run format:check working-directory: next - run: npm run t...

(QB_NEW_EN)


[grammar] ~107-~107: There might be a mistake here.
Context: ...g-directory: next - run: npm run test:ci working-directory: next ⸻ トラブルシューティング ...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In .claude/commands/setup-husky.md around lines 88 to 109, the GitHub Actions CI
example is malformed (incorrect indentation, missing keys and list structure)
which will break the YAML parser; fix it by restoring proper YAML structure:
ensure top-level keys (name, on, jobs), properly indent 'push' and
'pull_request' under 'on', define 'jobs.node.runs-on', make 'steps' a list with
each step as an item, place 'uses' and 'with' under the correct step items, and
move each run command into its own '- run:' entry with optional
'working-directory' where needed (e.g., run: npm ci; run: npm run type-check
with working-directory: next) so the workflow is syntactically valid.

Comment on lines +126 to +128
一時的にフックをスキップ

git commit --no-verify -m "urgent: emergency fix"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Contradicts the hook blocking policy.

Line 128 shows git commit --no-verify as a troubleshooting option, but this directly conflicts with the new .claude/hooks/block_git_no_verify.py script that explicitly blocks this usage.

Apply this diff to align with the hook enforcement policy:

-一時的にフックをスキップ
-
-git commit --no-verify -m "urgent: emergency fix"
+一時的にフックをスキップ
+
+# 注意: --no-verify は使用禁止です
+# 緊急時でも適切なコミットメッセージを使用してください
+git commit -m "fix: emergency fix"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
一時的にフックをスキップ
git commit --no-verify -m "urgent: emergency fix"
一時的にフックをスキップ
# 注意: --no-verify は使用禁止です
# 緊急時でも適切なコミットメッセージを使用してください
git commit -m "fix: emergency fix"
🤖 Prompt for AI Agents
.claude/commands/setup-husky.md around lines 126 to 128 shows a troubleshooting
suggestion using "git commit --no-verify", which conflicts with the
.claude/hooks/block_git_no_verify.py hook that blocks bypassing hooks; remove
that line and replace it with a short note stating that bypassing hooks with
--no-verify is disallowed and instruct contributors to follow the repository's
emergency/escallation process (contact maintainers or follow the documented
bypass procedure) or to fix lint/tests locally before committing, and add a
pointer to the hook file or policy for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant