chore: Add helper script for generated skill files#1295
Conversation
Keep the one-off workflow for refreshing generated skills in sibling Unity projects available as a repository script instead of a temporary /tmp skill.
|
Warning Review limit reached
More reviews will be available in 16 minutes and 56 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new shell script automates refreshing Unity uloop skills across sibling projects. It parses CLI arguments, discovers and validates target projects, validates git state, gracefully shuts down running Unity instances with escalation to force-kill, installs skills via uloop, conditionally commits changes, removes build artifacts, and relaunches Unity. ChangesNeighbor Game Skills Refresh Script
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Clarify that the helper is a local development script and summarize the workflow it performs before any executable logic runs.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@scripts/refresh-neighbor-game-skills.sh`:
- Around line 10-13: The signal handlers currently trap INT/TERM only to run
cleanup, which consumes the signal and lets the script continue; change the
traps so INT and TERM run cleanup then exit with a non-zero status (e.g., exit 1
or 130) while keeping the EXIT trap for cleanup; implement either a small
on_signal wrapper (on_signal -> cleanup; exit 1) and trap that for INT/TERM, or
change the INT/TERM trap to invoke cleanup followed by a non-zero exit,
referencing the existing cleanup function and the trap lines.
- Around line 134-145: The append_project function currently appends
project_root unconditionally causing duplicate canonical roots; before printing
to project_file, check whether project_root is already present (e.g., grep -Fxq
"$project_root" "$project_file" || printf …) or maintain an in-memory array/set
of seen roots and only append if not seen, using the existing project_root and
project_file variables to perform the membership test; ensure project_file
exists or create it first and update append_project to skip duplicates to
guarantee unique canonical project roots.
- Around line 52-56: The awk substring check for "-projectPath" can accidentally
match prefixes; in scripts/refresh-neighbor-game-skills.sh (inside the awk
filter used by quit_unity/force_kill_unity) replace the index($0, "-projectPath
" project) > 0 test with a regex match that enforces an exact "-projectPath"
token followed by the project path and then a separator or end-of-line (e.g. use
match($0, "-projectPath[[:space:]]+" project "([[:space:]]|$)") > 0) so only the
Unity instance launched with that exact -projectPath is selected. Ensure you
update the awk condition in the same pipeline where
Unity.app/Contents/MacOS/Unity is checked.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e3171f87-43e7-4481-bbe7-8bd0462cd89e
📒 Files selected for processing (1)
scripts/refresh-neighbor-game-skills.sh
Exit on interrupt signals, match Unity project paths exactly when resolving Editor PIDs, and reject duplicate project roots before running the refresh workflow.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Treat Unity process arguments with a trailing slash after -projectPath as the same canonical project while keeping prefix paths excluded.
Summary
User Impact
Changes
Verification