feat(skills): use sequence numbers for worktree directory names - #536
Conversation
Replace date prefix with zero-padded sequence numbers (00001-, 00002-, ...) for worktree directories. Also moves agents from me to core plugin.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates the worktree skill documentation to incorporate zero-padded sequence prefixes in directory naming (00001-branch-name format), removes duplicate skill documentation from the me plugins directory, and expands test coverage to validate agents across all plugin directories rather than a single one. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
Repository rule violations found
There was a problem hiding this comment.
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 `@plugins/core/skills/using-git-worktrees/SKILL.md`:
- Around line 89-90: The script stores LOCATION into base_dir and later
constructs paths like "~/.config/superpowers/worktrees/$project/$dir_name" then
calls git worktree add with that quoted path, but tilde is not expanded; update
the code to expand any leading tilde before passing to git by normalizing
LOCATION and any constructed path (e.g., expand LOCATION into base_dir and
expand the final $path used in git worktree add) using a reliable expansion
method (eg. a small helper that replaces leading "~" with "$HOME" or uses
printf/realpath to canonicalize) so git receives an absolute/expanded path
instead of a literal "~" string; ensure you update references to base_dir, last,
LOCATION, and the variable used in git worktree add to use the expanded value.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
plugins/core/agents/code-reviewer.mdplugins/core/agents/web-researcher.mdplugins/core/skills/using-git-worktrees/SKILL.mdplugins/me/skills/using-git-worktrees/SKILL.mdtests/integration/cross_plugin_interactions.bats
💤 Files with no reviewable changes (1)
- plugins/me/skills/using-git-worktrees/SKILL.md
| base_dir="$LOCATION" # e.g. .worktrees | ||
| last=$(ls "$base_dir" 2>/dev/null | grep -E '^[0-9]{5}-' | sort | tail -1 | grep -oE '^[0-9]{5}') |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, find and read the SKILL.md file
fd -t f "SKILL.md" plugins/core/skills/using-git-worktrees/Repository: baleen37/everything-agent
Length of output: 117
🏁 Script executed:
# Read the relevant sections of the file
if [ -f "plugins/core/skills/using-git-worktrees/SKILL.md" ]; then
echo "=== Lines 85-105 (context around line 89-90 and 100) ==="
sed -n '85,105p' "plugins/core/skills/using-git-worktrees/SKILL.md"
fiRepository: baleen37/everything-agent
Length of output: 790
🏁 Script executed:
# Run the test script from the review to verify tilde expansion behavior
#!/bin/bash
set -euo pipefail
LOCATION='~/.config/superpowers/worktrees/demo'
base_dir="$LOCATION"
path="~/.config/superpowers/worktrees/demo/00001-branch"
printf 'base_dir=%s\npath=%s\n' "$base_dir" "$path"
echo "---"
echo "Confirming tilde expansion does NOT occur in variable assignments:"
echo "Expected: literal ~ in output (no expansion)"Repository: baleen37/everything-agent
Length of output: 285
🏁 Script executed:
# Verify that git itself does expand tilde in worktree paths
# This helps determine if the issue is critical or just bad practice
echo "=== Testing git's tilde expansion behavior ==="
# Create a simple test to see if git interprets literal ~ correctly
echo "Note: git worktree add does NOT expand tilde in quoted paths at argument level"
echo "Git receives the literal string and may or may not interpret it depending on context"
echo "The safer approach is to expand in shell before passing to git"Repository: baleen37/everything-agent
Length of output: 342
🏁 Script executed:
# Check for similar patterns in the file that might have the same issue
sed -n '1,120p' "plugins/core/skills/using-git-worktrees/SKILL.md" | grep -n "~" | head -20Repository: baleen37/everything-agent
Length of output: 308
Expand tilde (~) in paths before passing to git commands.
Line 100 hardcodes ~/.config/superpowers/worktrees/$project/$dir_name as a literal string, and line 89 stores $LOCATION without expanding the tilde. When git worktree add "$path" receives ~/..., git doesn't reliably expand it from within quoted arguments, causing worktree creation to fail or target incorrect locations.
Proposed fix
-base_dir="$LOCATION" # e.g. .worktrees
+base_dir="${LOCATION/#\~/$HOME}" # e.g. .worktrees or /home/user/.config/...
@@
- path="~/.config/superpowers/worktrees/$project/$dir_name"
+ path="$HOME/.config/superpowers/worktrees/$project/$dir_name"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/core/skills/using-git-worktrees/SKILL.md` around lines 89 - 90, The
script stores LOCATION into base_dir and later constructs paths like
"~/.config/superpowers/worktrees/$project/$dir_name" then calls git worktree add
with that quoted path, but tilde is not expanded; update the code to expand any
leading tilde before passing to git by normalizing LOCATION and any constructed
path (e.g., expand LOCATION into base_dir and expand the final $path used in git
worktree add) using a reliable expansion method (eg. a small helper that
replaces leading "~" with "$HOME" or uses printf/realpath to canonicalize) so
git receives an absolute/expanded path instead of a literal "~" string; ensure
you update references to base_dir, last, LOCATION, and the variable used in git
worktree add to use the expanded value.
# [5.36.0](v5.35.4...v5.36.0) (2026-02-25) ### Features * **skills:** use sequence numbers for worktree directory names ([#536](#536)) ([1e50508](1e50508))
워크트리 디렉토리 이름 앞에 날짜 대신 5자리 시퀀스 번호를 붙입니다.
Changes
using-git-worktrees스킬: 디렉토리명 형식을YYYY-MM-DD-<branch>→00001-<branch>로 변경plugins/me/agents/→plugins/core/agents/로 이동Tests
Summary by CodeRabbit
Release Notes