Skip to content

docs(skills): add create-pr lifecycle rule - #1084

Merged
ryoppippi merged 8 commits into
mainfrom
codex/add-create-pr-skill-coderabbit-loop
May 19, 2026
Merged

docs(skills): add create-pr lifecycle rule#1084
ryoppippi merged 8 commits into
mainfrom
codex/add-create-pr-skill-coderabbit-loop

Conversation

@ryoppippi

@ryoppippi ryoppippi commented May 19, 2026

Copy link
Copy Markdown
Member

Adds a repo-local `create-pr` skill as the single PR lifecycle rule for this repository. The skill covers branch setup, atomic commits, PR creation, AI review requests, review-thread replies, CI handling, and completion criteria, with each step split into focused references.

It requires CodeRabbit mentions for review and thread replies, and documents `@cubic-dev-ai` as the Cubic reviewer handle when Cubic is available. A follow-up formatter commit updates native package manifests so the repository pre-push `oxfmt --check` hook passes.

Testing:

  • `direnv exec . oxfmt --check CLAUDE.md .agents/skills/create-pr/SKILL.md .agents/skills/create-pr/references/*.md`
  • `direnv exec . oxfmt --check .`
  • pre-commit hooks: typos, gitleaks, oxfmt
  • pre-push hooks: typos, oxfmt, gitleaks

Summary by cubic

Adds a repo-local create-pr skill as the single PR lifecycle rule and routes all PR work to it in CLAUDE.md. Merges the prior pr-ai-review-workflow into create-pr, moves the review command reference under it, and removes the old skill.

  • New Features

    • Added .agents/skills/create-pr/SKILL.md with focused references: branch-and-commit, open-pr, ai-review, ci, completion, gh-review-commands.
    • Requires explicit bot mentions in PR comments: @coderabbitai; add @cubic-dev-ai when available.
    • Clarified gh pr create usage: match active shell; pass bodies via stdin; for fish, pipe printf into --body-file -; avoid literal \n in --body.
  • Refactors

    • Updated .agents/skills/fix-ci/SKILL.md and .agents/skills/ccusage-development/SKILL.md to reference create-pr and use “revertible”.
    • gh-review-commands examples now mention the reviewer bot in replies and top-level comments.

Written for commit b55da7d. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Documentation

    • Added a comprehensive "create-pr" PR workflow: branch/commit conventions, drafting/opening PRs, requesting and handling AI/code-review feedback, CI monitoring and fix guidance, and strict PR completion/readiness criteria.
  • Chores

    • Registered the new "create-pr" automation in repository routing and replaced the prior PR-review workflow entry.

Review Change Stack

ryoppippi added 2 commits May 19, 2026 23:01
Add a repo-local create-pr skill so PR workflow policy lives with the repository instead of relying on a global skill copy.

The skill now owns the full PR lifecycle: branch setup, atomic commits, PR creation, AI review requests, review-thread replies, CI polling, and completion criteria.

Split the operational details into focused references for branch and commit setup, PR opening, AI reviewer handling, CI handling, and final readiness. The AI review reference requires CodeRabbit mentions and documents the verified Cubic handle @cubic-dev-ai when Cubic is available.
Apply the repository formatter to native package manifests so the pre-push oxfmt check passes.

This moves the existing commonjs type field to the formatter-preferred position without changing package behavior.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

@ryoppippi Sure, I'll review the changes in this PR!

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 846c1236-25d0-49b8-aeb0-9dd1903c452a

📥 Commits

Reviewing files that changed from the base of the PR and between 7ea4372 and b55da7d.

📒 Files selected for processing (7)
  • .agents/skills/ccusage-development/SKILL.md
  • .agents/skills/create-pr/SKILL.md
  • .agents/skills/create-pr/references/ai-review.md
  • .agents/skills/create-pr/references/gh-review-commands.md
  • .agents/skills/fix-ci/SKILL.md
  • .agents/skills/pr-ai-review-workflow/SKILL.md
  • CLAUDE.md
💤 Files with no reviewable changes (1)
  • .agents/skills/pr-ai-review-workflow/SKILL.md
