From 3bd854b7a1b2963eff9cf2e151925dcf5447b18b Mon Sep 17 00:00:00 2001 From: filippofilip95 Date: Mon, 22 Dec 2025 21:34:49 +0100 Subject: [PATCH] feat: improve Claude Code Review workflow instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Focus on high-value issues: bugs, security, performance, breaking changes - Add guidelines for concise, actionable feedback - Fix permissions: pull-requests write (required for gh pr comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/claude-code-review.yml | 31 +++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 8452b0f..c80cbd9 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pull-requests: read + pull-requests: write issues: read id-token: write @@ -37,19 +37,22 @@ jobs: with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} prompt: | - REPO: ${{ github.repository }} - PR NUMBER: ${{ github.event.pull_request.number }} - - Please review this pull request and provide feedback on: - - Code quality and best practices - - Potential bugs or issues - - Performance considerations - - Security concerns - - Test coverage - - Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. - - Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. + Review this PR thoroughly. Follow CLAUDE.md for project conventions. + + ## Review Focus + 1. **Bugs & Logic Errors** - Identify actual problems, not style nitpicks + 2. **Security** - Auth issues, injection vulnerabilities, data exposure + 3. **Performance** - N+1 queries, unnecessary re-renders, memory leaks + 4. **Breaking Changes** - API changes, schema migrations, config changes + + ## Guidelines + - Be concise and actionable + - Praise good patterns briefly, focus on issues + - Suggest specific fixes, not vague improvements + - Skip trivial formatting/style comments + - If the PR looks good, say so briefly + + Post your review using `gh pr comment`. # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://code.claude.com/docs/en/cli-reference for available options