flow-sync
Flow: Sync - Push WIP to Remote for Cross-Machine Pickup - Push the current branch to the remote so you can continue work on another machine.
- License 许可
- MIT
- 所属仓库
- cooneycw/skillc
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- flow-sync
- description
- Flow: Sync - Push WIP to Remote for Cross-Machine Pickup - Push the current branch to the remote so you can continue work on another machine.
03 SKILL.md 正文
<!-- GENERATED by claude-power-pack - scripts/codex-skill-sync.py; edit .claude/commands/flow/sync.md instead -->
Flow: Sync - Push WIP to Remote for Cross-Machine Pickup
Push the current branch to the remote so you can continue work on another machine. Optional feature - most users won't need this.
Arguments
None. Operates on the current worktree/branch.
Instructions
When the user invokes /flow-sync, perform these steps:
Step 1: Validate Context
# Ensure we're in a git repo
git rev-parse --show-toplevel
# Get current branch
BRANCH=$(git branch --show-current)
- If on
mainormaster: STOP. Report: "Cannot sync main branch. Use/flow-start <issue>to create a worktree first." - If not on an
issue-*branch: Warn but allow (user may have custom branch names).
Step 2: Check for Uncommitted Changes
# Check working tree status
git status --short
- If clean: Skip to Step 3.
- If dirty (uncommitted changes): Auto-commit as WIP:
Report: "Auto-committed WIP changes."git add -A git commit -m "wip: sync work in progress Auto-committed by /flow-sync for cross-machine pickup. This commit will be squash-merged - no need to clean up."
Step 3: Push to Remote
git push -u origin "$BRANCH"
- If push fails (e.g., rejected): Report the error and suggest
git pull --rebase origin "$BRANCH"to resolve.
Step 4: Output
Synced branch to remote.
Branch: issue-42-fix-login-bug
Remote: origin
To continue on another machine:
/flow-start 42
→ Detects remote branch and creates worktree from it
Error Handling
- Not in a git repo: Report error clearly.
- On main branch: Block sync, suggest
/flow-start. - Push rejected: Suggest
git pull --rebaseto reconcile. - No remote configured: Report "No remote 'origin' found."
Notes
- This command is intentionally simple - just commit WIP + push.
- Cross-machine sync operates on the
issue-<N>-<slug>branch, not on worktree paths, so the visible-sibling worktree location (per-workstation, outside the repo, issue #627) does not affect it. /flow-startalready handles the receiving end: it detects the remote branch and, on the git lane (issue #627), adds a worktree tracking it withgit worktree addat the visible sibling<parent>/<repo>-<branch>(or$FLOW_WORKTREE_BASEwhen set) and enters it withcd.- WIP commits are harmless because
/flow-mergeuses squash-merge, collapsing all commits into one clean commit. - No configuration required - works with any git remote.
04 同仓库更多 Skills
tiny-check
Run the tiny project check
tiny-check
A synthetic gate selection fixture.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.
flow-check
Use when you are asked to run a project's quality checks (tests, lint, type checks, security scan): runs them in one step and reports what failed, without committing.