Skip to content

add claude pr review skills - #4946

Closed
pascal-roth wants to merge 6 commits into
isaac-sim:developfrom
pascal-roth:dev/claude-pr-review
Closed

add claude pr review skills#4946
pascal-roth wants to merge 6 commits into
isaac-sim:developfrom
pascal-roth:dev/claude-pr-review

Conversation

@pascal-roth

@pascal-roth pascal-roth commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Description

# Single issue
claude "Run the issue triage workflow for issue #1234"

# All open bugs
claude "Run the issue triage workflow for all open bug issues"

Update 19.05:

  • new skill that can respond to commits
  ┌─────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐                                  
  │    Comment type     │                                                                         Action                                                                          │
  ├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤                                  
  │ Question            │ Posts a direct reply to the reviewer's comment                                                                                                          │
  ├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Improvement request │ Implements the change in-place, runs pre-commit, commits, pushes, replies with the commit hash                                                          │                                  
  ├─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤                                  
  │ New issue report    │ Searches recent merged/open PRs for an existing fix — if found, comments pointing to that PR; if not found, implements the fix in the current PR branch │                                  
  └─────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘  

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@ooctipus

Copy link
Copy Markdown
Collaborator

@xteo

Maybe review this as well, how it could be integrated or potential merge conflict?

- Unstage .agent/ files before committing so skill files never land
  in a fix commit
- Replace hardcoded --base develop with <BASE_BRANCH> placeholder and
  add instruction to target the same branch checked out in Step 1
Comment thread .agent/skills/isaaclab-bug-fix/SKILL.md
@pascal-roth
pascal-roth marked this pull request as ready for review March 19, 2026 17:27
@greptile-apps

greptile-apps Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a suite of five Claude agent skills (.agent/skills/) for automating common maintainer workflows in isaac-sim/IsaacLab — issue triage, bug reproduction, bug fixing, PR review response, and merge conflict resolution — and extends AGENTS.md with documentation describing how to trigger each workflow. The skills integrate cleanly with the existing AGENTS.md coding/commit standards (no AI attribution, --force-with-lease, git reset HEAD -- .agent/ before commits), and the overall architecture is well-designed.

Key findings from the review:

  • Unconditional git stash pop in isaaclab-bug-reproduce/SKILL.md (Step 7): when the working tree is already clean, git stash creates no entry, so the subsequent git stash pop will either error out or, worse, pop an unrelated pre-existing stash entry — potentially corrupting local state. The pop should be conditional on whether a stash was actually created.
  • Sandbox override not referenced in network-operation steps: AGENTS.md mandates using dangerouslyDisableSandbox: true for any git push / gh pr create call, but none of the skill files mention this inline. Agents that read only a single skill file will not know to apply the flag, causing network operations to silently fail. Affected steps are in isaaclab-bug-fix/SKILL.md, isaaclab-pr-respond/SKILL.md, and isaaclab-pr-resolve-conflicts/SKILL.md.
  • Heredoc indentation in isaaclab-pr-respond/SKILL.md (Step 4B): the commit message template uses <<'EOF' with indented body lines, so leading spaces would be included literally in the commit subject, producing a malformed message. The other skills' commit templates are correctly unindented.

Confidence Score: 4/5

  • Safe to merge after addressing the unconditional git stash pop bug and adding sandbox-override reminders to network operation steps.
  • The skills are documentation/workflow files with no impact on IsaacLab's runtime code or CI. The unconditional git stash pop is a real logic bug that could corrupt local state during automated runs, warranting attention before merge. The sandbox and heredoc issues are lower severity but easy to fix. The overall design, decision trees, and integration with AGENTS.md are solid.
  • .agent/skills/isaaclab-bug-reproduce/SKILL.md (unconditional stash pop), .agent/skills/isaaclab-bug-fix/SKILL.md, .agent/skills/isaaclab-pr-respond/SKILL.md, and .agent/skills/isaaclab-pr-resolve-conflicts/SKILL.md (missing sandbox override notes)

Important Files Changed