✅ Files skipped from review due to trivial changes (3)
  • .agents/skills/ccusage-development/SKILL.md
  • .agents/skills/create-pr/references/gh-review-commands.md
  • .agents/skills/create-pr/references/ai-review.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CLAUDE.md

📝 Walkthrough

Walkthrough

Adds a new create-pr agent skill and multiple reference guides covering branch/commit prep, opening PRs, AI review handling, CI diagnostics/fixes, completion gating, and updates skill routing in CLAUDE.md.

Changes

create-pr Skill Documentation

Layer / File(s) Summary
Skill definition and routing
.agents/skills/create-pr/SKILL.md, CLAUDE.md, .agents/skills/ccusage-development/SKILL.md
Main create-pr skill defines end-to-end PR phases and repository conventions (permissions, English requirement, shell/tool guidance, commit atomicity via commit, reviewer bot mentions, and completion gating). CLAUDE.md and ccusage-development SKILL updated to reference create-pr instead of pr-ai-review-workflow.
Branch and commit preparation
.agents/skills/create-pr/references/branch-and-commit.md
Guidance for creating codex/<description> branches, continuing work on existing branches, pre-commit checks, and preparing Conventional Commits via the commit skill.
PR opening workflow
.agents/skills/create-pr/references/open-pr.md
Instructions for pushing branches, drafting PR bodies by complexity, using gh pr create with multi-line bodies (shell/fish examples), and opening the PR in a browser.
AI review handling
.agents/skills/create-pr/references/ai-review.md, .agents/skills/create-pr/references/gh-review-commands.md
Standardized process for requesting CodeRabbit and Cubic reviews via PR comments, polling PR comments/reviews/GraphQL reviewThreads, classifying feedback, applying minimal fixes, committing with commit, replying to inline and top-level threads, and updated gh examples that include @coderabbitai mentions.
CI monitoring and fixing
.agents/skills/create-pr/references/ci.md, .agents/skills/fix-ci/SKILL.md
How to poll PR check status with gh, inspect failed logs/discussions, use fix-ci to remediate CI failures, re-poll checks, commit CI fixes via the commit skill, request follow-up review with create-pr, and avoid marking PR ready while required checks are queued/cancelled/failing/missing.
Completion readiness criteria
.agents/skills/create-pr/references/completion.md
Completion checklist: PR exists on pushed branch, accurate description/validation, CodeRabbit (and optionally Cubic) reviewed latest commit, no unresolved actionable bot feedback, all required CI checks passing, correct bot mentions in replies, and notify user of PR URL and any residual/pending state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ryoppippi/ccusage#1034: Overlaps on enforcing English in repository-facing PR/review text and bot-directed comments integrated into skill docs.
  • ryoppippi/ccusage#1027: Related updates touching the same skill docs and workflow routing adjustments.
  • ryoppippi/ccusage#1003: Earlier PR that introduced the pr-ai-review-workflow docs now removed/migrated by this change.

Poem

🐰 I hop from branch to PR with care and delight,
I ask CodeRabbit to check through day and night.
CI hums, I fix, I push, then I cheer —
Bots quiet, checks green, the merge is near.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a new create-pr skill as a lifecycle rule for PR workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-create-pr-skill-coderabbit-loop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 19, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide b55da7d Commit Preview URL

Branch Preview URL
May 19 2026, 10:26 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/create-pr/references/branch-and-commit.md:
- Line 17: Replace the nonstandard spelling "revertable" with "revertible" in
the sentence "Use the `commit` skill to create atomic, revertable Conventional
Commits." so it reads "Use the `commit` skill to create atomic, revertible
Conventional Commits." making sure only the single word is changed and
punctuation/formatting (including the inline `commit` code span and
"Conventional Commits") remain unchanged.

In @.agents/skills/create-pr/SKILL.md:
- Line 33: The commit-quality rule text currently uses the incorrect spelling
"revertable"; update that phrase to "revertible" in the string "Keep commits
atomic and independently revertable; use the `commit` skill." so it reads "Keep
commits atomic and independently revertible; use the `commit` skill." and ensure
any other occurrences of "revertable" in the same document are corrected to
"revertible" as well.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6e510aa-66b9-4afe-9e66-7f3b7a042a18

