conversation-done
Skill692 starsChanged 6 days agoApache-2.0View on GitHub
Clean up files and resources that aren't part of the agent conversation (e.g. Bazel output base, Git worktree, local/remote branches)
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-ci-failureSkill
- buildkite-get-resultsSkill
- create-newsSkill
- create-prSkill
- merge-prSkill
- monitor-ci-resultsSkill
- process-dependabot-prsSkill
- retry-ci-jobSkill
- review-codeSkill
- rule-creatorSkill
- sync-git-branch-continuouslySkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
When agents work on tasks, several external resources outside the agent conversation directory (~/.gemini/jetski/brain/) are created:
- Distinctive: line 42
When invoked from within the agent's worktree:
- Distinctive: line 93
Main Repository Protection: Never removes the primary Git repository worktree.
- Very specific: line 95
Protected Branches: Never deletes main, master, release/*, or HEAD.
- Very specific: line 97
Upstream Remote Protection: Never deletes branches on upstream.
- Very specific: line 98
No Expunge Rule: Never runs bazel clean --expunge.
- Very specific: line 103
After running the cleanup script, always report to the user what resources were deleted (or would be deleted in --dry-run mode), including:
- Very specific: line 113
If any resources were skipped, left intact via --leave-* flags, or not found, note that briefly in the summary.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Conversation Done Skill
Cleans up external workspace resources created during agent workflows while preserving agent conversation data, chat history, and brain transcripts.
Overview
When agents work on tasks, several external resources outside the agent
conversation directory (~/.gemini/jetski/brain/) are created:
- Bazel Output Base(s): Intermediate build artifacts, execroot trees, and running Bazel server and persistent worker processes (consuming tens of gigabytes of disk and substantial RAM).
- Git Worktree: The checked-out directory on disk.
- Local Git Branch: The feature branch associated with the worktree.
- Remote Git Branch: The feature branch pushed to the user's fork
(e.g.,
origin). - Conversation Name: Once cleanup completes without errors, the active
conversation title is prefixed with
"done "(without duplicating an existing"done "prefix, capped at 70 characters).
This skill safely shuts down active build processes, reclaims these external
resources, and marks the conversation title as "done " without removing the
conversation transcript or chat history.
Script Location
The cleanup script is located at:
./.agents/skills/conversation-done/scripts/cleanup.py
Usage
1. Clean Up Current Workspace
When invoked from within the agent's worktree:
# Preview what would be removed:
./.agents/skills/conversation-done/scripts/cleanup.py --dry-run
# Clean up resources (interactive confirmation if TTY):
./.agents/skills/conversation-done/scripts/cleanup.py
# Force cleanup non-interactively (ideal for agents/scripts):
./.agents/skills/conversation-done/scripts/cleanup.py --force2. Clean Up by Worktree Path or Branches
# By worktree path:
./.agents/skills/conversation-done/scripts/cleanup.py \
--worktree /path/to/worktree --force
# By branch name:
./.agents/skills/conversation-done/scripts/cleanup.py \
--branches my-feature-branch --force
# By multiple branches:
./.agents/skills/conversation-done/scripts/cleanup.py \
--branches branch-one branch-two --force3. Inspect Active Resources
List all worktrees, branches, and Bazel output bases:
./.agents/skills/conversation-done/scripts/cleanup.py --listSelective Cleanup Flags
Fine-tune what gets cleaned up using selective leave flags:
--leave-bazel-output-base: Leave Bazel output bases and build caches intact.--leave-worktree: Leave Git worktree directory on disk.--leave-branch: Keep local Git branch.--leave-remote: Do not delete branch from remote fork.--remote <name>: Override remote destination (default:pushRemoteororigin).
Safety Guarantees
- Main Repository Protection: Never removes the primary Git repository worktree.
- Protected Branches: Never deletes
main,master,release/*, orHEAD. - Upstream Remote Protection: Never deletes branches on
upstream. - No Expunge Rule: Never runs
bazel clean --expunge; shuts down servers gracefully and deletes the specific output base directory directly.
Reporting Results
After running the cleanup script, always report to the user what resources were
deleted (or would be deleted in --dry-run mode), including:
- Bazel Output Base(s): Paths and reclaimed disk space sizes.
- Git Worktree: Removed worktree directory path.
- Local Git Branch: Deleted local branch name.
- Remote Git Branch: Deleted remote branch (
<remote>/<branch>). - Conversation Name: Updated conversation title (prefixed with
"done "after successful cleanup).
If any resources were skipped, left intact via --leave-* flags, or not found,
note that briefly in the summary.
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
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.

