mcpbeat Sign in

Dev Worktree Agent Skill

AI DevKit · Worktree setup and resume guidance for isolated feature work. Use when starting, resuming, switching, or verifying a feature branch/worktree for lifecycle, debugging, implementation, review, or multi-agent workflows.

931 tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1571
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/codeaholicguy/ai-devkit --skill dev-worktree

The instruction itself

6 sections, as written by the author

Dev Worktree

Set up or resume the correct workspace before feature work. Keep this skill focused on repository context, worktree isolation, and dependency bootstrap. Do not perform requirements, design, planning, implementation, testing, or review work here.

Phase Contract

  • Propose the exact workspace plan before changing branch or worktree state.
  • Confirm the target branch/worktree with the user before switching contexts.
  • Use feature-<name> for branch and worktree names, where <name> is normalized kebab-case without the prefix.
  • Prefer a project-local worktree at <project-root>/.worktrees/feature-<name>.
  • Use no-worktree mode only when the user explicitly requests it.
  • Run all follow-up commands in the verified target context.

Start Feature Workspace

Use for a new feature start.

  • Normalize feature name to kebab-case <name>.
  • Determine the project root, the directory containing .git.
  • If the user explicitly requests no worktree:
  • Continue in the current repository and branch.
  • Call out that branch/workspace isolation is reduced.
  • Skip to dependency bootstrap.
  • Otherwise use branch/worktree name feature-<name>.
  • Ensure .worktrees is listed in the project .gitignore; if not, add it.
  • If branch does not exist, run git worktree add -b feature-<name> .worktrees/feature-<name>.
  • If branch exists and the target worktree does not, run git worktree add .worktrees/feature-<name> feature-<name>.
  • If the target worktree already exists, reuse it after verifying it is clean enough for the requested work.
  • Verify worktree context with git -C .worktrees/feature-<name> branch --show-current; it must equal feature-<name>.

10. Return the active workdir path for the next phase.

Resume Feature Workspace

Use when continuing an existing feature.

  • Check current branch with git branch --show-current.
  • Check available worktrees with git worktree list.
  • Prefer <project-root>/.worktrees/feature-<name> when it exists.
  • Otherwise use branch feature-<name> in the current repository.
  • Include the selected target in the plan and wait for approval before switching.
  • After approval, run future phase commands in the selected context.

Dependency Bootstrap

After selecting the target context:

  • Detect ecosystem from lockfiles, manifests, and tooling configs.
  • Prefer deterministic lockfile-based installs.
  • Use the repository-native command:
  • JavaScript/TypeScript: npm ci, pnpm install --frozen-lockfile, yarn install --frozen-lockfile, or bun install --frozen-lockfile.
  • Python: uv sync, poetry install --no-interaction, pipenv sync, or pip install -r requirements.txt.
  • Ruby: bundle install.
  • Rust: cargo fetch, or cargo build when fetch-only is insufficient.
  • Go: go mod download.
  • Java/Kotlin: ./gradlew dependencies, ./gradlew build, or Maven equivalent.
  • If no dependency manager is clearly detectable, continue and state what was checked.

Output

End with:

  • Active workdir.
  • Branch name.
  • Whether worktree or no-worktree mode is active.
  • Dependency bootstrap command run, or why it was skipped.
  • Any workspace risks or blockers.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take codeaholicguy/dev-worktree from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip, npm. Without those the skill loads but fails at the first command.