From 4c47b60473372e48e977112f463bfd5b223c3d2c Mon Sep 17 00:00:00 2001 From: Vui-Chee Date: Thu, 12 Mar 2026 12:10:57 +0800 Subject: [PATCH 1/4] report back to user once done --- .github/workflows/claude.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index c490cd0e..0edfd07e 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -48,6 +48,20 @@ jobs: id-token: write actions: read steps: + - name: Acknowledge trigger + uses: actions/github-script@v7 + with: + script: | + const isReviewComment = context.eventName === 'pull_request_review_comment'; + await github.rest.reactions.createForIssueComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: isReviewComment + ? context.payload.comment.id + : context.payload.comment.id, + content: 'eyes' + }); + - name: Checkout repository uses: actions/checkout@v6 with: @@ -70,5 +84,14 @@ jobs: uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + track_progress: true prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.issue.number }} + ${{ steps.skill.outputs.skill_content }} + + When done, post your full review summary as a PR comment using: + gh pr comment ${{ github.event.issue.number }} --body "" + claude_args: | + --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" From 168517f6ccd9607eb99860cc181a299b0867528e Mon Sep 17 00:00:00 2001 From: Vui-Chee Date: Thu, 12 Mar 2026 16:26:47 +0800 Subject: [PATCH 2/4] reorg skills --- .claude/skills/commit.md | 71 ------------------- .../skills/{review.md => pr-review/SKILL.md} | 0 .gitignore | 3 +- 3 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 .claude/skills/commit.md rename .claude/skills/{review.md => pr-review/SKILL.md} (100%) diff --git a/.claude/skills/commit.md b/.claude/skills/commit.md deleted file mode 100644 index 5c29662c..00000000 --- a/.claude/skills/commit.md +++ /dev/null @@ -1,71 +0,0 @@ -# Skill: commit - -Generate a well-formed conventional commit message for the current staged changes and create the commit. - -TRIGGER when: user asks to "commit", "create a commit", "write a commit message", or uses `/commit`. -DO NOT TRIGGER when: user is asking about git history or how commits work in general. - -## Instructions - -### 1. Review Staged Changes - -Run `git diff --staged` to see all staged changes. If nothing is staged, run `git status` and inform the user. - -### 2. Determine Commit Type - -Choose the appropriate conventional commit type based on the changes: - -| Type | When to use | -|------|-------------| -| `feat` | New feature or capability added | -| `fix` | Bug fix | -| `refactor` | Code restructuring without behavior change | -| `perf` | Performance improvement | -| `test` | Adding or updating tests | -| `docs` | Documentation only changes | -| `chore` | Build process, dependencies, tooling | -| `ci` | CI/CD configuration changes | -| `style` | Code style/formatting only (no logic change) | - -### 3. Determine Scope (optional) - -Use the crate or component name as the scope if the change is isolated: -- `feat(rpc)`: changes in `crates/rpc/` -- `fix(chainspec)`: changes in `crates/chainspec/` -- `feat(flashblocks)`: changes in `crates/flashblocks/` -- `chore(builder)`: changes in `crates/builder/` -- Omit scope for cross-cutting changes - -### 4. Write the Commit Message - -Follow this format: -``` -(): - - - - -``` - -Rules: -- Subject line: imperative mood, lowercase, no period, max 72 chars -- Body: explain motivation and context, not what the diff shows -- Breaking changes: prefix footer with `BREAKING CHANGE:` -- Reference issues: `Closes #` or `Fixes #` - -### 5. Create the Commit - -Stage the appropriate files and create the commit with the generated message. - -Example commit messages: -``` -feat(rpc): add eth_getTransactionByHash override for XLayer - -fix(chainspec): correct genesis block timestamp for mainnet - -refactor(builder): extract payload validation into separate module - -docs: update BUILDING_ON_RETH guide with database examples - -chore: bump reth dependencies to v1.4.0 -``` diff --git a/.claude/skills/review.md b/.claude/skills/pr-review/SKILL.md similarity index 100% rename from .claude/skills/review.md rename to .claude/skills/pr-review/SKILL.md diff --git a/.gitignore b/.gitignore index 8b745edb..4db1392e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /target -.claude +.claude/* !.claude/skills/ -!.claude/skills/*.md .vscode tests/data From 76e8ba9efaa13a053e5c28b8503b2f6bd05a0191 Mon Sep 17 00:00:00 2001 From: Vui-Chee Date: Thu, 12 Mar 2026 16:43:39 +0800 Subject: [PATCH 3/4] properly install skills --- .github/workflows/claude.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 0edfd07e..9b66a04e 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -67,31 +67,25 @@ jobs: with: fetch-depth: 1 - - name: Load review skill - id: skill + - name: Install project skills globally run: | - if [ -f ".claude/skills/review.md" ]; then - SKILL_CONTENT=$(cat .claude/skills/review.md) - echo "skill_content<> $GITHUB_OUTPUT - echo "$SKILL_CONTENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - else - echo "skill_content=Perform a thorough code review." >> $GITHUB_OUTPUT - fi - + mkdir -p ~/.claude/skills + cp -rfv .claude/skills/* ~/.claude/skills/ + - name: Run Claude Review id: claude uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} track_progress: true + show_full_output: true prompt: | REPO: ${{ github.repository }} - PR NUMBER: ${{ github.event.issue.number }} + PR NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} - ${{ steps.skill.outputs.skill_content }} + Use the pr-review skill to perform a code review of this PR. When done, post your full review summary as a PR comment using: - gh pr comment ${{ github.event.issue.number }} --body "" - claude_args: | - --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" + gh pr comment ${{ github.event.pull_request.number || github.event.issue.number }} --body "" + claude_args: "--allowedTools Skill,SlashCommand,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" From 47f872703885ef3ba0e00b9b5dfd91ad38b1ea20 Mon Sep 17 00:00:00 2001 From: Vui-Chee Date: Thu, 12 Mar 2026 16:46:53 +0800 Subject: [PATCH 4/4] rename --- .claude/skills/pr-review/SKILL.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.claude/skills/pr-review/SKILL.md b/.claude/skills/pr-review/SKILL.md index 51f66124..d40ea1b3 100644 --- a/.claude/skills/pr-review/SKILL.md +++ b/.claude/skills/pr-review/SKILL.md @@ -1,12 +1,9 @@ --- -name: review -description: > - Perform a thorough code review of changed files. Use when the user asks - to "review" code, requests a code review, or uses @review. Do NOT trigger - when the user only asks a question about code without requesting a review. +name: pr-review +description: Perform a code review of a pull request following team standards --- -# Skill: review +# Skill: pr-review Perform a thorough code review of changed files, checking for correctness, Rust best practices, XLayer-specific conventions, security issues, and test coverage.