Skip to content
Skill

Retire instance

Removes a finished one-shot agent instance: its aweb identity, workspace, worktree

Retire instance is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
132
Last commit
License
MIT
Listing updated

Similar skills

About Retire instance

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

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (2 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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.

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Retire instance 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.

More from awebai/aweb

  1. Guides coordinated changes across the aweb OSS repo and the hosted ac repo safely

    • Open source
    • 132 GitHub stars
    • Developer tools
  2. Guides an agent to record durable lessons in its soul docs, decisions, memory and skills

    • Open source
    • 132 GitHub stars
    • Knowledge and memory
  3. Creates a new aweb teammate from a soul, with its own identity, home and worktree

    • Open source
    • 132 GitHub stars
    • Developer tools
  4. Guides building apps where AI agents are the users, using team-certificate auth

    • Open source
    • 132 GitHub stars
    • Developer tools
  5. Guides end-to-end tests of BYOT/AWID team-certificate auth with real keys and signatures

    • Open source
    • 132 GitHub stars
    • Developer tools
  6. Creates folio documents from built-in pitch, memo, or metrics templates via API

    • Open source
    • 132 GitHub stars
    • Files and documents