agentleFS
ShakhzodbekBabakulovShakhzodbekBabakulov/worktree-guard/skills/done/SKILL.md

done

Skill1 starsChanged 3 months agoMITView on GitHub

Safely remove this task's proven-merged workspace and local/remote feature branches on the user's /done request. Never cleans other tasks.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use learn, systematic-debugging and 1 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.
  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

  • OpenAISkill

    systematic-debugging

    Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 1

    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:

    If cleanup stops, preserve remaining work and report each completed step accurately: a later failure does not undo earlier progress.

    line 21
  2. Very specific:

    Verify workspace registrations, local branches and exact remote branch absence from the surviving checkout.

    line 22

“Common” is measured: kept by at least 6 in 10 of the 18 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

/done — clean up finished work

Host: {{WG_HOST}}. The user's /done authorizes cleanup of this task only. Respect project instructions and host permissions.

  1. Inspect Git status, registered worktrees and the task's review. Identify the exact finished branch/workspace. Ask only if several targets are plausible. Never sweep all workspaces or infer completion from an old PR alone.
  2. Move the host task away from a directory that will be deleted, using native handoff/exit-worktree controls where available, and verify its new location. If this task cannot move itself, explain the native UI step and wait. A shell cd alone does not relocate a desktop task. Terminal-only hosts must run cleanup from the surviving primary checkout.
  3. Preview the selected operation:

    {{WG_HELPERS}}/worktree-cleanup --worktree <finished-path> --dry-run

    For a leftover branch without a workspace use --branch <exact-branch>. Preview does not fetch/change refs. If remote evidence is stale, fetch origin from the surviving checkout and repeat.

  4. Run the same command without --dry-run after the preview confirms the target. The helper proves the latest exact commit landed (normal or squash), refuses newer remote commits/default divergence, preserves ignored/private and unsaved files, and never removes the primary folder. Never bypass refusals with force or manual deletion.
  5. If cleanup stops, preserve remaining work and report each completed step accurately: a later failure does not undo earlier progress. Coordinate app-managed directory removal through supported host controls; never leave the task pointing into a deleted folder or archive unrelated tasks.
  6. Verify workspace registrations, local branches and exact remote branch absence from the surviving checkout. Report what disappeared and what remains. Next: /work for the next feature.

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.