Filename Overview
.agent/skills/isaaclab-bug-reproduce/SKILL.md New skill file for bug reproduction; contains an unconditional git stash pop in Step 7 that can fail or corrupt local state when the working tree was clean at the time of git stash.
.agent/skills/isaaclab-pr-respond/SKILL.md New skill for responding to PR review comments; covers question/improvement/new-issue types well, but the commit message heredoc template (Step 4B) has unstripped leading indentation that would produce a malformed subject line.
.agent/skills/isaaclab-bug-fix/SKILL.md New skill for implementing bug fixes; well-structured with proper branch naming, pre-commit enforcement, and no-AI-attribution rules, but network operations (git push, gh pr create) don't reference the dangerouslyDisableSandbox requirement from AGENTS.md.
.agent/skills/isaaclab-pr-resolve-conflicts/SKILL.md New skill for resolving PR merge conflicts; solid workflow with rebase-first strategy, --force-with-lease guard, and main/develop protection — sandbox override for git push is not mentioned inline.
.agent/skills/isaaclab-issue-triage/SKILL.md New skill for triaging GitHub issues; well-defined decision tree with clear routing to reproduce/fix workflows and appropriate comment templates.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([GitHub Issue Filed]) --> B[isaaclab-issue-triage]
    B --> C{Valid bug report?}
    C -->|Not a bug| D[Skip]
    C -->|Missing steps| E[Comment requesting steps → STOP]
    C -->|Valid| F[isaaclab-bug-reproduce]

    F --> G{Reproduces at reported commit?}
    G -->|No| H[Comment: cannot reproduce → STOP]
    G -->|Yes| I{Still broken on latest develop?}
    I -->|No| J[Comment: fixed on latest, close issue → STOP]
    I -->|Yes| K[isaaclab-bug-fix]

    K --> L[Branch isaaclab-bot/fix-issue-N]
    L --> M[Implement fix]
    M --> N[Write regression test]
    N --> O[Update changelog & version]
    O --> P[Run pre-commit]
    P --> Q[Commit & push]
    Q --> R[Open PR, comment on issue]

    S([PR has reviewer comments]) --> T[isaaclab-pr-respond]
    T --> U{Comment type?}
    U -->|Question| V[Post direct reply]
    U -->|Improvement| W[Implement → pre-commit → commit → push → reply with hash]
    U -->|New issue| X{Prior fix in recent PRs?}
    X -->|Found| Y[Comment pointing to other PR → STOP]
    X -->|Not found - in scope| W
    X -->|Not found - out of scope| K

    Z([PR has merge conflicts]) --> AA[isaaclab-pr-resolve-conflicts]
    AA --> AB{Already mergeable?}
    AB -->|Yes| AC[Report & stop]
    AB -->|No| AD[Rebase onto target]
    AD --> AE[Resolve conflicts]
    AE --> AF[pre-commit + tests]
    AF --> AG[force-push with --force-with-lease]
    AG --> AH[Comment on PR]
Loading

Last reviewed commit: "add merge conflict r..."

Comment on lines +166 to +170

```bash
git checkout develop # return to develop
git stash pop # restore any stashed changes (if applicable)
rm -rf "$AGENT_TMPDIR" # remove temp copy of workflow files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Unconditional git stash pop may fail or corrupt state

git stash in Step 1 outputs "No local changes to save" and creates no stash entry when the working tree is clean. The corresponding git stash pop in Step 7 will then either:

  • Error out with "No stash entries found.", or worse,
  • Pop a pre-existing, unrelated stash entry that was on the stack before the skill ran — silently restoring files that were not stashed by this workflow.

The fix is to save the stash result and only pop conditionally:

Suggested change
```bash
git checkout develop # return to develop
git stash pop # restore any stashed changes (if applicable)
rm -rf "$AGENT_TMPDIR" # remove temp copy of workflow files
git stash list --format='%gd' | grep -q '^stash@{0}' && STASH_CREATED=false || STASH_CREATED=false
git stash && STASH_CREATED=true || STASH_CREATED=false
git checkout <COMMIT_HASH>

Then in Step 7:

git checkout develop  # return to develop
[ "$STASH_CREATED" = true ] && git stash pop  # only pop if we actually stashed
rm -rf "$AGENT_TMPDIR"

Or more simply, capture the output:

STASH_OUTPUT=$(git stash)
# ...later...
echo "$STASH_OUTPUT" | grep -q "No local changes" || git stash pop

Comment on lines +93 to +100
git reset HEAD -- .agent/
git commit -m "$(cat <<'EOF'
<Short imperative description of the improvement>

