agentleFS
sblueminsbluemin/fleet-harness/.claude/skills/git-worktree/SKILL.md

git-worktree

Skill17 starsChanged 58 days agoMITView on GitHub

Create a canary-based worktree for Fleet changes, create a detached baseline for revision comparison or bisect, or remove an owned dedicated checkout. Use rebase-on-canary to refresh an existing branch; ordinary read-only investigation needs no new worktree.

  • Installs packages

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use grill-with-docs, caveman and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    grill-with-docs

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

    Also in 4 projects that use this

  • MicrosoftSkill

    caveman

    Ultra-compressed response style that reduces output token count while preserving technical accuracy, with intensity levels and auto-clarity safety rules

    Also in 3 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 3 projects that use this

  • AWSSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 4 projects that use this

  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

  • VercelSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never remove the main checkout.

    line 23
  2. Distinctive:

    Never create or preserve a new-worktree symlink targeting main-checkout content.

    line 24
  3. Very specific:

    Never replace colliding paths/branches automatically.

    line 25
  4. Distinctive:

    Do not skip path, ownership, or branch-protection checks.

    line 36
  5. Distinctive:

    After creation, every edit/command uses the absolute worktree path.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Worktree

Interpret the request as create or remove. Creation defaults to a branch for repository changes; use the detached baseline route only when the task needs a separate historical revision for comparison or bisect. A baseline is read-only source, not an implementation checkout. Ask only when the intended action or revision is unclear. Never adopt another session's worktree or overwrite an existing path.

Inputs

  • <worktree-name>: the directory under .fleet/worktrees/. Infer a task-specific name when absent; when only a branch is given, use it with / replaced by -.
  • <new-branch>: branch creation only; defaults to <worktree-name>. May carry one Conventional Commits type prefix (fix/<name>, feat/<name>), as on the remote; a flat name is equally valid.
  • <base-branch>: branch creation only; defaults to canary. Reject main/master; ask before using any other base.
  • <revision>: baseline creation only; the task's specific commit or ref, resolved once to a full commit SHA. No implicit canary fallback and no new branch.
  • <delete-remote>: branch removal only; defaults to no. Set yes only for explicit remote-cleanup requests.
  • <force>: branch removal defaults to yes. With explicit no, do not force-remove the worktree or force-delete its branch; report the blocked state. Baseline removal never uses force.

Trim names and replace internal spaces with -, preserving deliberate capitalization. A segment matches [A-Za-z0-9._-]+ without .., a leading ., or a trailing .lock; reject everything else, including backslashes and shell metacharacters. The directory name is exactly one segment. A branch name is one segment or <type>/<segment> with <type> a lowercase Conventional Commits type (fix, feat, …); reject any other /. Neither a new nor deleted branch may be main/master/canary.

Safety boundaries

  • Never remove the main checkout. Stop before removal commands for protected-branch worktrees too.
  • Never create or preserve a new-worktree symlink targeting main-checkout content. pnpm links within the new worktree or to an external package store are allowed.
  • Never replace colliding paths/branches automatically. Do not use reset --hard, forced file restoration, or hook bypasses to clean up.
  • Removal requires a request targeting the owned dedicated worktree, authorized post-merge cleanup, or an explicitly disposable baseline created for the current task. Inspect and disclose dirty/unpushed/unmerged state first; branch force cleanup stays within that authority. A general task request or reading this skill as a reference does not authorize deletion.

Execution routes

ModeRead before executionCompletion condition
create branchCreateNew checkout from remote base, successful internal pnpm install --frozen-lockfile, subsequent commands fixed to its path
create baselineBaselineDetached checkout at the recorded commit, ownership evidence saved, required preparation completed
removeRemove; it routes baselines separatelyVerified removal, branch/remote outcome or baseline evidence reported

Do not skip path, ownership, or branch-protection checks. Execute this lifecycle directly through Bash rather than creating temporary helper scripts. Stop immediately on installation failure in either creation route; do not call the worktree ready. On removal failure, report exactly what remains.

After creation, every edit/command uses the absolute worktree path. Set the execution root for background commands too; a green check in the main checkout is not evidence. Reading main-checkout status to detect leaked edits is an explicit read-only exception.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.