Skip to content
Back to skills

Retire Instance

ASecurity

Remove a teammate — delete an instance's aweb identity and workspace, then its home, worktree, and branch. Use when an instance's job is done (a developer whose branch merged, a reviewer that gave its verdict).

  • 110 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
ai-agentsbashgit

Security analysis

A93/100
  • highPerforms destructive filesystem operations

Pro shows the line behind each finding and how to fix it

Scanned September 25, 2026

npx -y skills add awebai/aweb --skill retire-instance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Retire Instance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Retire Instance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/awebai-retire-instance/badge)](https://www.skillsdirectory.com/skills/awebai-retire-instance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: retire-instance
description: Remove a teammate — delete an instance's aweb identity and workspace, then its home, worktree, and branch. Use when an instance's job is done (a developer whose branch merged, a reviewer that gave its verdict).
---

# Retire an instance

One-shot instances are retired when their job is done, so teammates don't
pile up on the network. Standing instances (the coordinator) are
long-running and not retired this way.

**Preserve first.** Before removing anything, make sure useful branch work
is merged or pushed, and anything the instance learned that belongs in its
soul is committed (see `self-maintenance`).

Run from outside the instance (e.g. your own home):

```bash
name=<name>
REPO="$(cd "$(git rev-parse --git-common-dir)" && cd .. && pwd)"
inst="$REPO/agents/instances/$name"

( cd "$inst" && aw workspace delete "$name" )            # workspace + identity (run from ITS home)
git -C "$REPO" worktree remove "$inst/work" --force 2>/dev/null   # if it had a worktree
rm -rf "$inst"
git -C "$REPO" branch -D "$name" 2>/dev/null
git -C "$REPO" worktree prune
```

Use `aw workspace delete`, **not** `aw id team leave` — leave refuses an
identity's only team. If it answers 409 "Workspace is still active", the
service hasn't marked it stale yet: wait and retry before removing the
local directory — **never delete the home while the server still considers
the member active**, or it orphans in the roster. If the instance died
before cleanup, remove the stale member via the dashboard.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.