📥 Commits

Reviewing files that changed from the base of the PR and between 8378395 and c67d093.

📒 Files selected for processing (13)
  • .agents/skills/create-pr/SKILL.md
  • .agents/skills/create-pr/references/ai-review.md
  • .agents/skills/create-pr/references/branch-and-commit.md
  • .agents/skills/create-pr/references/ci.md
  • .agents/skills/create-pr/references/completion.md
  • .agents/skills/create-pr/references/open-pr.md
  • CLAUDE.md
  • packages/ccusage-darwin-arm64/package.json
  • packages/ccusage-darwin-x64/package.json
  • packages/ccusage-linux-arm64/package.json
  • packages/ccusage-linux-x64/package.json
  • packages/ccusage-win32-arm64/package.json
  • packages/ccusage-win32-x64/package.json

Comment thread .agents/skills/create-pr/references/branch-and-commit.md Outdated
Comment thread .agents/skills/create-pr/SKILL.md Outdated
@pkg-pr-new

pkg-pr-new Bot commented May 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

ccusage

npx https://pkg.pr.new/ryoppippi/ccusage@1084

@ccusage/ccusage-darwin-arm64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-darwin-arm64@1084

@ccusage/ccusage-darwin-x64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-darwin-x64@1084

@ccusage/ccusage-linux-arm64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-linux-arm64@1084

@ccusage/ccusage-linux-x64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-linux-x64@1084

@ccusage/ccusage-win32-arm64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-win32-arm64@1084

@ccusage/ccusage-win32-x64

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/ccusage-win32-x64@1084

commit: 22b9f1f

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: c67d0937667d
Base SHA: 8378395edeb1

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new 8378395edeb1 505.3ms 679.1ms 33.8ms 3
PR pkg.pr.new c67d0937667d 853.9ms 563.2ms 34.5ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: 8378395edeb1; PR package: c67d0937667d. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 700.0ms 697.0ms 1.00x 1.44 GiB/s 1.44 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 864.8ms 853.7ms 1.01x 1.16 GiB/s 1.18 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 682.5ms 1.48 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 650.9ms 1.55 GiB/s 1
claude --offline --json Workspace release binary 1.01 GiB 727.6ms 1.38 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 850.8ms 1.18 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 863.3ms 1.17 GiB/s 1
codex --offline --json Workspace release binary 1.01 GiB 844.8ms 1.19 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
claude daily --offline --json 0.00 MiB 32.4ms 4.9ms 6.67x 0.05 MiB/s 0.32 MiB/s
claude session --offline --json 0.00 MiB 32.2ms 4.8ms 6.77x 0.05 MiB/s 0.33 MiB/s
codex daily --offline --json 0.00 MiB 31.8ms 4.5ms 7.03x 0.03 MiB/s 0.19 MiB/s
codex session --offline --json 0.00 MiB 31.5ms 4.4ms 7.10x 0.03 MiB/s 0.19 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs rust/target/release/ccusage directly. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
claude --offline --json 1.01 GiB 689.4ms 722.7ms 0.95x 1.46 GiB/s 1.39 GiB/s
codex --offline --json 1.01 GiB 860.2ms 827.1ms 1.04x 1.17 GiB/s 1.22 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 14.23 KiB 14.23 KiB -0.00 KiB 1.00x
installed native package binary 3288.24 KiB 3288.24 KiB +0.00 KiB 1.00x
Rust release binary rust/target/release/ccusage - 2955.68 KiB - -

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: c67d0937667d
Base SHA: 8378395edeb1

This compares the PR package against the configured base package on the same CI runner.

Package runner startup

Execution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one bunx -p <url> ccusage --version run with an empty Bun install cache. Warm reuses that cache and reports the median of repeated runs.

Package SHA Execution setup Bunx temp cache Bunx warm median Warm samples
Base pkg.pr.new 8378395edeb1 940.6ms 493.8ms 34.2ms 3
PR pkg.pr.new c67d0937667d 695.9ms 482.5ms 33.7ms 3

Cached bunx execution performance

