.claude/skills/worktree-rules/SKILL.md
Port changes from a git worktree to the main repository. This is the skill behind `/port-changes`; `worktree-rules` remains the underlying skill slug/directory. Use when asked to 'port changes', 'sync to main', 'push to main repo', '/port-changes', or when porting worktree commits.
npx skillsauth add MrVPlusOne/takode worktree-rulesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/port-changes) -- Worktree Porting WorkflowThis skill's runtime slug/directory is worktree-rules. When a leader or worker is told to use /port-changes, this is the skill they should load.
The /port-changes command ports commits from the current worktree session to the main repository. Only use this in worktree sessions.
Every worktree session has these variables injected via system prompt:
-wt-N branch you're working onFollow this workflow exactly when asked to port, sync, or push commits:
Pull remote changes first:
git -C <BASE_REPO> fetch origin <BASE_BRANCH> && git -C <BASE_REPO> pull --rebase origin <BASE_BRANCH>
Then run git -C <BASE_REPO> status. If there are uncommitted changes, stop and tell the user -- another agent may have work in progress. Never run git reset --hard, git checkout ., or git clean on the main repo without explicit user approval.
Read any new commits briefly to understand what changed since your branch diverged.
Rebase your worktree branch onto the main repo's local base branch. Since all worktrees share the same git object store, the base branch is directly visible as a ref -- no fetch needed:
git rebase <BASE_BRANCH>
Resolve all merge conflicts here in the worktree -- this is the safe place to do it.
Once the worktree branch is cleanly rebased with your new commits on top, cherry-pick only your new commits into the main repo:
git -C <BASE_REPO> cherry-pick <commit-hash>
Cherry-pick one at a time in chronological order.
If cherry-pick still conflicts (it shouldn't after a clean rebase), tell the user the conflicting files and ask how to proceed. Do not force-resolve or abort without asking.
Run git -C <BASE_REPO> log --oneline -5 to confirm the commits landed correctly, then push:
git -C <BASE_REPO> push origin <BASE_BRANCH>
git reset --hard <BASE_BRANCH>git -C <BASE_REPO> checkout <BASE_BRANCH> && git -C <BASE_REPO> merge --ff-only origin/<BASE_BRANCH>
After resetting, run the project's unit tests in the worktree to verify nothing broke. If tests fail:
Do NOT report the sync as complete until ALL of the following are true:
If you are working on a quest from this worktree session, do NOT transition it to needs_verification until the sync workflow above is fully complete, the main repo contains the changes, and the branch has been pushed. If sync is still pending, leave the quest in_progress.
testing
Use when the user wants to remember, capture, save, or add a random idea, thought, note, link, reference, decision, or memory to Yuege's Random Memory Hub in Notion.
testing
Cross-session orchestration for Takode. Use when you need to interact with other sessions: listing active sessions, peeking at session activity, reading messages, sending instructions to workers, or spawning new sessions. Triggers: 'check on workers', 'send to session', 'orchestrate', 'coordinate agents', 'list sessions', 'peek at session', 'what are my sessions doing', 'check session status'.
testing
Adversarial review of a worker's completed task. Independently evaluates whether the worker did thorough, honest work or took shortcuts. Returns ACCEPT or CHALLENGE with specific questions. Invoked by the reviewer session after being spawned by the leader.
testing
Use when the user wants to remember, capture, save, or add a random idea, thought, note, link, reference, decision, or memory to Yuege's Random Memory Hub in Notion.