Add critical instructions and hooks for Claude Code#8715
Open
dapplion wants to merge 2 commits intosigp:unstablefrom
Open
Add critical instructions and hooks for Claude Code#8715dapplion wants to merge 2 commits intosigp:unstablefrom
dapplion wants to merge 2 commits intosigp:unstablefrom
Conversation
- Add CRITICAL section at top of CLAUDE.md to ensure Claude always runs `cargo fmt --all && make lint-fix` and `cargo check` after code changes - Add .claude/settings.json with post-tool-call hook to remind about formatting and linting after Edit/Write operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eserilev
approved these changes
Jan 28, 2026
jimmygchen
reviewed
Jan 29, 2026
| "post-tool-call": [ | ||
| { | ||
| "matcher": "Edit|Write", | ||
| "command": "echo '\n[Reminder] Run: cargo fmt --all && make lint-fix && cargo check'" |
Member
There was a problem hiding this comment.
I can't find post-tool-call on claude documentation, is this documented somewhere else?
Collaborator
Author
There was a problem hiding this comment.
Hmm should be post-tool-use?
Member
|
I thought the plan was to add a commit hook that checks |
Collaborator
Author
Do we want to have git hooks that apply to everyone? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/settings.jsonwith post-tool-call hook to remind about formatting and linting after Edit/Write operationsThis helps ensure Claude Code consistently follows the project's code quality requirements.
Test plan
🤖 Generated with Claude Code
(Lion here)
Claude recognizes that it ignored Claude.md most of the time, and recommends this edits to actually lint and format when doing changes.