Address reviewer feedback: <one-line summary of what was requested>.
EOF
)"
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Heredoc indentation produces leading spaces in commit subject

The heredoc template uses <<'EOF' (not <<-'EOF'), so the indentation of lines inside it is preserved literally in the commit message. When an agent renders this template, the subject line and body will start with leading spaces, producing a malformed commit message.

Compare with the correctly-unindented heredocs in isaaclab-bug-fix/SKILL.md (Step 6) and isaaclab-pr-resolve-conflicts/SKILL.md (Step 4b), which do not indent the heredoc content.

Suggested change
git reset HEAD -- .agent/
git commit -m "$(cat <<'EOF'
<Short imperative description of the improvement>
Address reviewer feedback: <one-line summary of what was requested>.
EOF
)"
```
git commit -m "$(cat <<'EOF'
<Short imperative description of the improvement>
Address reviewer feedback: <one-line summary of what was requested>.
EOF
)"

Comment on lines +107 to +109
```bash
git push -u origin HEAD
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Sandbox override not referenced for network operations

AGENTS.md (line 269) states: "Network access (e.g., git push) is blocked by the sandbox. Use dangerouslyDisableSandbox: true so the user gets an approval prompt."

This step issues git push -u origin HEAD without any mention of the sandbox override. An agent reading only this skill file — without having read AGENTS.md first — will not know to apply the flag and the push will silently fail.

The same gap exists in:

  • .agent/skills/isaaclab-pr-respond/SKILL.md at line 268 (git push origin <HEAD_REF_NAME>) and line 220 (git push -u origin HEAD)
  • .agent/skills/isaaclab-pr-resolve-conflicts/SKILL.md at line 165 (git push --force-with-lease origin <HEAD_REF_NAME>)

Consider adding a note to each git push / gh pr create step, e.g.:

# Network access requires sandbox override — use dangerouslyDisableSandbox: true
git push -u origin HEAD

Search open and recently merged PRs by issue number and keywords
before creating a branch. Comment on the issue and stop if an
existing PR already addresses it, avoiding duplicate work.

Update SKILLS.md overview diagram and skill description to reflect
the new Step 0.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment on lines +24 to +40
# Search open PRs by issue number and keywords from the issue title
gh pr list --repo isaac-sim/IsaacLab --state open --limit 50 \
--json number,title,body,headRefName \
| jq '.[] | select(.body | test("#<NUMBER>"; "i"))'

gh search prs --repo isaac-sim/IsaacLab --state open \
"<keyword1> <keyword2>" --limit 20 \
--json number,title,body,headRefName

# Search recently merged PRs (last 60 days)
gh pr list --repo isaac-sim/IsaacLab --state merged --limit 100 \
--json number,title,body,mergedAt \
| jq '.[] | select(.body | test("#<NUMBER>"; "i"))'

gh search prs --repo isaac-sim/IsaacLab --state merged \
"<keyword1> <keyword2>" --limit 20 \
--json number,title,body,mergedAt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This forces users to have the github cli. The agent will find a work around, but maybe we could be explicit about it?

Comment on lines +53 to +62
Existing PR found?
├─ YES — open PR already addresses this issue
│ └─ Comment on the issue pointing to the open PR, then STOP:
│ gh issue comment <NUMBER> --repo isaac-sim/IsaacLab \
│ --body "This appears to be addressed in PR #<OTHER> (_<title>_). Tracking there."
├─ YES — merged PR already contains the fix
│ └─ Comment on the issue that the fix is already on develop, then STOP:
│ gh issue comment <NUMBER> --repo isaac-sim/IsaacLab \
│ --body "This was fixed in PR #<OTHER> (merged <DATE>). The fix is available on \`develop\`."
└─ NO — no existing PR → proceed to Step 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should the agent still check if he can repro the issue? on the branch / develop. Sometimes, the fix is not complete

EOF
)"
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would add another step here. By running:

For self review of the code.

Doing two rounds with clear context could be good.

Comment thread .agent/skills/isaaclab-bug-reproduce/SKILL.md
@pascal-roth

