finish

Finalize feature branches via merge, pull request, keep, or discard after build, lint, and tests.

26|8|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/arbazkhan971/godmode --skill finish-arbazkhan971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finish
Source: https://github.com/arbazkhan971/godmode/tree/main/skills/finish
Command: npx skills add https://github.com/arbazkhan971/godmode --skill finish-arbazkhan971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures feature branches are safely finalized by validating repository state, running guard checks, and choosing a deterministic outcome (merge, PR, keep, or discard) so teams avoid broken main branches and incomplete releases.

Core Features & Use Cases

  • Snapshot branch state including current branch name, commit count, and files changed to inform finalization decisions.
  • Enforce a clean worktree by requiring staged/unstaged/untracked files be resolved before proceeding.
  • Run a full guard suite (build, lint, tests) and block finalization on failures, with explicit guidance to run fix workflows.
  • Detect merge conflicts, recommend rebase resolution, and support squash-merge, PR creation via CLI, discard with confirmation, and automatic post-merge verification with rollback on failures.
  • Use Case: A developer finishes a feature branch; the Skill validates the branch, runs CI-equivalent checks locally, creates a squash merge to main or a PR if checks pass, logs results, and reverts immediately if post-merge tests fail.

Quick Start

Run /godmode:finish on your feature branch to validate, run guards, and create a squash-merge or PR depending on checks.

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 feature branch into main without breaking the build?

Safely merging a feature branch requires running pre-merge guard checks like build, lint, and tests before finalizing. The workflow enforces worktree cleanliness, detects merge conflicts, and creates a squash-merge or pull request only after all validations pass, ensuring the main branch remains stable.

What is the best way to automate branch finalization and pull request creation in CI?

Automating branch finalization involves running a full guard suite locally, resolving any untracked or staged files, and then using CLI-based gh commands for pull request creation. This deterministic workflow chooses between a squash-merge, PR, keep, or discard outcome based on CI-equivalent check results.

How do I detect and resolve merge conflicts before attempting a squash-merge?

Detecting merge conflicts is a pre-finalization step that evaluates the branch against main. If conflicts are found, the workflow blocks the squash-merge and recommends a rebase resolution to align the commits before attempting the finalization process again.

Can I automatically rollback a merge to main if post-merge tests fail?

Automatic post-merge verification and rollback rules are supported. After a merge, the workflow runs verification tests and automatically reverts the merge immediately if post-merge checks fail, preventing broken main branches and incomplete releases.

Does branch finalization require a clean worktree before running build and lint checks?

Yes, branch finalization requires a clean worktree. The workflow enforces worktree cleanliness by requiring that all staged, unstaged, and untracked files be fully resolved before it proceeds to run build, lint, and test guard checks for finalization.

When should I discard a feature branch instead of creating a pull request?

You should discard a feature branch when guard checks fail or the work is no longer needed. The workflow supports discarding branches with an explicit confirmation step, providing a deterministic outcome alongside merge, pull request, or keep options based on validation results.