Skip to content

chore(ci): Improve Claude code review prompt to avoid duplicate feedback#934

Merged
yamadashy merged 2 commits intomainfrom
chore/improve-claude-code-review-prompt
Nov 3, 2025
Merged

chore(ci): Improve Claude code review prompt to avoid duplicate feedback#934
yamadashy merged 2 commits intomainfrom
chore/improve-claude-code-review-prompt

Conversation

@yamadashy
Copy link
Owner

Improved the Claude code review workflow prompt to prevent duplicate feedback when the workflow runs multiple times on PR updates.

Changes

  • Added structured "How to Comment" section with clear instructions
  • Instructed Claude to read existing comments before reviewing
  • Added guidance to only provide new feedback or updates
  • Added instructions to use inline comments for specific code issues with suggestions
  • Reorganized commenting approach into numbered steps for clarity

Benefits

  • Prevents repetitive feedback across multiple workflow runs
  • Provides incremental value with each review
  • Uses inline comments effectively for specific code issues
  • Better organizes the review process

Checklist

  • Run npm run test (not applicable - workflow file change only)
  • Run npm run lint (not applicable - workflow file change only)

Added structured "How to Comment" section that instructs Claude to:
- Check existing PR comments before reviewing to avoid duplicates
- Only provide new feedback or updates to previous feedback
- Use inline comments for specific code issues with suggestions
- Organize commenting approach in clear numbered steps

This prevents repetitive feedback when the workflow runs on PR updates.
Copilot AI review requested due to automatic review settings November 3, 2025 09:25
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

The pull request updates the Claude AI review prompt in a GitHub Actions workflow, replacing a brief instruction with a detailed seven-step guide for commenting and inline-comment usage. The prompt now prescriptively instructs Claude on using the mcp__github_inline_comment__create_inline_comment tool and formatting feedback within HTML details/summary tags.

Changes

Cohort / File(s) Summary
Claude workflow prompt expansion
\.github/workflows/claude-code-review\.yml
Updated prompt text: replaced single-line gh pr comment instruction with detailed 7-step "How to Comment" guide; added inline-comment tool usage guidance and details/summary tag formatting; removed redundant wrapping line

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify prompt text clarity and correctness
  • Confirm no unintended formatting changes to the YAML file structure
  • Ensure tool references (mcp__github_inline_comment__create_inline_comment) are accurate

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "chore(ci): Improve Claude code review prompt to avoid duplicate feedback" directly aligns with the main change in the pull request. The raw summary confirms the changeset updates the Claude review prompt in the GitHub Actions workflow to prevent duplicate feedback, which is exactly what the title conveys. The title uses the conventional commit format with clear scope (ci) and concise description of the improvement being made. It is specific enough that a teammate reviewing the history would immediately understand the primary change.
Description Check ✅ Passed The pull request description comprehensively covers all required elements from the template. It provides a clear summary of changes at the beginning, includes a detailed "Changes" section with specific modifications made, adds a "Benefits" section explaining the value of the changes, and includes the required checklist with both items properly marked as checked and annotated with context about applicability to workflow file changes. The description is well-organized, thorough, and goes beyond the minimal template requirements while remaining focused and relevant to the changeset.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 3, 2025

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: d3faa32
Status: ✅  Deploy successful!
Preview URL: https://7bad3c50.repomix.pages.dev
Branch Preview URL: https://chore-improve-claude-code-re.repomix.pages.dev

View logs

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.50%. Comparing base (ea89821) to head (d3faa32).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #934   +/-   ##
=======================================
  Coverage   89.50%   89.50%           
=======================================
  Files         111      111           
  Lines        7807     7807           
  Branches     1498     1498           
=======================================
  Hits         6988     6988           
  Misses        819      819           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the Claude code review workflow by adding structured commenting guidelines and inline comment capabilities. The changes aim to prevent repetitive feedback by instructing Claude to check existing comments before providing new reviews.

Key changes:

  • Added a detailed numbered guide for how Claude should approach commenting on PRs
  • Introduced inline comment functionality using MCP tools
  • Added instructions to check existing comments and avoid repetition

- Added --comments flag to gh pr view command for more reliable comment retrieval
- Clarified suggestion format instruction to "actionable fix suggestions with code examples"

This makes the instructions clearer and ensures Claude can consistently access all PR comments.
@yamadashy yamadashy merged commit 99612d2 into main Nov 3, 2025
47 of 48 checks passed
@yamadashy yamadashy deleted the chore/improve-claude-code-review-prompt branch November 3, 2025 09:36
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.

2 participants