pascal-roth commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator Author
  • need self-review cycle to clear the context and ensure that all the flaws are fixed -- should run the IsaacLab Review Bot
  • should use superpowers for review and for writing plans if a complex bug was discovered
  • only add tests for bugs coming from our code stack - otherwise create an additional comment that tests are necessary from a different team
  • triage skill should look at every issue, decide if the label is correct, otherwise change it (what are the labels: feature request, bug, questions)
  • for questions:
    • if it can be sufficiently answered, do it yourself
    • otherwise propose an answer and wait for approval (is that possible?) - draft can be sent to senior folks or Pablo
  • trigger the skill executing over github

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IsaacLab Bot Review — PR #4946

This PR adds a solid set of Claude agent skills for automating maintainer workflows (issue triage → bug reproduction → bug fix → PR review response → merge conflict resolution). The skill chaining design is well thought out and the decision trees are clear.

Summary

What works well:

  • Clean separation of concerns — each skill is self-contained with clear inputs, decision trees, and exit conditions
  • The .agent/SKILLS.md overview with the ASCII decision-tree flowcharts is excellent for discoverability
  • Commit message and changelog conventions are properly enforced in each skill
  • The _isaac_sim symlink guidance for tracing into Isaac Sim internals is a nice touch
  • git reset HEAD -- .agent/ guard in every commit step prevents accidental inclusion of skill files

Key issues to address (details in inline comments):

  1. git stash race condition in isaaclab-bug-reproduce — the unconditional git stash pop in Step 7 can pop an unrelated stash or error out if no stash was created. greptile flagged this too. Needs conditional pop.

  2. Sandbox/network note missing from push stepsAGENTS.md line 269 says network access requires dangerouslyDisableSandbox: true, but none of the git push / gh pr create steps in the skills reference this. An agent reading only a skill file will hit silent push failures.

  3. Self-review step missing from isaaclab-bug-fix@AntoineRichard and the PR author both noted the need for a self-review cycle (e.g., superpower:request-code-review or the Anthropic PR review toolkit plugin) before pushing. This would catch flaws before human reviewers spend time.

  4. Post-fix verification missing from isaaclab-bug-fix — Step 3 says "write a regression test" but the skill doesn't explicitly re-run the original reproduction steps after the fix to confirm the bug is actually resolved end-to-end. The "Important Notes" mention runtime verification but it's not a numbered step in the workflow.

  5. gh CLI dependency not declared — All skills assume gh is installed and authenticated, but this isn't listed as a prerequisite except in isaaclab-issue-triage. Should be in SKILLS.md or each skill's prerequisites.

  6. Heredoc indentation in isaaclab-pr-respond — The commit message heredoc at line ~147 uses <<'EOF' with indented content, which will produce leading spaces in the commit subject. Compare with the correctly unindented heredocs in isaaclab-bug-fix Step 6.

Minor suggestions

  • The isaaclab-bug-reproduce skill copies AGENTS.md, CLAUDE.md, and .agent/ to a temp dir before checkout — consider also preserving .claude/ if it exists, for completeness
  • isaaclab-pr-resolve-conflicts Step 4 could benefit from a note about handling submodule conflicts (e.g., _isaac_sim symlink changes)
  • Consider adding a --dry-run or --no-push mode hint so maintainers can preview what the agent would do without actually pushing

# Restore workflow files (same as above)
cp -r "$AGENT_TMPDIR/.agent" .agent 2>/dev/null || true
cp "$AGENT_TMPDIR/AGENTS.md" AGENTS.md 2>/dev/null || true
cp "$AGENT_TMPDIR/CLAUDE.md" CLAUDE.md 2>/dev/null || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The unconditional git stash pop in Step 7 is a footgun — if the working tree was clean when git stash ran, no stash entry was created, and git stash pop will either error or pop an unrelated stash.

Simple fix:

STASH_OUT=$(git stash 2>&1)
# ... later in Step 7 ...
echo "$STASH_OUT" | grep -q 'No local changes' || git stash pop

greptile flagged the same thing.


## Type of change

- Bug fix (non-breaking change which fixes an issue)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This git push (and the gh pr create below it) will silently fail in a sandboxed Claude environment. Per AGENTS.md line 269: "Network access is blocked by the sandbox. Use dangerouslyDisableSandbox: true."

Suggest adding a note here and at every other git push / gh pr create across all skills:

# NOTE: Requires dangerouslyDisableSandbox: true for network access
git push -u origin HEAD

Same applies to:

  • isaaclab-pr-respond/SKILL.md lines 220, 268
  • isaaclab-pr-resolve-conflicts/SKILL.md line 165


