Conversation
📝 WalkthroughWalkthroughAdds agent skill specifications for planning and PR workflows, several shell utilities for PR polling/triage/body updates, git hook setup and installer, a Claude-based GitHub Actions review workflow, and consolidated agent documentation files. Outputs include writing plans to Changes
Sequence Diagram(s)sequenceDiagram
participant Agent
participant Local as "Local Scripts\n(`gh`, bash)"
participant GitHub
participant CI as "CI / Checks"
participant Repo as "Repository\n(PLAN.md / PR)"
Agent->>Local: start create-pr or create-a-plan flow
Local->>GitHub: create/update PR (GraphQL / gh)
GitHub->>CI: trigger checks
CI-->>GitHub: report status
Local->>GitHub: poll checks/comments (poll-pr.sh)
GitHub-->>Local: checks, comments, reviews
alt failing or changed
Local->>Agent: triage summary (triage-pr.sh)
Agent->>Local: apply fixes or update PR body
Local->>GitHub: push commits / update PR body (pr-body-update.sh)
end
Agent->>Repo: write PLAN.md or finalize PR
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Fix all issues with AI agents
In @.agents/skills/create-a-plan/SKILL.md:
- Line 35: Update the SKILL.md entry for the tools AskUserQuestion and
request_user_input to include explicit external-doc links and/or a brief mapping
to Claude and Codex function-calling: reference the Claude function-calling docs
(link to Claude API function-calling page) for AskUserQuestion and the
Codex/request_user_input API or SDK docs (link to relevant OpenAI or Codex
function-calling docs) for request_user_input, and add a one-sentence note
describing how each tool maps to the respective platform’s function-calling
signature/usage (e.g., parameters, expected return shape, authentication) so
readers can find and implement the external tool integrations.
In @.agents/skills/create-pr/scripts/poll-pr.sh:
- Around line 126-138: Reset the per-iteration check state before calling gh: at
the start of each loop iteration clear or initialize checks_counts and the
derived variables (total, pending, failed, success) to safe defaults (e.g.,
empty or 0) so they cannot carry over stale values when gh pr checks fails or
returns nothing; then run gh pr checks and populate them (the existing read -r
total pending failed success from checks_counts) and ensure the exit-when-green
logic references these freshly-initialized variables (symbols: checks_counts,
total, pending, failed, success, gh pr checks, and the exit-when-green check) so
a failed/empty gh call won’t produce a false green exit.
- Around line 128-129: The jq filter currently computing failed checks uses
select(.conclusion != null and .conclusion != "SUCCESS"), which treats NEUTRAL
and SKIPPED as failures; update that expression (the line with
(map(select(.conclusion != null and .conclusion != "SUCCESS")) | length)) to
instead explicitly count only real failures (for example use select(.conclusion
== "FAILURE" or .conclusion == "TIMED_OUT" or .conclusion == "ACTION_REQUIRED"
or .conclusion == "CANCELLED") or conversely exclude benign conclusions with
select(.conclusion != null and (.conclusion != "SUCCESS" and .conclusion !=
"NEUTRAL" and .conclusion != "SKIPPED"))), so NEUTRAL and SKIPPED are not
considered failed.
In @.agents/skills/create-pr/scripts/pr-body-update.sh:
- Around line 93-96: The exact byte comparison between "$updated_body" and
"$(cat "$body_file")" can yield false negatives because GitHub normalizes
Markdown (CRLF → LF, trailing newlines); update the check in pr-body-update.sh
to normalize both sides before comparing — for example, normalize line endings
(strip \r), collapse trailing newlines/spaces, and compare the trimmed results
of updated_body and body_file variables (or remove the verification step
entirely and trust the API response) so the check uses a lenient equality
instead of raw byte-for-byte comparison.
- Around line 16-39: The flag parsing loop can crash with "unbound variable"
when a flag like --file is the last arg; update the --file, --pr, and --repo
cases in the while/case block to explicitly validate that a value exists before
reading $2 (e.g., check that $# -ge 2 or that ${2-} is non-empty), and if
missing call usage and exit with error; ensure you apply the same guard logic to
the --file, --pr and --repo branches so no missing-value leads to set -u
failures.
In @.agents/skills/create-pr/SKILL.md:
- Around line 76-79: Replace the non-standard `wt remove --yes --force` call
with the correct Git worktree removal flow: after detecting a worktree via `[
"$(git rev-parse --git-common-dir)" != "$(git rev-parse --git-dir)" ]`, use the
`request_user_input` tool to ask the user for confirmation and the target
worktree path, then run `git worktree remove --force <worktree-path>` (or
compute the path from `git rev-parse --git-common-dir`/other repo metadata) and
finally run `git checkout main && git pull`; if a custom `wt` helper was
intended, document and implement `wt` first and reference it from the SKILL text
instead of the invalid command.
In @.githooks/pre-commit:
- Around line 20-24: The pre-commit block uses "git diff --quiet" which flags
any unstaged working-tree changes and thus falsely reports "Pre-commit modified
files" even though the hook commands (format:check, lint:check, biome ci) are
read-only; fix by either removing this entire diff-check block or change it to
only inspect staged changes by replacing the global check with a staged-only
check (use the cached/staged diff variant) so it only fails when the hook itself
or staged files changed; alternatively, if you want an autofix flow, run the
fixer variants (e.g., format and lint without :check), then re-stage affected
files with git add before re-running the staged diff check.
🧹 Nitpick comments (10)
bin/setup-githooks (1)
7-13: Consider verifying.githooksexists in the fallback branch.If
.huskydoesn't exist, the script unconditionally setscore.hooksPathto.githookswithout checking that directory exists. This could silently misconfigure Git hooks if neither directory is present.Proposed fix
if [[ -d .husky ]]; then git config core.hooksPath .husky echo "Configured git hooksPath to .husky" -else +elif [[ -d .githooks ]]; then git config core.hooksPath .githooks echo "Configured git hooksPath to .githooks" +else + echo "Warning: neither .husky nor .githooks directory found" >&2 + exit 1 fiAGENTS.md (2)
24-88: Duplicated guidance between top-level section and legacy block.Lines 1–20 (concise guide) and lines 30–88 (legacy block) cover the same commands, style rules, and workflows almost verbatim. Over time one side will drift out of sync with the other. Consider either removing the legacy block entirely now that the top-level section is canonical, or adding a note that the legacy block is frozen/deprecated and should not be the source of truth.
99-99: Long single-line command is hard to read and maintain.Consider breaking this across multiple lines with
\continuations for readability, especially since this is documentation meant to be copy-pasted.📝 Suggested formatting
-npm_config_cache=/tmp/npm-cache npx -y skills add https://github.com/cartridge-gg/agents --skill create-pr create-a-plan --agent claude-code cursor -y +npm_config_cache=/tmp/npm-cache npx -y skills add \ + https://github.com/cartridge-gg/agents \ + --skill create-pr create-a-plan \ + --agent claude-code cursor \ + -y.github/workflows/claude-code-review.yml (2)
3-5: Workflow will trigger on draft PRs, consuming API credits unnecessarily.The
openedandsynchronizeevents fire for draft PRs too. Consider adding a condition to skip drafts so Claude reviews aren't wasted on WIP pushes.💡 Proposed fix
claude-code-review: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false steps:
7-12:id-token: writeis a powerful permission — document its purpose.Per the PR objectives this is for OIDC, but a brief inline comment would help future maintainers understand why this non-obvious permission is required, especially since nothing else in this workflow file visibly uses it.
.githooks/pre-commit (2)
14-18: Running full test suite and full build on every commit is very heavy for a pre-commit hook.
bun run testandbun run buildcan take minutes in a monorepo. This will discourage frequent, small commits. Consider moving the heavier checks (test,build) to a pre-push hook and keeping only the fast lint/format checks here.Based on learnings: "Prefer check-only commands in CI (
format:check,lint:check) and keep local hooks aligned."
10-12:NODE_FILESassignment is unused; the grep runs against the same$STAGED_FILES.
NODE_FILESon Line 11 is just a copy ofSTAGED_FILESand is never referenced again after theechopipe on Line 12. You can simplify by pipingSTAGED_FILESdirectly.♻️ Suggested simplification
-# Node (.) -NODE_FILES="$STAGED_FILES" -if echo "$NODE_FILES" | grep -qE '\.(ts|tsx|js|jsx|json|css|scss|yml|yaml)$|^package\.json$|^pnpm-lock\.yaml$|^bun\.lockb?$|^biome\.json$|^tsconfig\..*\.json$'; then +# Node (.) +if echo "$STAGED_FILES" | grep -qE '\.(ts|tsx|js|jsx|json|css|scss|yml|yaml)$|^package\.json$|^pnpm-lock\.yaml$|^bun\.lockb?$|^biome\.json$|^tsconfig\..*\.json$'; then.agents/skills/create-pr/scripts/poll-pr.sh (1)
126-132: Two separategh pr checkscalls per iteration can be consolidated into one.Lines 126–132 and 140–149 both call
gh pr checkswith similar JSON queries. This doubles API calls and can hit rate limits under tight polling intervals. Fetch once, then derive both the summary counts and the failed-checks list from the same result.Also applies to: 140-149
.agents/skills/create-pr/scripts/triage-pr.sh (1)
1-112: Substantial duplication withpoll-pr.sh.The auto-detection logic (lines 37–53), jq queries for checks/comments/reviews, and output formatting are nearly identical between this script and
poll-pr.sh. Consider extracting the shared logic (arg parsing, PR/repo detection, jq query fragments) into a common_lib.shthat both scripts source. This would reduce the maintenance surface for the jq expressions in particular..agents/skills/create-a-plan/SKILL.md (1)
24-24: Consider safeguarding against overwriting unrelated plans.The instruction to update an existing
PLAN.mdwithout confirmation could lead to accidentally overwriting a plan for a different feature. Consider adding a step to verify that the existing plan is related to the current task before updating.💡 Suggested enhancement
-2. Confirm you will produce `PLAN.md` as the output in the repo root. If `PLAN.md` already exists, update it rather than creating a new file. +2. Confirm you will produce `PLAN.md` as the output in the repo root. If `PLAN.md` already exists, verify it relates to the current task before updating, or propose creating a feature-specific plan file if the existing plan is unrelated.
|
|
||
| ### Phase 2: Deep Interview | ||
|
|
||
| Use the `AskUserQuestion` (Claude) and/or `request_user_input` (Codex) tools in rounds. Ask 1-3 questions per round. Each round should go deeper and avoid repeating what is already known. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for AskUserQuestion and request_user_input usage in the codebase
echo "Searching for AskUserQuestion usage..."
rg -n "AskUserQuestion" --type md
echo -e "\nSearching for request_user_input usage..."
rg -n "request_user_input" --type md
echo -e "\nSearching for other interactive tool references..."
rg -nP "(ask.*user|user.*input|request.*input)" --type md -i | head -30
echo -e "\nSearching for tool definitions or documentation..."
rg -n "tool" .agents/skills/create-a-plan/SKILL.md -A 2 -B 2Repository: dojoengine/dojo.js
Length of output: 496
🏁 Script executed:
cat -n .agents/skills/create-a-plan/SKILL.mdRepository: dojoengine/dojo.js
Length of output: 8664
Document the external tool references with links to their APIs.
The tools AskUserQuestion (Claude) and request_user_input (Codex) mentioned on line 35 lack supporting documentation in the repository. For clarity and maintainability, add links to the external API documentation for these tools or explain how they map to Claude and Codex function-calling capabilities.
🤖 Prompt for AI Agents
In @.agents/skills/create-a-plan/SKILL.md at line 35, Update the SKILL.md entry
for the tools AskUserQuestion and request_user_input to include explicit
external-doc links and/or a brief mapping to Claude and Codex function-calling:
reference the Claude function-calling docs (link to Claude API function-calling
page) for AskUserQuestion and the Codex/request_user_input API or SDK docs (link
to relevant OpenAI or Codex function-calling docs) for request_user_input, and
add a one-sentence note describing how each tool maps to the respective
platform’s function-calling signature/usage (e.g., parameters, expected return
shape, authentication) so readers can find and implement the external tool
integrations.
| checks_counts=$(gh pr checks "$pr" --repo "$repo" --json status,conclusion --jq ' | ||
| [length, | ||
| (map(select(.status != "COMPLETED")) | length), | ||
| (map(select(.conclusion != null and .conclusion != "SUCCESS")) | length), | ||
| (map(select(.conclusion == "SUCCESS")) | length) | ||
| ] | @tsv | ||
| ' 2>/dev/null || true) | ||
| if [[ -n "$checks_counts" ]]; then | ||
| IFS=$'\t' read -r total pending failed success <<< "$checks_counts" | ||
| echo "Checks: total=$total pending=$pending failed=$failed success=$success" | ||
| else | ||
| echo "Checks: unavailable" | ||
| fi |
There was a problem hiding this comment.
Stale pending/failed/total variables can trigger a false "green" exit.
pending, failed, total, and success are set only inside the if [[ -n "$checks_counts" ]] branch (Line 134). If the gh pr checks call fails or returns empty in a subsequent iteration, the variables retain their values from the previous iteration. The exit-when-green check on Line 216 then uses stale data, potentially exiting early when checks are actually unavailable.
Reset these variables at the top of each loop iteration:
🐛 Proposed fix
for i in $(seq 1 "$iterations"); do
now=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "[$now] Poll $i/$iterations"
changed=0
+ total="" pending="" failed="" success=""
checks_counts=$(gh pr checks "$pr" --repo "$repo" --json status,conclusion --jq 'Also applies to: 215-220
🤖 Prompt for AI Agents
In @.agents/skills/create-pr/scripts/poll-pr.sh around lines 126 - 138, Reset
the per-iteration check state before calling gh: at the start of each loop
iteration clear or initialize checks_counts and the derived variables (total,
pending, failed, success) to safe defaults (e.g., empty or 0) so they cannot
carry over stale values when gh pr checks fails or returns nothing; then run gh
pr checks and populate them (the existing read -r total pending failed success
from checks_counts) and ensure the exit-when-green logic references these
freshly-initialized variables (symbols: checks_counts, total, pending, failed,
success, gh pr checks, and the exit-when-green check) so a failed/empty gh call
won’t produce a false green exit.
| (map(select(.status != "COMPLETED")) | length), | ||
| (map(select(.conclusion != null and .conclusion != "SUCCESS")) | length), |
There was a problem hiding this comment.
Checks with NEUTRAL or SKIPPED conclusions are counted as "failed".
The jq filter select(.conclusion != null and .conclusion != "SUCCESS") will include NEUTRAL, SKIPPED, CANCELLED, etc. in the failed count. Depending on the use case, this may overcount failures. Consider excluding benign conclusions:
- (map(select(.conclusion != null and .conclusion != "SUCCESS")) | length),
+ (map(select(.conclusion != null and .conclusion != "SUCCESS" and .conclusion != "NEUTRAL" and .conclusion != "SKIPPED")) | length),🤖 Prompt for AI Agents
In @.agents/skills/create-pr/scripts/poll-pr.sh around lines 128 - 129, The jq
filter currently computing failed checks uses select(.conclusion != null and
.conclusion != "SUCCESS"), which treats NEUTRAL and SKIPPED as failures; update
that expression (the line with (map(select(.conclusion != null and .conclusion
!= "SUCCESS")) | length)) to instead explicitly count only real failures (for
example use select(.conclusion == "FAILURE" or .conclusion == "TIMED_OUT" or
.conclusion == "ACTION_REQUIRED" or .conclusion == "CANCELLED") or conversely
exclude benign conclusions with select(.conclusion != null and (.conclusion !=
"SUCCESS" and .conclusion != "NEUTRAL" and .conclusion != "SKIPPED"))), so
NEUTRAL and SKIPPED are not considered failed.
| while [[ $# -gt 0 ]]; do | ||
| case "$1" in | ||
| --file) | ||
| body_file="$2" | ||
| shift 2 | ||
| ;; | ||
| --pr) | ||
| pr="$2" | ||
| shift 2 | ||
| ;; | ||
| --repo) | ||
| repo="$2" | ||
| shift 2 | ||
| ;; | ||
| -h|--help) | ||
| usage | ||
| exit 0 | ||
| ;; | ||
| *) | ||
| echo "Unknown arg: $1" >&2 | ||
| usage >&2 | ||
| exit 1 | ||
| ;; | ||
| esac |
There was a problem hiding this comment.
Missing-value argument will produce a confusing error.
If a flag like --file is passed as the last argument without a value, $2 is unbound and set -u fires with a cryptic "unbound variable" message. Guard with an explicit check.
🛡️ Proposed fix (example for --file; apply similarly to --pr and --repo)
--file)
+ [[ $# -ge 2 ]] || { echo "--file requires an argument" >&2; exit 1; }
body_file="$2"
shift 2
;;
--pr)
+ [[ $# -ge 2 ]] || { echo "--pr requires an argument" >&2; exit 1; }
pr="$2"
shift 2
;;
--repo)
+ [[ $# -ge 2 ]] || { echo "--repo requires an argument" >&2; exit 1; }
repo="$2"
shift 2
;;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| while [[ $# -gt 0 ]]; do | |
| case "$1" in | |
| --file) | |
| body_file="$2" | |
| shift 2 | |
| ;; | |
| --pr) | |
| pr="$2" | |
| shift 2 | |
| ;; | |
| --repo) | |
| repo="$2" | |
| shift 2 | |
| ;; | |
| -h|--help) | |
| usage | |
| exit 0 | |
| ;; | |
| *) | |
| echo "Unknown arg: $1" >&2 | |
| usage >&2 | |
| exit 1 | |
| ;; | |
| esac | |
| while [[ $# -gt 0 ]]; do | |
| case "$1" in | |
| --file) | |
| [[ $# -ge 2 ]] || { echo "--file requires an argument" >&2; exit 1; } | |
| body_file="$2" | |
| shift 2 | |
| ;; | |
| --pr) | |
| [[ $# -ge 2 ]] || { echo "--pr requires an argument" >&2; exit 1; } | |
| pr="$2" | |
| shift 2 | |
| ;; | |
| --repo) | |
| [[ $# -ge 2 ]] || { echo "--repo requires an argument" >&2; exit 1; } | |
| repo="$2" | |
| shift 2 | |
| ;; | |
| -h|--help) | |
| usage | |
| exit 0 | |
| ;; | |
| *) | |
| echo "Unknown arg: $1" >&2 | |
| usage >&2 | |
| exit 1 | |
| ;; | |
| esac |
🤖 Prompt for AI Agents
In @.agents/skills/create-pr/scripts/pr-body-update.sh around lines 16 - 39, The
flag parsing loop can crash with "unbound variable" when a flag like --file is
the last arg; update the --file, --pr, and --repo cases in the while/case block
to explicitly validate that a value exists before reading $2 (e.g., check that
$# -ge 2 or that ${2-} is non-empty), and if missing call usage and exit with
error; ensure you apply the same guard logic to the --file, --pr and --repo
branches so no missing-value leads to set -u failures.
| if [[ "$updated_body" != "$(cat "$body_file")" ]]; then | ||
| echo "PR body mismatch after update." >&2 | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Body comparison may produce false negatives due to GitHub normalization.
GitHub can normalize Markdown bodies (e.g., trailing newlines, CRLF → LF). A byte-for-byte != comparison against the local file could report a mismatch even when the update succeeded. Consider a more lenient check (e.g., compare a trimmed/normalized version), or simply trust the mutation's success and drop the verification step.
🤖 Prompt for AI Agents
In @.agents/skills/create-pr/scripts/pr-body-update.sh around lines 93 - 96, The
exact byte comparison between "$updated_body" and "$(cat "$body_file")" can
yield false negatives because GitHub normalizes Markdown (CRLF → LF, trailing
newlines); update the check in pr-body-update.sh to normalize both sides before
comparing — for example, normalize line endings (strip \r), collapse trailing
newlines/spaces, and compare the trimmed results of updated_body and body_file
variables (or remove the verification step entirely and trust the API response)
so the check uses a lenient equality instead of raw byte-for-byte comparison.
| 16. After successful merge, check if we're in a git worktree: | ||
| - Run: `[ "$(git rev-parse --git-common-dir)" != "$(git rev-parse --git-dir)" ]` | ||
| - **If in a worktree**: Use the ask user question tool (`request_user_input`) to ask if they want to clean up the worktree. If yes, run `wt remove --yes --force` to remove the worktree and local branch, then switch back to the main worktree. | ||
| - **If not in a worktree**: Just switch back to main with `git checkout main && git pull` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Search for 'wt' script or executable in common locations and throughout the repo
echo "=== Searching for 'wt' as a file ==="
fd -t f 'wt' --hidden 2>/dev/null | head -20
echo -e "\n=== Searching for 'wt' in bin, scripts, .agents directories ==="
find bin/ scripts/ .agents/ -type f -name 'wt' 2>/dev/null
echo -e "\n=== Searching for 'wt remove' references in the codebase ==="
rg 'wt\s+remove' -t md -t sh -t js -t ts --hidden 2>/dev/null
echo -e "\n=== Searching for 'wt' as a command/alias definition ==="
rg '(alias|function)\s+wt\b' --hidden 2>/dev/null | head -10
echo -e "\n=== Check the SKILL.md file context ==="
cat -n .agents/skills/create-pr/SKILL.md | sed -n '70,85p'Repository: dojoengine/dojo.js
Length of output: 1530
🏁 Script executed:
# Check package.json for scripts that might define 'wt'
echo "=== Checking package.json for 'wt' related scripts ==="
find . -name "package.json" -type f 2>/dev/null | head -5 | while read f; do
echo "File: $f"
rg 'wt' "$f" 2>/dev/null || echo "No 'wt' found"
done
echo -e "\n=== Searching entire codebase for 'git worktree remove' ==="
rg 'git\s+worktree\s+remove' --hidden 2>/dev/null
echo -e "\n=== Check if 'wt' might be a shorthand or tool name ==="
rg '"wt"' --hidden 2>/dev/null | head -10Repository: dojoengine/dojo.js
Length of output: 475
wt remove --yes --force is not a standard git command and is not defined in this repository.
The instruction at line 78 references a non-existent command that will fail when executed. Replace it with the standard git command: git worktree remove --force <worktree-path>. If a custom wt tool should be used instead, it needs to be defined and documented in the repository first.
🤖 Prompt for AI Agents
In @.agents/skills/create-pr/SKILL.md around lines 76 - 79, Replace the
non-standard `wt remove --yes --force` call with the correct Git worktree
removal flow: after detecting a worktree via `[ "$(git rev-parse
--git-common-dir)" != "$(git rev-parse --git-dir)" ]`, use the
`request_user_input` tool to ask the user for confirmation and the target
worktree path, then run `git worktree remove --force <worktree-path>` (or
compute the path from `git rev-parse --git-common-dir`/other repo metadata) and
finally run `git checkout main && git pull`; if a custom `wt` helper was
intended, document and implement `wt` first and reference it from the SKILL text
instead of the invalid command.
| if ! git diff --quiet; then | ||
| echo 'Pre-commit modified files (likely formatting). Stage the changes and retry.' | ||
| git diff --name-only | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
git diff --quiet will flag any pre-existing unstaged changes, not just hook-generated modifications.
Since every check command here is read-only (format:check, lint:check, biome ci), none of them modify files. This means git diff --quiet will detect pre-existing unstaged work and emit the misleading "Pre-commit modified files (likely formatting)" message, blocking the commit even though the hook didn't change anything.
Either remove this block (since no command writes files), or scope it to only the staged files:
🐛 Proposed fix
- if ! git diff --quiet; then
- echo 'Pre-commit modified files (likely formatting). Stage the changes and retry.'
- git diff --name-only
- exit 1
- fiIf you do want an auto-fix + re-stage flow, replace the check-only commands with their fix variants (bun run format, bun run lint) and then use git add on the staged files, rather than checking the entire working tree.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if ! git diff --quiet; then | |
| echo 'Pre-commit modified files (likely formatting). Stage the changes and retry.' | |
| git diff --name-only | |
| exit 1 | |
| fi | |
| [Lines 1-19 remain unchanged] | |
| [Lines 25+ follow directly after removal] |
🤖 Prompt for AI Agents
In @.githooks/pre-commit around lines 20 - 24, The pre-commit block uses "git
diff --quiet" which flags any unstaged working-tree changes and thus falsely
reports "Pre-commit modified files" even though the hook commands (format:check,
lint:check, biome ci) are read-only; fix by either removing this entire
diff-check block or change it to only inspect staged changes by replacing the
global check with a staged-only check (use the cached/staged diff variant) so it
only fails when the hook itself or staged files changed; alternatively, if you
want an autofix flow, run the fixer variants (e.g., format and lint without
:check), then re-stage affected files with git add before re-running the staged
diff check.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/claude-code-review.yml:
- Around line 67-70: The workflow step name "Claude Review (skipped: missing
secret)" contains an unquoted colon which breaks YAML parsing; update the step
declaration so the name is a quoted scalar (e.g., wrap the entire name value in
single or double quotes) to escape the colon, and for consistency also quote the
other step name that contains parentheses (the other "Claude Review (...)" step)
to avoid future parsing issues; ensure only the name field is changed and the
surrounding if/run keys remain untouched.
🧹 Nitpick comments (1)
.github/workflows/claude-code-review.yml (1)
18-21:fetch-depth: 0is heavier than needed.The preflight step already does its own
git fetch --depth=1 origin "${default_branch}". A shallow checkout (fetch-depth: 1) is sufficient here since you only compare the single workflow file, not full history.♻️ Suggested optimization
- name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0
This PR standardizes agent/dev tooling:
AGENTS.mdas canonical agent instructions (CLAUDE.mdsymlinks to it)..agentsas source of truth +.claude/.cursorcompat symlinks.create-pr+create-a-planskills fromcartridge-gg/agents.bin/setup-githooks+.githooks/pre-commit(fast local mirror of CI checks).id-token: writefor OIDC).Summary by CodeRabbit
New Features
Chores