Runs the same large fixture through bunx -p <pkg.pr.new URL> ccusage after the Bun install cache has already been populated by the startup measurement. This separates cached package-runner execution from first-fetch package materialization.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base package: 8378395edeb1; PR package: c67d0937667d. Both run through bunx -p <pkg.pr.new URL> ccusage using the warmed Bun install cache from package runner startup, measured by hyperfine with 0 warmups and 1 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
bunx -p <pkg> ccusage claude --offline --json 1.01 GiB 686.6ms 693.5ms 0.99x 1.47 GiB/s 1.45 GiB/s
bunx -p <pkg> ccusage codex --offline --json 1.01 GiB 857.0ms 853.9ms 1.00x 1.17 GiB/s 1.18 GiB/s

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 685.2ms 1.47 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 656.7ms 1.53 GiB/s 1
claude --offline --json Workspace release binary 1.01 GiB 723.2ms 1.39 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 853.9ms 1.18 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 828.6ms 1.22 GiB/s 1
codex --offline --json Workspace release binary 1.01 GiB 836.2ms 1.20 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
claude daily --offline --json 0.00 MiB 32.8ms 32.0ms 1.03x 0.05 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 31.8ms 32.0ms 0.99x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 31.8ms 31.5ms 1.01x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 31.1ms 32.0ms 0.97x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/work/_temp/ccusage-large-fixture (1.01 GiB, 2,597 files), Codex /home/runner/work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2,597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.

Command Input Base median PR median PR vs base Base throughput PR throughput
claude --offline --json 1.01 GiB 685.8ms 692.0ms 0.99x 1.47 GiB/s 1.45 GiB/s
codex --offline --json 1.01 GiB 861.6ms 855.3ms 1.01x 1.17 GiB/s 1.18 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 14.23 KiB 14.23 KiB -0.00 KiB 1.00x
installed native package binary 3288.24 KiB 3288.24 KiB +0.00 KiB 1.00x
Rust release binary rust/target/release/ccusage - 2955.68 KiB - -

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

ryoppippi added 4 commits May 19, 2026 23:13
Address CodeRabbit feedback by using the standard spelling revertible in the create-pr skill commit guidance.
…bbit-loop' into codex/add-create-pr-skill-coderabbit-loop
Avoid making fish the default shell in the repo-local create-pr skill. The guidance now tells agents to match the active shell and only calls out fish for the PR body stdin pattern where heredoc syntax differs.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
🧩 Analysis chain

@ryoppippi Sure, I'll review the changes in this PR!


🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md (relevant section) ==="
grep -n "create-pr" CLAUDE.md -A 5 -B 5

echo ""
echo "=== SKILL.md ==="
cat .agents/skills/create-pr/SKILL.md

echo ""
echo "=== references/ai-review.md ==="
cat .agents/skills/create-pr/references/ai-review.md

echo ""
echo "=== references/branch-and-commit.md ==="
cat .agents/skills/create-pr/references/branch-and-commit.md

echo ""
echo "=== references/ci.md ==="
cat .agents/skills/create-pr/references/ci.md

echo ""
echo "=== references/completion.md ==="
cat .agents/skills/create-pr/references/completion.md

echo ""
echo "=== references/open-pr.md ==="
cat .agents/skills/create-pr/references/open-pr.md

echo ""
echo "=== package.json samples ==="
cat packages/ccusage-darwin-arm64/package.json
cat packages/ccusage-linux-x64/package.json

Length of output: 10950


CodeRabbit Review — PR #1084

The documentation is well-structured and the skill decomposition into focused reference files is clean. One actionable item and a few minor notes below.


🔴 Actionable — CLAUDE.md: conflicting skill entries

SKILL.md declares create-pr as "the single rule for PR work in this repository", but CLAUDE.md still lists pr-ai-review-workflow directly below it:

- `create-pr` - complete PR workflow ...
- `pr-ai-review-workflow` - PR review loops with `gh` ...   ← still present

