close

Tears down a job's git worktree, runtime stack, and branch after safety gates pass.

1|Updated Jul 21, 2026
One-click install
npx skills add https://github.com/fallguyconsulting/ok-plugins --skill close-fallguyconsulting
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: close
Source: https://github.com/fallguyconsulting/ok-plugins/tree/main/plugins/ok/families/ok-workspaces/skills/close
Command: npx skills add https://github.com/fallguyconsulting/ok-plugins --skill close-fallguyconsulting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing a job's workspace by hand risks destroying uncommitted work or deleting an unmerged branch, since a worktree is the only record of its uncommitted changes. This Skill enforces safety gates before any teardown so nothing is lost silently. ## Core Features & Use Cases - Safety Gates: Refuses to proceed when the worktree has uncommitted changes or the job branch is not fully merged into the remote's actual integration branch (resolved via git ls-remote --symref origin HEAD). - Scoped Runtime Teardown: Stops the workspace's docker-compose stack with a project-scoped down --volumes, or reports still-listening dev-server processes without killing them. - Clean Removal: Removes the worktree without --force and deletes the branch with git branch -d, then reports what was torn down, the surviving merge commit, and any leftovers. - Use Case: After finishing a feature job in an isolated worktree, run /close <job> to verify the work is committed and merged, then tear down the stack, worktree, and branch in one safe operation. ## Quick Start Ask the assistant to close the workspace for job slug "auth-refactor" by running /close auth-refactor.

Frequently Asked Questions about close

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove a git worktree and its branch?▼

Verify the worktree has no uncommitted changes with git status --porcelain and confirm the branch is merged into the integration branch, then run git worktree remove and git branch -d. This Skill automates those checks and refuses to proceed if either gate fails.

How do I check if a branch is merged before deleting it?▼

Resolve the remote's integration branch with git ls-remote --symref origin HEAD, then use git branch --merged or git cherry to confirm the job branch is fully contained. If unmerged commits remain, merge or explicitly abandon the branch before teardown.

Why does workspace teardown refuse to run on my job?▼

Teardown stops when the worktree has uncommitted changes or the branch is not fully merged into the integration branch. Commit or explicitly discard the work, merge the branch, then re-run the close command.

Does closing a workspace stop its docker-compose stack?▼

Yes, for docker-compose runtimes it runs docker compose -p <projectPrefix>-<job> down --volumes, scoping teardown to that workspace's stack. For dev-server runtimes it only reports still-listening processes instead of killing them.

Can I force-close a workspace with uncommitted work?▼

Only an explicit user instruction to discard the work overrides the gates; the Skill never bypasses them on its own judgment. Even then it does exactly what was authorized and nothing broader.