Cleanup branch after PR is merged. Use when user says /workflow finish or /workflow-finish.
View on GitHubplugins/workflow-finish/skills/workflow-finish/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/dohernandez/claude-skills/blob/main/plugins/workflow-finish/skills/workflow-finish/SKILL.md -a claude-code --skill workflow-finishInstallation paths:
.claude/skills/workflow-finish/# Workflow Finish ## Purpose Cleanup git branches and worktrees after a PR is merged. Removes local branch, remote branch, worktree, and workflow context files. ## When to Use - After a PR has been merged - Cleaning up completed feature branches - Removing stale worktrees and context files ## Quick Reference - **Setup**: `/workflow-finish configure` (or `/workflow configure` - shared config) - **Usage**: `/workflow-finish` (uses saved config for worktree paths) - **Config**: `.claude/workflow-config.json` (shared with workflow-setup) ## Commands | Command | Purpose | When to Use | |---------|---------|-------------| | `/workflow-finish configure` | Configure worktree preferences | Framework setup / wizard | | `/workflow-finish` | Cleanup after PR merged | After PR is merged | | `/workflow-finish <branch>` | Cleanup specific branch | Cleaning up specific branch | | `/workflow-finish <ticket-id>` | Find and cleanup by ticket | Using ticket ID | --- ## Configure Mode **When**: Framework setup wizard (one-time, shared with workflow-setup) **What it does**: 1. Detects project name from package.json/pyproject.toml/etc. 2. Suggests worktree base path (where to find worktrees to clean) 3. Detects installed IDEs 4. Saves config to `.claude/workflow-config.json` ### Discovery Process ``` 1. CHECK EXISTING CONFIG └─ If .claude/workflow-config.json exists, validate and confirm 2. DETECT PROJECT NAME ├─ package.json → name ├─ pyproject.toml → [project].name ├─ go.mod → module name └─ Fallback: directory name 3. SUGGEST WORKTREE PATH └─ Default: ../worktrees/<project-name> 4. PROPOSE TO USER └─ Show config, wait for approval ``` ### Config Location Skill config path depends on how the plugin was installed: | Plugin Scope | Config File | Git | |--------------|-------------|-----| | **project** | `.claude/skills/workflow-finish.yaml` | Committed (shared) | | **local** | `.claude/skills/workflow-finish.local.yaml` | Ignored (personal) | | **u