worktree-retire
Inventory Git worktrees and guide explicit, safe retirement of one verified worktree.
Skill by maheen-ejaz
Chalk Labs
Need help deploying worktree-retire?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maheen-ejaz-worktree-retire
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/worktree-retire
What's inside
- Skill name
worktree-retire- Description
- Inventory Git worktrees and guide explicit, safe retirement of one verified worktree. Invoke explicitly with `/skill:worktree-retire [repository path]`.
- License
- MIT
- Instructions
- 25 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Worktree inventory and retirement Use only when explicitly invoked as `/skill:worktree-retire [repository path]`. If no path is supplied, use the current working directory. Inspect only that repository's linked worktrees. ## Inventory first For every registered worktree, report its exact path, branch or detached state, `HEAD`, owning task metadata when available from `pi-task --list`, dirty/untracked paths, in-progress Git operations, upstream existence, and ahead/behind counts against both its upstream and the live default branch. Resolve the live default branch and SHA with `git ls-remote --symref origin HEAD`; do not trust a possibly stale local `origin/HEAD`. Refresh refs only with `git fetch --no-prune origin` and fetch that exact branch; never prune. Verify the fetched default SHA still matches live HEAD. If the current default cannot be resolved or keeps moving, stop before proposing removal. Classify each worktree using these dispositions: `active`, `preserve-dirty`, `preserve-unmerged`, `blocked-ownership`, or `ready-for-admin-retirement-review`. A missing remote branch, old timestamp, closed ticket, clean status, or lack of a running Pi process is not proof that a worktree is unused. If ownership or activity is uncertain, preserve it. Where a user decision can safely resolve uncertainty, use `ask_user_question` to offer inspection, owner/activity confirmation, or leaving it unchanged; do not offer removal until all eligibility checks pass. ## Retirement eligibility Do not propose removal for a dirty or untracked worktree, an in-progress Git operation, a detached/ambiguous worktree, a branch with commits not integrated into the current default branch, a worktree known to be active, or a worktree whose owner is unknown. Do not remove the repository's canonical default-branch checkout. Do not use `git worktree prune`, broad cleanup, age-based deletion, or `--force`. For a clean, attached, fully integrated, non-default worktree, present its exact path, branch/ref, current `HEAD`, owner/task metadata, and what removal will do. Ask the user with `ask_user_question` whether to inspect further, keep it, or remove that exact worktree. The approval must bind to the displayed path, branch/ref, and `HEAD`; approval for one worktree never authorizes another. Immediately before an approved removal, refresh and resolve the live default again, then revalidate repository identity, exact path, branch, `HEAD`, clean/untracked status, integration with the current default branch, owner confirmation, and absence of in-progress operations. If the default or any other checked state changed, stop and ask again. Use `git worktree remove <exact-path>` without force, then verify the path is gone and the registration is gone. Never delete the branch as part of worktree removal; branch deletion is a separate operation requiring its own exact approval. For a stale registration whose directory is already missing, report it as blocked for separate exact repair. Do not run `git worktree prune`. ## Completion Report all inspected worktrees and their dispositions, any exact approved removal, and why every other candidate was preserved. If no worktree qualifies, make no changes and say so.
From maheen-ejaz/pi-agent-config, MIT.
More from maheen-ejaz/pi-agent-config
- 0.529score
bb-cli
maheen-ejaz
Use this when controlling bb.
SkillBFreshness: BClaude Code +9 - 0.526score
repo-audit
maheen-ejaz
Run an explicit user-invoked repository audit in daily, weekly, or report mode against any repository.
SkillBFreshness: BClaude Code +9 - 0.524score
tdd
maheen-ejaz
Run strict test-driven development only when the user explicitly invokes the skill using Pi's `/skill:tdd` syntax.
SkillBFreshness: BClaude Code +9 - 0.521score
i-have-adhd
maheen-ejaz
Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time…
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-delivery
maheen-ejaz
Deliver one explicitly identified Linear ticket through implementation, merge, release, and production validation.
SkillBFreshness: BClaude Code +9 - 0.521score
infisical-credential-access
maheen-ejaz
Automatically govern credential-backed work through repository-declared Infisical runners.
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-operations
maheen-ejaz
Automatically standardize every Linear issue read, search, create, edit, comment, metadata, relation, archive, unarchive, or delete operation with…
SkillBFreshness: BClaude Code +9 - 0.521score
main-sync
maheen-ejaz
Inspect and safely align one Git repository's canonical main checkout with its fetched origin default branch.
SkillBFreshness: BClaude Code +9 - 0.516score
resolving-merge-conflicts
maheen-ejaz
Resolve a real Git merge or rebase conflict by preserving the intended behavior from both sides.
SkillBFreshness: BClaude Code +9 - 0.516score
diagnosing-bugs
maheen-ejaz
Diagnose a hard bug or performance regression through a tight reproducible feedback loop.
SkillBFreshness: BClaude Code +9 - 0.516score
wayfinder
maheen-ejaz
Create a bounded decision map for a huge, foggy effort without starting implementation.
SkillBFreshness: BClaude Code +9 - 0.516score
writing-for-agents
maheen-ejaz
Write concise agent-facing instructions with clear triggers, ownership, and completion criteria.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maheen-ejaz/pi-agent-config
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maheen-ejaz
- 0.529score
bb-cli
maheen-ejaz
Use this when controlling bb.
SkillBFreshness: BClaude Code +9 - 0.526score
repo-audit
maheen-ejaz
Run an explicit user-invoked repository audit in daily, weekly, or report mode against any repository.
SkillBFreshness: BClaude Code +9 - 0.524score
tdd
maheen-ejaz
Run strict test-driven development only when the user explicitly invokes the skill using Pi's `/skill:tdd` syntax.
SkillBFreshness: BClaude Code +9 - 0.521score
main-sync
maheen-ejaz
Inspect and safely align one Git repository's canonical main checkout with its fetched origin default branch.
SkillBFreshness: BClaude Code +9 - 0.521score
i-have-adhd
maheen-ejaz
Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time…
SkillBFreshness: BClaude Code +9 - 0.521score
linear-ticket-operations
maheen-ejaz
Automatically standardize every Linear issue read, search, create, edit, comment, metadata, relation, archive, unarchive, or delete operation with…
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get worktree-retire running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
worktree-retire skill. Agent Mart. https://agentmart.dev/skills/maheen-ejaz-worktree-retire (last updated 2026-10-24)