finish

Verify tests, choose merge or PR, and clean up worktrees.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/CasaPerks/casaflow --skill finish-casaperks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finish
Source: https://github.com/CasaPerks/casaflow/tree/main/core/skills/finish
Command: npx skills add https://github.com/CasaPerks/casaflow --skill finish-casaperks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The finish skill prevents incomplete or broken work from being merged by forcing a final test verification, then helping you pick the correct integration path (merge, PR, keep, or discard) with safe cleanup afterward.

Core Features & Use Cases

  • Test-first completion: Runs the project test command and blocks completion if any failures are detected.
  • Decision-driven integration: Presents exactly four options for how to integrate the completed branch: merge locally, push and open a PR, keep the branch, or discard it with confirmation.
  • Safe worktree cleanup: Removes worktrees for merge/PR/discard flows while preserving them for keep-as-is.

Quick Start

Use the finish skill after your implementation is done and tests are passing to guide the final merge, PR creation, or safe discard decision.

Frequently Asked Questions about finish

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

FAQPage Schema
How do I safely merge a git feature branch after passing tests?

To safely merge a git feature branch, the completion process runs your project test command first, blocks integration on any test failures, and then presents options to merge locally, open a pull request, keep, or discard the branch.

What is the best way to clean up git worktrees after a pull request?

The best way to clean up git worktrees after a pull request is to use an automated workflow that removes the worktree once the selected integration action, such as opening a PR or merging, is successfully executed.

Can I discard a git branch without accidentally losing unmerged work?

Yes, you can discard a git branch safely because the workflow requires typed confirmation before executing the destructive discard action, preventing accidental data loss while also cleaning up the associated worktree.

How do I document spec vs reality differences before releasing a feature?

To document spec vs reality differences before releasing, you can optionally generate a shipped.md file by diffing the original specification against the actual implementation, ensuring accurate delivery records.

Does the branch completion workflow require specific repository settings?

Yes, the branch completion workflow requires reading main branch and repository settings from a casaflow.config.md file to correctly target the integration base and enforce zero-test-failure preconditions.

Why are my pull requests blocked when project tests fail?

Pull requests are blocked when tests fail because the workflow enforces a zero-test-failure precondition, ensuring incomplete or broken code is prevented from being integrated into the main branch.