1515 id-token : write
1616
1717 steps :
18- # IMPORTANT: checkout BASE repo only (safe on forks)
1918 - name : Checkout base repo (safe)
2019 uses : actions/checkout@v4
2120 with :
@@ -32,16 +31,14 @@ jobs:
3231
3332 claude_args : >
3433 --dangerously-skip-permissions
35- --max-turns 30
34+ --max-turns 60
3635 --allowedTools
3736 "Bash(gh pr view:*)"
3837 "Bash(gh pr diff:*)"
3938 "Bash(gh pr comment:*)"
40- "Bash(gh pr list:*)"
41- "Bash(gh pr status:*)"
42- "Bash(gh issue comment:*)"
4339 "Bash(gh api:*)"
44- "Bash(cat:*)"
40+ "Bash(cat CLAUDE.md:*)"
41+ "Bash(cat .claude/rules/*:*)"
4542 "Bash(ls:*)"
4643 "Bash(grep:*)"
4744 "Bash(find:*)"
@@ -58,26 +55,31 @@ jobs:
5855 "Bash(python3:*)"
5956
6057 prompt : |
61- You are running in pull_request_target. DO NOT execute or inspect the fork's checked-out code.
58+ You are running in pull_request_target. DO NOT execute or inspect PR fork code.
6259 Review ONLY via GitHub API/gh commands.
6360
64- Always use numeric PR form with --repo:
65- - gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json files,title,body
66- - gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
61+ Read local guidance ONLY from:
62+ - CLAUDE.md (root) if present
63+ - .claude/rules/*.md if present
64+ Do NOT read any other workspace files.
6765
68- If CLAUDE.md exists in the base repo checkout, read it with:
69- - cat CLAUDE.md
70- Prefer jq/python3 for JSON parsing instead of shell loops.
66+ Keep tool calls minimal:
67+ 1) ls .claude/rules || true
68+ 2) If CLAUDE.md exists: cat CLAUDE.md
69+ 3) If .claude/rules exists: cat each .md file directly (no loops; at most 10 files)
70+ 4) gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json title,body,files,changedFiles,additions,deletions,headRefOid
71+ 5) gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
72+ 6) Post ONE top-level comment.
7173
72- Output requirements (even if no issues):
73- - Files changed count + list up to 15 file paths
74+ Output format:
75+ - Head SHA
76+ - Files changed count + list up to 10 file paths
7477 - Summary (3–6 bullets)
75- - Findings:
76- - If issues: include file + line numbers when possible
77- - If no issues: at least 3 concrete improvement opportunities with file paths
78+ - Findings with file + line numbers when possible
79+ - If no issues: 0–3 improvement opportunities (only if confident)
7880
7981 Post ONE top-level PR comment titled "Claude Code Review".
80- If posting a PR comment is blocked, write the full review to the GitHub Actions job summary instead .
82+ Then stop .
8183
8284 additional_permissions : |
8385 actions: read
0 commit comments