```bash
git add -A
git reset HEAD -- .agent/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The workflow goes straight from "write regression test" to "update changelog" without an explicit step to re-run the original reproduction steps and confirm the bug is actually fixed end-to-end.

The "Important Notes" section mentions runtime verification, but it should be a first-class workflow step between Step 3 and Step 4:

### Step 3b: Verify the fix

Re-run the original reproduction steps from the issue to confirm the bug no longer occurs:

```bash
./isaaclab.sh -p <original_repro_command>

Also run a short smoke test of the affected workflow (e.g., num_steps=10) to catch regressions beyond the specific bug.

├─ YES — confirmed overlap → Go to Step C-3 (comment pointing to other PR)
└─ NO — no relevant prior PR → Go to Step C-4 (implement fix in current PR)
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This heredoc uses <<'EOF' with indented content — the leading spaces will appear literally in the commit message subject line:

   <Short imperative description of the improvement>

Either unindent the heredoc body (like isaaclab-bug-fix Step 6 does) or use <<-'EOF' with tab indentation.

Comment thread .agent/SKILLS.md
@@ -0,0 +1,112 @@
# IsaacLab Agent Skills Overview

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good index file. Consider adding a Prerequisites section at the top listing shared requirements:

  • gh CLI installed and authenticated (gh auth status)
  • Git repo cloned with origin remote pointing to isaac-sim/IsaacLab
  • dangerouslyDisableSandbox: true for any skill that pushes or creates PRs

Right now only isaaclab-issue-triage lists prerequisites — having them centralized avoids repetition and ensures agents always check.

Determine the base branch: use the branch that was checked out in Step 1 (e.g. `develop`, `main`). The PR must target the same upstream branch the fix branch was created from.

Create PR using the project template:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to @AntoineRichard's suggestion about adding a self-review step. After pre-commit but before committing, the agent should review its own changes with fresh context. This could be:

  1. A superpower:request-code-review call
  2. The Anthropic PR review toolkit plugin
  3. Or simply a structured self-review prompt: "Review this diff for correctness, edge cases, and style violations before committing."

Two rounds of review (implement → review → fix → commit) would catch a lot of issues before human reviewers see the PR.

@AntoineRichard

Copy link
Copy Markdown
Collaborator

@pascal-roth I see claude superpowers have a "/systematic-debugging" I'm wondering if that could be used as a base for bugfix?

@hujc7

hujc7 commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

From my experience, I am managing skills like claude memory such that it's single skill with refs to actual action/subskill file, in which way agent has more context of what's available and can selectively load if needed. e.g. /isaaclab pr review, /isaaclab issue xxx. The skill.md file remains a content table to just hold a bunch of links, plus some minimal description.

The drawback is that it does not auto complete to exact skill name, but the agent can figure out the action needed based on the instruction provided.

@AntoineRichard

AntoineRichard commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Hi @pascal-roth — thanks for putting this one up! 🙏

We're doing a cleanup pass over the Isaac Lab PR backlog, which had grown past 400 open pull requests, and we're closing out the ones that have gone quiet so the queue is reviewable again.

Why this PR is being closed: Here is exactly what we found on this PR when we reviewed the backlog:

Opened 2026-03-11 (about 6 months ago)
Last commit on the branch 2026-04-08
Last activity from the author about 5 months ago
Target branch develop
Review status Changes were requested (AntoineRichard, ooctipus), but the follow-up never landed
Merge status Unknown
Size 6 commit(s), 7 file(s) changed, +1232 / -0

It was picked up by the sweep because it has been open for about 6 months. It was then put in the "close" bucket because the author has been silent for about 5 months — which is the signal we used to tell apart pull requests that are still being worked on from ones that have genuinely been set aside.

We deliberately did not close pull requests that were approved and ready to land, or that were small and clearly still fixing a live bug — there were 27 of those, and we are merging them rather than closing them.

No judgement on the change itself — this is purely backlog hygiene.

If this is still wanted, please reopen it or re-submit against develop. 💚


🤖 This comment was drafted with AI assistance as part of a maintainer-led sweep of the Isaac Lab pull request backlog. A maintainer is behind this cleanup — but if this closure looks wrong, it may well be, so please push back and we'll take another look.

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.

4 participants