Skip to content

Comments

chore(claude): rename pr skill to pull-request and fix automation gaps#3568

Merged
PierreBrisorgueil merged 4 commits intomasterfrom
chore/pull-request-skill
Feb 24, 2026
Merged

chore(claude): rename pr skill to pull-request and fix automation gaps#3568
PierreBrisorgueil merged 4 commits intomasterfrom
chore/pull-request-skill

Conversation

@PierreBrisorgueil
Copy link
Collaborator

@PierreBrisorgueil PierreBrisorgueil commented Feb 23, 2026

Summary

  • What changed: Rename .claude/skills/pr/.claude/skills/pull-request/ and fix multiple automation gaps in the monitor loop
  • Why: The pr skill was not being loaded into Claude Code's system-reminder (description too long + late addition), causing the PR workflow to be silently skipped. Several loop gaps also caused incorrect behavior when the skill was used.
  • Related issues: Closes chore(claude): rename pr skill to pull-request and fix automation gaps #3566

Scope

  • Module(s) impacted: .claude/skills/ (internal tooling only, no application code)
  • Cross-module impact: none
  • Risk level: low

Validation

  • npm run lint
  • npm test
  • Manual checks done (if applicable)

Guardrails check

  • No secrets or credentials introduced (.env*, secrets/**, keys, tokens)
  • No risky rename/move of core stack paths
  • Changes remain merge-friendly for downstream projects
  • Tests added or updated when behavior changed — n/a, no application code changed

Notes for reviewers

  • Security considerations: none
  • Mergeability considerations: safe to merge at any time, only touches .claude/ and CLAUDE.md
  • Changes: shorter skill description, push-before-reply order, CI retry fallback, post-ready preliminary review pass for ready-triggered bots (CodeRabbit etc.), thread ID source doc, safety limit clarification

Summary by CodeRabbit

  • Documentation
    • Renamed the /pr command to /pull-request across docs and prompts.
    • Reworked the PR workflow to create a pull request after verification (draft → CI → monitor loop → iterate).
    • Expanded required summary content to include risk assessment and next steps.
    • Consolidated and updated PR monitoring and feedback-handling guidance (new monitoring references and clearer loop controls).

- Rename .claude/skills/pr/ → .claude/skills/pull-request/ with shorter
  description so the skill loads reliably in system-reminder
- Fix monitor loop: push before reply/resolve, CI retry fallback, thread ID source
- Add preliminary review pass after gh pr ready (CodeRabbit and ready-triggered bots)
- Add 10-iteration safety limit clarification (preliminary pass not counted)
- Add guardrail in CLAUDE.md to always invoke /pull-request when shipping work
- Update feature/SKILL.md to reference /pull-request

Closes #3566
@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

Renames the /pr skill to /pull-request, removes legacy PR docs, and adds a new pull-request skill plus monitoring references. Updates prompts, README/CLAUDE/AGENTS listings, and changes the feature skill to invoke /pull-request after verification; expands summary fields with risks and next steps.

Changes

Cohort / File(s) Summary
Feature Skill
​.claude/skills/feature/SKILL.md
Step 6 changed to invoke /pull-request after verify; step 7 (summary) extended with risks and next steps.
Removed PR Skill
​.claude/skills/pr/SKILL.md, ​.claude/skills/pr/references/monitoring.md, ​.github/prompts/pr.prompt.md
Deleted legacy PR skill documentation, monitoring reference, and old prompt file.
New Pull-Request Skill
​.claude/skills/pull-request/SKILL.md, ​.claude/skills/pull-request/references/monitoring.md, ​.github/prompts/pull-request.prompt.md
Added full pull-request playbook with autonomous monitor loop (CI polling, feedback classification, batched fixes, verification, push-before-reply ordering, stop conditions) and gh CLI monitoring snippets; new prompt references these docs.
Docs & Prompts
CLAUDE.md, README.md, AGENTS.md, .github/copilot-instructions.md
Replaced /pr with /pull-request in listings and updated prompt file paths and references.

Sequence Diagram(s)

sequenceDiagram
participant Agent as Agent (skill)
participant Repo as Repository
participant GitHub as GitHub (PR)
participant CI as CI System

Agent->>Repo: create branch & commit (draft)
Agent->>GitHub: open PR (draft)
GitHub->>CI: trigger CI run
CI-->>Agent: report CI status (pending → success/failure)
alt CI success
    Agent->>GitHub: fetch review threads/comments
    Agent->>Agent: classify feedback (actionable vs informational)
    alt actionable found
        Agent->>Repo: apply batched fixes & push
        Agent->>GitHub: reply to threads (post-push)
        GitHub->>CI: retrigger CI
    end
else CI failing
    Agent->>Agent: retry/wait per loop rules (retries, grace periods)
end
opt stop conditions
    Agent->>GitHub: mark PR ready/complete or stop after iteration cap
end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #3566 — Renaming the PR skill and fixing automation gaps (ready-trigger handling, CI fallback, thread ID, push-before-reply) aligns with the changes here.
  • pierreb-devkit/Node#3159 — Similar objective of renaming /pr/pull-request and updating monitoring/automation behavior.

Possibly related PRs

  • pierreb-devkit/Vue#3559 — Replaces/renames the /pr skill with /pull-request and reorganizes PR lifecycle docs (strong overlap).
  • pierreb-devkit/Vue#3562 — Updates PR monitoring workflow documentation and references (closely related).

Suggested labels

chore

Poem

🐰 I hopped a branch and opened a PR bright,
CI hummed softly from day into night.
Drafts then reviews, I patched with a cheer,
Pushed then replied — the loop drew near.
Hooray — /pull-request leads the flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main changes: renaming the pr skill to pull-request and fixing automation gaps in the monitor loop.
Description check ✅ Passed The PR description follows the template with all required sections completed: Summary, Scope, Validation, Guardrails check, and Notes for reviewers are all present and properly filled.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #3566: renames pr skill to pull-request, shortens description for Claude Code loading, and fixes monitor-loop gaps including CI retry fallback, push-before-reply ordering, thread ID resolution, and preliminary review pass for ready-triggered bots.
Out of Scope Changes check ✅ Passed All changes are in-scope: skill renaming, documentation updates, prompt references, and monitor-loop improvements directly address issue #3566 requirements with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/pull-request-skill

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

@PierreBrisorgueil PierreBrisorgueil marked this pull request as ready for review February 23, 2026 19:00
Copilot AI review requested due to automatic review settings February 23, 2026 19:00
Copy link

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 renames the PR skill from /pr to /pull-request and fixes multiple automation gaps in the PR monitoring loop workflow. The rename addresses an issue where the skill wasn't being loaded into Claude Code's system reminder due to an excessively long description. The automation fixes improve the reliability and correctness of the autonomous PR monitoring workflow.

Changes:

  • Renamed skill directory from .claude/skills/pr/ to .claude/skills/pull-request/ with shortened description
  • Added critical automation fixes: push-before-reply order, CI retry fallback with 5 attempts, preliminary review pass after gh pr ready, unresolved-threads-only tracking, and clarified safety limits
  • Updated references in CLAUDE.md and feature skill to use /pull-request

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CLAUDE.md Updated skill reference from /pr to /pull-request and added reminder to always use the skill when shipping work
.claude/skills/pull-request/SKILL.md New location for renamed skill with automation gap fixes: push-before-reply ordering, CI retry logic, preliminary review pass, unresolved threads tracking, and monitor loop clarifications
.claude/skills/pull-request/references/monitoring.md New location for monitoring reference with enhanced documentation of unresolved threads query as source of truth and branch protection status checks
.claude/skills/pr/SKILL.md Deleted (moved to pull-request/)
.claude/skills/pr/references/monitoring.md Deleted (moved to pull-request/)
.claude/skills/feature/SKILL.md Updated to invoke /pull-request after verify passes

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/pull-request/references/monitoring.md:
- Around line 57-59: The jq expression used in the command incorrectly
references the JSON field as line (a bare identifier) instead of .line; update
the jq mapping in the gh api pipeline (the jq 'map({id, user: .user.login, body:
.body[0:100], line})' fragment) to use .line so it extracts the JSON field
properly (i.e., replace line with .line).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7555492 and 56fab55.

📒 Files selected for processing (7)
  • .claude/skills/pull-request/SKILL.md
  • .claude/skills/pull-request/references/monitoring.md
  • .github/copilot-instructions.md
  • .github/prompts/pr.prompt.md
  • .github/prompts/pull-request.prompt.md
  • AGENTS.md
  • README.md
💤 Files with no reviewable changes (1)
  • .github/prompts/pr.prompt.md
✅ Files skipped from review due to trivial changes (1)
  • .github/prompts/pull-request.prompt.md

Copilot AI review requested due to automatic review settings February 23, 2026 19:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.claude/skills/pull-request/SKILL.md (1)

231-232: Optional: vary repeated sentence starts.

Both sentences begin with “After”; consider combining or rephrasing for readability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/SKILL.md around lines 231 - 232, Combine the two
consecutive sentences that both start with "After" into a single, clearer
sentence to avoid repetition; e.g., rephrase to cover both cases (regular push
and force-push) and vary the sentence start. Locate the two sentences ("After a
regular push, wait 30s before watching CI..." and "After a force-push
(post-rebase), wait 30s before watching...") in the SKILL.md text and replace
them with one sentence that mentions both scenarios and the 30s wait, or reword
one to start differently (e.g., "When you regular-push or force-push
(post-rebase), wait 30s before watching CI because new runs take time to
register and old runs are cancelled.").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.claude/skills/pull-request/SKILL.md:
- Around line 231-232: Combine the two consecutive sentences that both start
with "After" into a single, clearer sentence to avoid repetition; e.g., rephrase
to cover both cases (regular push and force-push) and vary the sentence start.
Locate the two sentences ("After a regular push, wait 30s before watching CI..."
and "After a force-push (post-rebase), wait 30s before watching...") in the
SKILL.md text and replace them with one sentence that mentions both scenarios
and the 30s wait, or reword one to start differently (e.g., "When you
regular-push or force-push (post-rebase), wait 30s before watching CI because
new runs take time to register and old runs are cancelled.").

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56fab55 and 348c7a3.

📒 Files selected for processing (2)
  • .claude/skills/pull-request/SKILL.md
  • .claude/skills/pull-request/references/monitoring.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .claude/skills/pull-request/references/monitoring.md

Copy link

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.claude/skills/pull-request/references/monitoring.md (1)

20-25: Prefer JSON output to avoid brittle string parsing.

Relying on "no checks reported" is fragile (output/localization changes). Use --json/--jq to detect zero checks more robustly.

♻️ Suggested update
-  if output=$(gh pr checks "$PR" 2>&1); then
-    if echo "$output" | grep -q "no checks reported"; then
-      sleep 30  # checks not started yet
-    else
-      echo "$output" && CHECKS_FOUND=1 && break  # checks detected
-    fi
+  if checks_count=$(gh pr checks "$PR" --json name --jq 'length' 2>/dev/null); then
+    if [ "$checks_count" -eq 0 ]; then
+      sleep 30  # checks not started yet
+    else
+      gh pr checks "$PR" && CHECKS_FOUND=1 && break  # checks detected
+    fi
   else
     echo "$output" >&2 && sleep 30  # gh command failed, retry
   fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/pull-request/references/monitoring.md around lines 20 - 25,
The script currently parses gh pr checks "$PR" text output and looks for the
literal "no checks reported", which is brittle; instead call gh pr checks "$PR"
with --json (e.g., --json checkSuites or --json nodes) and use jq or gh --jq to
inspect the returned array length, set CHECKS_FOUND when the array length is >0,
and treat length==0 as "no checks yet" (sleep and retry); update the invocation
replacing the plain capture of output and the grep check with the JSON call and
a jq/--jq-based condition that robustly detects zero checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.claude/skills/pull-request/references/monitoring.md:
- Around line 20-25: The script currently parses gh pr checks "$PR" text output
and looks for the literal "no checks reported", which is brittle; instead call
gh pr checks "$PR" with --json (e.g., --json checkSuites or --json nodes) and
use jq or gh --jq to inspect the returned array length, set CHECKS_FOUND when
the array length is >0, and treat length==0 as "no checks yet" (sleep and
retry); update the invocation replacing the plain capture of output and the grep
check with the JSON call and a jq/--jq-based condition that robustly detects
zero checks.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 348c7a3 and 437fdee.

📒 Files selected for processing (1)
  • .claude/skills/pull-request/references/monitoring.md

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.93%. Comparing base (da7fc2b) to head (437fdee).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3568   +/-   ##
=======================================
  Coverage   95.93%   95.93%           
=======================================
  Files          20       20           
  Lines         516      516           
  Branches      140      140           
=======================================
  Hits          495      495           
  Misses         21       21           

☔ 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.

@PierreBrisorgueil PierreBrisorgueil merged commit a671a71 into master Feb 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(claude): rename pr skill to pull-request and fix automation gaps

1 participant