Completes feature branch work by rebasing, pushing, monitoring CI, and squash merging to main
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: finish-worktree
description: Completes feature branch work by rebasing, pushing, monitoring CI, and squash merging to main
user-invocable: true
---
# Finish Worktree Skill
**CLAUDE: When this skill is invoked with `/finish-worktree`, immediately run:**
```bash
./.claude/skills/finish-worktree.sh
```
**Then guide the user through CI monitoring and merge-and-cleanup.**
## Purpose
Completes feature branch work with proper rebase, CI validation, and squash merge back to main.
## Usage
```bash
/finish-worktree
```
## Workflow Steps
### Step 1: Rebase onto main
```bash
./.claude/skills/finish-worktree.sh
```
This script:
1. Fetches latest from origin/main
2. Rebases your branch onto main
3. Runs local validation (fmt, architectural, clippy)
4. Pushes with `--force-with-lease`
### Step 2: Monitor CI
Check GitHub Actions:
```
https://github.com/Async-IO/pierre_mcp_server/actions
```
Wait for all checks to pass (green).
### Step 3: If CI Fails
Fix the issues locally, then:
```bash
# Make fixes
cargo fmt
cargo clippy --all-targets -- -D warnings -D clippy::all -D clippy::pedantic -D clippy::nursery
# Amend or add commit
git add .
git commit --amend --no-edit # or new commit
# Push again
git push --force-with-lease origin <branch-name>
```
Repeat until CI is green.
### Step 4: Squash Merge and Cleanup
Once CI is green, run from the **main worktree**:
```bash
cd /path/to/main/worktree
./.claude/skills/merge-and-cleanup.sh
```
No arguments needed - branch info is saved by `finish-worktree.sh`.
This script:
1. Pulls latest main
2. Squash merges the feature branch
3. Prompts for commit message
4. Pushes main
5. Removes the worktree
6. Deletes the feature branch
## Complete Example Session
```bash
# On feature branch in worktree
./.claude/skills/finish-worktree.sh
# Wait for CI...
# If red, fix and push again
# Once green, go to main worktree:
cd /path/to/main/worktree
./.claude/skills/merge-and-cleanup.sh
```
## Related Skills
- `create-worktree` - Creates worktree with environment setup
No comments yet. Be the first to comment!
Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.
Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.
Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.
Publish oh-my-opencode to npm via GitHub Actions workflow. Argument: <patch|minor|major>. Triggers: publish, release, deploy, npm publish.