skills/devel/impl-via-git-worktree/SKILL.md
Manual invocation only; use only when the developer explicitly requests `impl-via-git-worktree` or asks for implementation in a fresh local branch/worktree. Snapshot the current repository state into a new local `feature/topic-slug` or `fix/topic-slug` branch, create a separate git worktree, bridge the ignored local resources that worktree needs, implement and test there, and commit the result without pushing. If the target is an OpenSpec change or a path under `openspec/changes/`, derive the change from that target and, once inside the worktree, use OpenSpec tooling plus `openspec-apply-change` there instead of manually assuming artifact paths.
npx skillsauth add igamenovoer/magic-context impl-via-git-worktreeInstall 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.
Manual invocation only: use this skill only when the developer explicitly wants this workflow.
Implement a change in an isolated worktree without disturbing the active checkout. Carry the current dirty repository state forward into a new local branch, bridge the local-only state the worktree needs, and do all edits, builds, and tests from inside that worktree.
Unless the developer says otherwise, use these defaults:
fix for broken behavior, regressions, failing tests, or bug repairs; otherwise use feature<branch-kind>/<topic-slug><repo-root>/.agent-automation/impl-branches/<branch-kind>/<topic-slug><impl-home>/repo.claude, .codex, .gemini, .github, .aider, .cursor, .continue, .windsurf, .kiro; also .pixi when the repository appears Pixi-managed and .pixi/ exists locallyIf this skill creates .agent-automation/impl-branches/, add it to .gitignore. If .gitignore already has commented impl-branches entries, do not auto-add the rule.
fix for repairs, feature for new behavior or refactors.When the target is an OpenSpec change, use this special-case path instead of assuming a normal repository task flow.
openspec/ that clearly points to a change, especially openspec/changes/<change-name>/..., as an explicit OpenSpec target signal.openspec list --json before proceeding.$openspec-apply-change there.Use the bundled helper instead of inventing the Git plumbing ad hoc:
bash <skill-dir>/scripts/create_impl_worktree.sh --topic TOPIC_SLUG --kind feature
For repair work, switch --kind fix:
bash <skill-dir>/scripts/create_impl_worktree.sh --topic TOPIC_SLUG --kind fix
Optional arguments:
bash <skill-dir>/scripts/create_impl_worktree.sh \
--repo PATH \
--topic TOPIC_SLUG \
--kind feature \
--branch feature/TOPIC_SLUG \
--impl-home IMPL_HOME \
--path WORKTREE_PATH \
--link-dir RELATIVE_DIR
If the helper reports that the branch or path already exists, stop and choose whether to continue that existing isolated session or create a new topic slug. Do not silently reuse or overwrite an existing worktree.
cd into the WORKTREE path returned by the helper.openspec commands or edit change artifacts.When the target is an OpenSpec change, use this special-case path instead of assuming a normal repository implementation flow.
proposal.md, design.md, or tasks.md exist just because the user pointed at an OpenSpec-looking path.openspec status --change "<change-name>" --json.$openspec-apply-change inside the worktree to drive the implementation loop.$openspec-apply-change own artifact discovery, context-file reading, task progression, and checkbox updates while this skill continues to own the isolated branch/worktree boundary.git status in the worktree before committing.feat: or fix: matching the branch kind.$openspec-apply-change from inside the worktree.git worktree.<skill-dir>/scripts/create_impl_worktree.sh: Create the implementation branch/worktree from the current repository state and safely link reusable local-state directories.Use $impl-via-git-worktree to implement this feature in a fresh local worktree and commit it there without pushing.Use $impl-via-git-worktree to fix the failing runtime bug on a local fix branch, run the relevant tests from inside that worktree, and leave the branch local for review.Use $impl-via-git-worktree for this refactor, keep my active checkout untouched, and tell me which extra local directories had to be linked into the worktree.Use $impl-via-git-worktree on openspec/changes/<change-name>, create a local worktree for it, and then use $openspec-apply-change inside that worktree to implement the remaining tasks.data-ai
Create readable Mermaid diagrams inside Markdown files. Use for flowcharts and sequence diagrams that must render cleanly in common Markdown renderers (e.g., GitHub) without horizontal scrolling. Covers fenced mermaid blocks, init/theme styling, label wrapping with <br/>, and sequenceDiagram layout rules (short IDs, wrapped labels, don’t break identifiers).
development
Manual invocation only; use only when the user explicitly requests `make-program-tutorial` by exact name, OR when the user asks to use a skill to create an SDK/API/library tutorial. Create a clear, reproducible, step-by-step tutorial for a specific API/SDK/library (or a set of functions/classes), with runnable examples, expected outputs, and basic troubleshooting.
testing
Use when the user wants to create a self-hosted, offline-installable Conda channel (mirror) containing a specific subset of packages using Pixi.
tools
Guides the agent to setup a new or existing Pixi environment for compiling C++ and CUDA code. It ensures the correct compilers, toolkits, and CMake configurations are in place for a robust user-space build.