Repository navigation
fix(skill): add pre-commit and duplicate-PR checks to running-in-ci - #1443
Merged
Merged
Conversation
The claude-mention bot created a duplicate PR (#1442) when #1416 already addressed the same issue, and shipped code without running cargo fmt — causing a CI failure and requiring a second commit. Both gaps exist because running-in-ci (loaded by all CI workflows) had no guidance on checking for existing PRs or formatting code before committing. The triage-issue skill had these checks but running-in-ci did not. Add two subsections under "PR Creation": - "Before creating a PR" — check open PRs and fix branches first - "Before committing code changes" — run cargo fmt at minimum Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
max-sixty
reviewed
Mar 11, 2026
|
|
||
| ### Before committing code changes | ||
|
|
||
| Always run `cargo fmt` before committing Rust code changes. Ideally run the full |
Owner
There was a problem hiding this comment.
let's remove this part, and instead have this as guidance to run pre-commit in CLAUDE.md
Collaborator
Author
There was a problem hiding this comment.
Done — removed the section from the skill file and added pre-commit run --all-files guidance to CLAUDE.md under Quick Start instead.
Remove the "Before committing code changes" section from running-in-ci skill and add pre-commit guidance to CLAUDE.md instead, per review feedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
max-sixty
reviewed
Mar 11, 2026
|
|
||
| For Claude Code web environments, run `task setup-web` first. See [Testing](#testing) for more commands. | ||
|
|
||
| **Before committing code changes**, always run `pre-commit run --all-files` to catch formatting and lint issues locally. This prevents CI failures that waste a round trip. |
Owner
There was a problem hiding this comment.
this is too high up. let's remove and see if it's a persistent problem
Collaborator
Author
There was a problem hiding this comment.
Removed — let's see if it recurs.
Per review feedback — remove the pre-commit line from Quick Start and see if formatting issues recur before adding targeted guidance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
cargo fmt(minimum) or full pre-merge before committingEvidence
In run 22946109451 (
claude-mentionon issue #1415), the bot:Created a duplicate PR. PR fix: exclude remote-only branches from switch tab completions #1416 (created 2026-03-10) already addressed the same issue — excluding remote branches from switch completions. The bot created fix(completion): exclude remote branches when total exceeds 100 #1442 with a different approach without checking for existing work. Both PRs are authored by
worktrunk-bot. The session log shows the bot went directly from reading the issue to editing code — nogh pr listor branch check.Skipped
cargo fmtbefore committing. The bot rancargo checkto verify compilation but notcargo fmt. CI failed on the pre-commit hook's format check, requiring a second "style: rustfmt" commit and another full CI polling cycle (~11 minutes of additionalsleep 60polls).Session log: tool call sequence (run 22946109451)
Root cause
The
running-in-ciskill (loaded by all CI workflows) had no guidance on either checking for existing PRs or formatting code before committing. Thetriage-issueskill already had both — Step 3 ("Check for duplicates") and Step 6.3 (cargo run -- hook pre-merge --yes) — but this guidance didn't extend to theclaude-mentionworkflow.Test plan
claude-mentionruns for improved behavior (check for existing PRs, runcargo fmt)🤖 Generated with Claude Code