An AI agent reading CLAUDE.md would see two peer-level skills covering overlapping PR workflow territory with no guidance on which to prefer. Since create-pr explicitly subsumes the review-loop work (it references ai-review.md which covers the same ground as pr-ai-review-workflow), consider one of:

  1. Remove the pr-ai-review-workflow entry from CLAUDE.md's skill list if it is fully replaced.
  2. Annotate it as a sub-skill/dependency called internally by create-pr if it is still used as a building block.

🟡 Minor — references/open-pr.md: no mention of --draft

The PR body guidance covers simple vs. complex changes, but there is no mention of the --draft flag for gh pr create. For long-lived or iterative workflows it can be useful to open as a draft while CI and review run. Consider adding a note if draft PRs are part of the intended workflow here.


✅ Everything else looks good

File Status
SKILL.md ✅ Clear, self-contained, good "Always Apply" rules
references/ai-review.md ✅ Correct gh api graphql usage (-F for typed fields), correct reply endpoint
references/branch-and-commit.md
references/ci.md
references/completion.md ✅ Completion gates are precise and unambiguous
references/open-pr.md <<'EOF' heredoc and fish printf alternatives are correct; --body-file - guidance is solid
package.json files ✅ Pure field reordering, no behavioral change
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Mark create-pr as the single entry point for PR work in CLAUDE.md. This removes the apparent peer-level overlap with pr-ai-review-workflow while keeping that workflow documented as a helper used by create-pr for review-loop mechanics.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review\n@cubic-dev-ai review\n\n@coderabbitai Addressed your latest actionable feedback in 7ea4372 by marking create-pr as the single PR-work entry point in CLAUDE.md and documenting pr-ai-review-workflow as its helper for review-loop mechanics. Validation: pre-commit hooks and pre-push hooks passed.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md relevant section ==="
grep -n "create-pr\|pr-ai-review-workflow" CLAUDE.md -A 3 -B 1

Length of output: 541


@ryoppippi The fix looks great. In CLAUDE.md, create-pr is now explicitly labeled the single entry point for PR work, and pr-ai-review-workflow carries a clear "do not route full PR work directly to it" guard — exactly what's needed to eliminate any ambiguity for an AI agent parsing the skill list. ✅

The actionable item is resolved.

🐇 ʕ•ᴥ•ʔ


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

Fold the repo-local pr-ai-review-workflow skill into create-pr so PR creation, AI review requests, review replies, CI handling, and completion gates have a single skill entry point. Move the reusable gh review command reference under create-pr, update skill routing and cross-skill references, and remove the old standalone review workflow skill.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review\n@cubic-dev-ai review\n\n@coderabbitai Integrated pr-ai-review-workflow into create-pr in b55da7d: create-pr is now the single PR workflow skill, the reusable gh review commands moved under create-pr references, and old pr-ai-review-workflow routing/files were removed. Validation: targeted oxfmt check, pre-commit hooks, and pre-push hooks passed.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md skill routing section ==="
grep -n "create-pr\|pr-ai-review-workflow\|skill\|Skill" CLAUDE.md -A 3 -B 1

echo ""
echo "=== .agents/skills directory structure ==="
find .agents/skills -type f | sort

echo ""
echo "=== create-pr references directory ==="
ls -la .agents/skills/create-pr/references/ 2>/dev/null || echo "not found"

Length of output: 4073


@ryoppippi The integration is clean. ✅

Here's what the scripts confirmed in the current branch state:

Check Result
CLAUDE.md — only create-pr in skill routing pr-ai-review-workflow is fully gone
.agents/skills/pr-ai-review-workflow/ directory ✅ Removed entirely
create-pr/references/gh-review-commands.md ✅ New file present — reusable gh commands rehomed here
Total reference files under create-pr ✅ 6 focused files (ai-review, branch-and-commit, ci, completion, gh-review-commands, open-pr)

create-pr is now the unambiguous single PR workflow skill with all its building blocks self-contained. Well done on the clean consolidation! 🐇 ʕ•ᴥ•ʔ

@ryoppippi
ryoppippi merged commit e4c32d6 into main May 19, 2026
26 checks passed
@ryoppippi
ryoppippi deleted the codex/add-create-pr-skill-coderabbit-loop branch May 19, 2026 22:30
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.

1 participant