Deletes a specified workspace and its git worktrees after checking repositories for uncommitted changes or unpushed commits, prompting confirmation if issues found.
From workspacesnpx claudepluginhub openshift-eng/ai-helpers --plugin workspaces<workspace-name>/deleteDeletes one or more issues by ID and cleans up dependency links, text references, and database entries. Defaults to preview; requires --force to execute. Supports batch from file and dependency handling.
/deleteDeletes Gateway API resources (Gateways in namespace and cluster-scoped GatewayClasses) from Kubernetes/OpenShift clusters using oc/kubectl, with confirmation and verification.
/deleteDeletes specified slide by number from <!-- Slide N --> comments with confirmation, removes file, renumbers subsequent slides, updates slides.md, and handles git operations.
/deleteSoft-deletes a captured decision record by marking it as reverted. If no record ID provided, lists 10 recent captures for selection and confirms action.
/deleteSafely deletes a Git worktree by name, checks for uncommitted changes with user confirmation, removes it, and optionally deletes the branch.
workspaces:delete
/workspaces:delete <workspace-name>
The workspaces:delete command removes a workspace directory and its associated git worktrees. Before deletion, it checks the status of all repositories in the workspace to detect uncommitted changes or unpushed commits, prompting the user for confirmation when issues are found.
This command helps clean up task workspaces created by /workspaces:create while ensuring no work is accidentally lost.
- [ ] Step 1: Identify workspace and check configuration
- [ ] Step 2: Execute deletion
Get available workspaces (includes configuration check):
${CLAUDE_PLUGIN_ROOT}/commands/delete/list.sh
If the output contains STATUS: NOT_CONFIGURED:
Use AskUserQuestion to ask the user for:
/home/user/git-repos or ~/work/repos)/home/user/workspaces or ~/dev/workspaces)Run list again with the user's paths:
${CLAUDE_PLUGIN_ROOT}/commands/delete/list.sh --repos-root <REPOS_PATH> --workspaces-root <WORKSPACES_PATH>
Verify the output shows CONFIGURATION SAVED before proceeding to Step 2
Match user's input against the workspace list:
Use the workspace NAME (not full path) from Step 1.
Example: If the workspace is at /home/user/workspaces/feature-azure-template-field, use feature-azure-template-field (not the full path).
Execute the deletion script:
${CLAUDE_PLUGIN_ROOT}/commands/delete/execute.sh {WORKSPACE_NAME}
The script will:
Case A: Exit code 0 (success)
The workspace was clean and has been deleted successfully. Report completion to user.
Case B: Exit code 2 (user input required)
The workspace has uncommitted changes or unpushed commits. The status has already been displayed to the user.
Use AskUserQuestion with these options:
Then execute based on user's choice:
If user chose "Keep branches":
${CLAUDE_PLUGIN_ROOT}/commands/delete/execute.sh {WORKSPACE_NAME} --keep-branches
If user chose "Delete branches":
${CLAUDE_PLUGIN_ROOT}/commands/delete/execute.sh {WORKSPACE_NAME} --delete-branches
If user chose "Abort":
Case C: Exit code 1 (error)
An error occurred (e.g., workspace not found, configuration issue). Report the error to the user.