# Retire instance

> Retire instance is an open-source agent skill for developer tools. Removes a finished one-shot agent instance: its aweb identity, workspace, worktree. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/awebai/aweb/tree/main/naapp/folio/.agents/skills/retire-instance
- **Repository:** https://github.com/awebai/aweb
- **GitHub stars:** 132
- **License:** MIT
- **Skill name:** retire-instance
- **Collection:** https://github.com/awebai/aweb
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill tears down a short-lived teammate agent once its job is over, such as a developer whose branch has merged or a reviewer that has delivered its verdict. It deletes the instance's aweb workspace and identity first, then removes its git worktree, local home directory and branch, and finally prunes stale worktree entries from the repository.

Before any deletion, the skill asks the agent to confirm that useful branch work is merged or pushed and that anything the instance learned has been committed to its soul files, referring to a separate self-maintenance skill for that step. It uses the aw command-line tool and standard git commands, and it is written to run from outside the instance's own home directory.

The skill expects the aw CLI and git to be available, plus the instance name and access to the repository that holds the agents directory. Standing coordinator instances are explicitly excluded and are not meant to be retired this way.

## When your agent uses it

> 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).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/awebai/aweb/tree/HEAD/naapp/folio/.agents/skills/retire-instance)
- [License: MIT](https://github.com/awebai/aweb/tree/HEAD/naapp/folio/.agents/skills/retire-instance)

## Features

- **Workspace and identity removal:** Deletes the instance's aweb workspace and identity through the aw workspace delete command.
- **Worktree and branch cleanup:** Removes the instance's git worktree, its local branch and the instance home directory.
- **Pre-deletion preservation check:** Reminds the agent to merge or push branch work and commit learned notes before removing anything.
- **Roster safety guard:** Explains not to delete the home directory while the server still lists the member as active.
- **Stale member recovery:** Points to the dashboard for removing a member whose instance died before cleanup.

## Good for

- Clean up a developer agent whose feature branch has been merged
- Retire a reviewer agent after it has delivered its verdict
- Remove a finished worker instance from the aweb team roster
- Delete a leftover agent worktree and its branch from the repository

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/retire-instance` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awebai/aweb.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/retire-instance &&
cp -R "$tmp/naapp/folio/.agents/skills/retire-instance" ~/.claude/skills/retire-instance &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/retire-instance` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/retire-instance` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awebai/aweb.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/retire-instance &&
cp -R "$tmp/naapp/folio/.agents/skills/retire-instance" ~/.agents/skills/retire-instance &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/retire-instance` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/retire-instance` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awebai/aweb.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/retire-instance &&
cp -R "$tmp/naapp/folio/.agents/skills/retire-instance" ~/.cursor/skills/retire-instance &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/retire-instance` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/awebai/aweb.git --path naapp/folio/.agents/skills/retire-instance
```

Or copy the folder to `~/.gemini/skills/retire-instance` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/retire-instance`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awebai/aweb.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/retire-instance &&
cp -R "$tmp/naapp/folio/.agents/skills/retire-instance" ~/.copilot/skills/retire-instance &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/retire-instance` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/awebai/aweb.git
```

Then copy `aweb/naapp/folio/.agents/skills/retire-instance` into your agent's skills folder as `retire-instance`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Retire instance be used?

When an instance's job is done, such as a developer whose branch merged or a reviewer that gave its verdict. Standing coordinator instances are not retired this way.

### Why not use aw id team leave?

Leave refuses an identity that is the only member of its team, so the skill uses aw workspace delete instead.

### What should I do if the server says the workspace is still active?

Wait and retry, since the service may not have marked it stale yet. The local directory should not be removed until the server no longer considers the member active.

### How do I install Retire instance in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/retire-instance to use it in all your projects, or to .claude/skills/retire-instance in one project.

### Does Retire instance run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Retire instance?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Retire instance?

The closest alternatives to Retire instance are Spawn instance, Aweb coordination, Git clean worktrees, Git branch cleanup and Git post merge cleanup.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Spawn instance](https://ai-powered.com/skills/spawn-instance): Spawn instance is an open-source agent skill for developer tools.
- [Aweb coordination](https://ai-powered.com/skills/aweb-coordination): Aweb coordination is an open-source agent skill for developer tools.
- [Git clean worktrees](https://ai-powered.com/skills/git-clean-worktrees): Git clean worktrees is an open-source agent skill for developer tools.
- [Git branch cleanup](https://ai-powered.com/skills/git-branch-cleanup): Git branch cleanup is an open-source agent skill for developer tools.
- [Git post merge cleanup](https://ai-powered.com/skills/git-post-merge-cleanup): Git post merge cleanup is an open-source agent skill for developer tools.
- [Deprecation and migration](https://ai-powered.com/skills/deprecation-and-migration): Deprecation and migration is an open-source agent skill for developer tools.
- [Deprecation](https://ai-powered.com/skills/deprecation): Deprecation is an open-source agent skill for developer tools.
- [Executed prompt not retired sibling redoes it](https://ai-powered.com/skills/executed-prompt-not-retired-sibling-redoes-it): Executed prompt not retired sibling redoes it is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/retire-instance
