All four git-feature-* skills hardcoded /Users/torcsi/dev/kicad-wasm/ for
the helper-script invocations and one documentation example. That path
only resolved on the original author's machine — anyone else picking up
/git-feature-{start,commit,sync,finish} would hit "No such file or
directory" before the first pre-flight check ran.
Replaces the absolute paths with relative ones (`bash scripts/...`) and
rewrites the rebase-conflict handoff message in git-feature-sync.md to use
`git -C kicad ...` style instead of a hardcoded cd.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2.6 KiB
| name | description |
|---|---|
| git-feature-start | Create a new feature branch across all 3 repos (root + kicad + wxwidgets submodules). Fetches each repo's main, fast-forward pulls, and creates the same feature branch in each. Usage - "/git-feature-start <branch-name>", e.g. "/git-feature-start feature/new-foo". |
git-feature-start
Create a new feature branch in all 3 repos (root, kicad submodule, wxwidgets submodule), based on each repo's main branch.
Per-repo main mapping (hardcoded in scripts/git-workflow/repos.sh):
- root →
main - kicad →
wasm-port - wxwidgets →
wasm-port
Arguments
A single positional argument: the feature branch name (e.g. feature/my-thing).
If the user invoked the skill without a branch name, ask for one via AskUserQuestion before proceeding.
Steps
-
Pre-flight: assert all 3 repos are clean. Run
bash scripts/git-workflow/assert-clean.sh. If it exits non-zero, STOP and tell the user which repos are dirty and that they need to commit, stash, or discard before starting a new feature. -
Pre-flight: check no repo is already on a non-main branch. Run
bash scripts/git-workflow/repo-status.shand inspect each line'sbranchfield. If any repo'sbranchis not itsmain(or is empty meaning detached HEAD), STOP and tell the user. Suggest:/git-feature-syncif they're already mid-feature, or manually checkout the main in that repo first. Do NOT silently switch off in-progress work. -
For each repo in order [root, kicad, wxwidgets], run these commands. Echo what you're about to do in chat before each repo.
git -C <path> fetch origingit -C <path> checkout <main>git -C <path> pull --ff-only origin <main>git -C <path> checkout -b <branch-name>— this hits theaskpermission rule, so it will prompt. Also, you should prose-ask the user "About to create branch<name>in — proceed?" before invoking it (belt + suspenders per project rule).
-
Report. Print a summary table:
root: created <branch> from main@<sha> kicad: created <branch> from wasm-port@<sha> wxwidgets: created <branch> from wasm-port@<sha> -
Suggest
/git-feature-commitas the next step when the user has changes to record.
Failure handling
If any step fails partway (e.g. checkout fails in wxwidgets after root and kicad succeeded), STOP and report exactly which repos already have the new branch and which don't. The user can manually finish or /git-feature-finish won't run until all 3 are aligned anyway.
Safety
- Never use
-f/--forceflags. - Never delete branches in this skill.
- Always echo the command before running it.