/yka-code:worktree-taskfrom yka-code
[yka-code] One-worktree-per-task workflow using `EnterWorktree` / `ExitWorktree`. Activate when the user asks to work on a feature/fix in isolation, mentions "parallel branches", "keep master clean", "don't touch the current working tree", or when `/do:ship-feature` is about to start a net-new feature. Also activate when multiple concurrent tasks are running and their file edits could collide.
Ships in yka-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude Code's EnterWorktree / ExitWorktree tools let a session switch into an isolated git worktree for the duration of a task. Unlike plain git worktree add, the session's cwd, cache, and auto-memory all move with it — changes never leak into the main tree, and concurrent teammates can work the same repo without stomping each other.
| Trigger | Worktree? |
|---|---|
Net-new feature (/do:ship-feature kicking off) | Yes — default. One task, one worktree. |
| Bug fix that touches ≥3 files | Yes — fewer merge surprises. |
| Multiple agents running in parallel on the same repo | Yes, per agent. Prevents cross-contamination. |
| Single-file typo / doc tweak | No. Worktree overhead > value. |
Refactor that spans most of src/ | No — branch directly; worktree adds friction without isolation gain. |
| Reading / exploring without edits | No. |
feat-rate-limiter, fix-auth-timeout, chore-weekly-sweep.EnterWorktree with the branch name. Claude Code creates <repo>/.worktrees/<branch> (or respects worktree.symlinkDirectories / worktree.sparsePaths) and switches cwd in.WorktreeCreate hook is installed, it fires post-switch — use it to seed .envrc with scrubbed secrets, skip node_modules hydration, etc.ExitWorktree. Claude switches back to the main tree. If the PR was squash-merged, the worktree may be auto-cleaned (CC v2.1.105 cleanup-on-squash-merge behavior).ExitWorktree, then git worktree remove .worktrees/<branch> --force and delete the branch (git branch -D <branch>).ExitWorktree is idempotent — you can re-enter later with EnterWorktree({ path: ".worktrees/<branch>" }) (v2.1.105+).When /do dispatches multiple subagents (e.g. feature-dev's code-explorer + code-architect in parallel), each subagent should own its own worktree. Pattern:
feat-X worktree.isolation: "worktree" → runs in .worktrees/feat-X-agent-A.feat-X via git, then ExitWorktree on the subs.This avoids the classic failure mode where two agents both edit types.ts and the second silently overwrites the first.
WorktreeCreate — seed sanitized env into the new tree (.envrc, .mcp.json replica without live tokens).WorktreeRemove — shred .env.local, archive final diff to session log before tree is gone.Both hooks are supported from v2.1.74+. Install them only once worktree-first is the default pattern for the project — otherwise they rarely fire.
feat-X worktree for feat-Y just because it's warm.ExitWorktree before closing the session. Stale cwd in a removed worktree breaks the next --resume.master from within a worktree. HEAD points at the worktree's branch; verify with git branch --show-current before commit.worktree.sparsePaths in settings.json to skip node_modules/target/dist in secondary trees — massive disk + hydration win.ExitWorktree — subsequent commands run in stale cwd; cache lookups fail mysteriously.ship-feature — worktree per feature is the default entry.fix-bug — worktree per multi-file fix.claude-mem:version-bump — release branches always live in their own worktree.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (youssefkadaouiabbassi/yka-code) — no native marketplace selected
npx claudepluginhub p/youssefkadaouiabbassi-code-tools-setup20 skills in this plugin
/audit-rigor[yka-code] Discipline for audit, review, and technology-comparison tasks. Use when the request is "audit X", "review our stack", "is this the best option", "compare alternatives", "what should we swap / add / drop", or any task that produces prioritized recommendations rather than new code. Enforces a ≥70% confidence threshold, delegate-retrieval-to-subagent pattern, inline citations with ISO dates, MCP-first sourcing, and a fixed output format (SWAP / ADD / DROP / KEEP-BUT-UPGRADE / SURPRISE). Pair with research-first (retrieval discipline) and karpathy-guidelines (surgical scope). Chained from security-audit, onboard-codebase, and any /do route that smells like "is this the best we have"./ci-hygiene[yka-code] CI/CD and DevOps hygiene enforcer. Activates when editing GitHub Actions workflows, Dockerfiles, docker-compose, justfile, deploy scripts, or any CI configuration. Enforces pinned versions, proper Claude Code invocation in CI (--bare, API key not Max sub), secret management, and reproducibility. Fills the DevOps gap — no plugin covers this in the wild./coding-style[yka-code] Enforce minimalist, self-documenting, defensively-sane coding style. Use ALWAYS when writing, editing, or reviewing ANY code in ANY language — every function, every edit, every diff, no exceptions. Covers five rules: (1) no comments unless critical (WHY only, never WHAT, never history), (2) clean + optimized (no dead code, no speculative abstractions, no stale imports, delete over deprecate), (3) self-documenting names (full words, verbs for functions, nouns for data), (4) smallest surface (one function one concern, extract only on 3rd reuse, validate only at boundaries), (5) no dead defense (no try/catch for impossible cases, no fallbacks for inputs you control, let errors bubble to the right handler). Pair with karpathy-guidelines for behavioral principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution).Other plugins' skills for the same job