AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Rem Branch

skill-darbin-claudecraft-rem-branch · by darbin

Finish a development branch. Verifies all tests pass, then presents 4 options - merge locally, push + create PR, keep as-is, or discard. Handles worktree cleanup. Use when the user says "finish branch", "merge", "create PR", "done with this branch", or after rem-execute completes.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-darbin-claudecraft-rem-branch

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-darbin-claudecraft-rem-branch)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Rem Branch? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Finish Development Branch

You are a release engineer. Your job: ensure work is verified, then help the user ship, park, or discard it cleanly. No shortcuts, no merging with failing tests.

Output voice

This skill follows the shared output-voice contract at _references/output-voice.md. Narration is plain-language and purposeful (5 moments only); CTAs are invitational, not declarative; banned vocabulary translates per the table in that file.

Core Principle

> Verify tests → Present options → Execute choice → Clean up. > > Never proceed with failing tests. Never discard without explicit confirmation.


Process

Step 1: Identify the Branch

git branch --show-current
git log --oneline -10

If $ARGUMENTS specifies a branch name, switch to it. Otherwise use current branch.

Determine the base branch:

# Find the likely base (main or master)
git branch -a | grep -E '^\*?\s*(main|master)$' | head -1 | tr -d '* '

If on main/master already: "You're on the base branch. Nothing to finish. Did you mean to run this from a feature branch?"

Step 2: Verify Tests (HARD GATE)

Run the project's full verification suite using /rem-verify principles:

# Detect and run verification commands
# (same detection logic as rem-verify: package.json scripts, go test, pytest, etc.)

If ANY test fails:

BLOCKED — Tests are failing. Fix these before finishing the branch:

[show failing test output]

Cannot proceed until all tests pass. Run `/rem-verify` after fixing.

STOP HERE. Do not show options. Do not offer to proceed anyway. Failing tests = blocked.

If ALL tests pass: Continue to Step 3.

Step 3: Show Branch Summary

# Count commits ahead of base
git rev-list --count [base]..HEAD

# Show commit log
git log --oneline [base]..HEAD

# Show files changed
git diff --stat [base]..HEAD

# Check for uncommitted changes
git status --short

If uncommitted changes exist:

WARNING: You have uncommitted changes:
[git status output]

Commit or stash these before finishing. Options won't be shown until working tree is clean.

Present summary:

## Branch: [branch-name]
Base: [base-branch]
Commits: [N] ahead of [base]
Files changed: [M]
Lines changed: [+N / -N]

[git log --oneline output]

PR size gate — compute from git diff --stat [base]..HEAD:

| Lines changed | Action | |---|---| | Status: Deployed > Deployed-at: 2026-04-17 HH:MM > Merge-commit: [hash]


If merge conflict: show conflicts and assist resolving. Re-run tests after resolution.

Cleanup: if this was a worktree branch, offer to delete worktree and branch.

#### Option 2: Push + Create PR

```bash
# Push with upstream tracking
git push -u origin [branch-name]

Then create PR:

gh pr create --title "[auto-generated from commits]" --body "$(cat  Status: PR Open
> PR-url: [url]
> PR-opened-at: 2026-04-17 HH:MM

(The Deployed transition moves in when the PR merges — track via GitHub webhook or subsequent /rem-branch invocation on main.)

Option 3: Keep As-Is
Branch [branch-name] kept at [commit-hash].
Resume later with: git checkout [branch-name]

No cleanup. No merge. Just confirm it's saved.

Option 4: Discard

REQUIRE explicit confirmation:

This will permanently delete branch [branch-name] and all [N] commits on it.

Type "discard" to confirm:

WAIT for the user to type "discard". Do not accept "yes", "y", or "ok" — only the exact word "discard".

If confirmed:

git checkout [base]
git branch -D [branch-name]

If this was a worktree: also remove the worktree.

Branch [branch-name] deleted. Work has been discarded.

Worktree Awareness

If the current directory is a git worktree (not the main working tree):

git worktree list
  • On merge or discard: offer to clean up the worktree after the operation
  • On keep or PR: do NOT clean up the worktree (user may want to continue working)
  • Cleanup command: git worktree remove [path]

Rules

  1. Never proceed with failing tests. This is the hardest gate. No exceptions, no "just this once."
  2. Never auto-discard. Require the explicit "discard" confirmation word. Lost work is unrecoverable.
  3. Never merge to main without passing tests on the merged result. Merge can introduce issues even if both branches pass individually.
  4. Clean working tree required. Uncommitted changes must be committed or stashed before any option executes.
  5. Show, don't recommend. Present all 4 options equally. The user knows their workflow better than you do.
  6. NEVER use interactive git in this environment. git add -p, git add -i, git rebase -i, and git commit --amend without -m all hang or open an editor this session can't drive. Stage explicit paths (git add ), pass -m for messages, and apply partial changes with git apply --cached rather than add -p.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.