worktree-safety

Create a feature branch and run baseline tests before code changes.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/hbvg234/jnmt.vn --skill worktree-safety-hbvg234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-safety
Source: https://github.com/hbvg234/jnmt.vn/tree/main/Claude-code/.claude/skills/worktree-safety
Command: npx skills add https://github.com/hbvg234/jnmt.vn --skill worktree-safety-hbvg234

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Experimental or risky work should never happen directly on main. This skill ensures a branch exists before any code changes are made.

Core Features & Use Cases

  • Step 1 — Check current branch
  • Step 2 — Create branch
  • Step 3 — Baseline test
  • Step 4 — Confirm ready

Quick Start

Start a new feature task by creating a task/<slug> branch, verify you are on that branch, and run the baseline tests to confirm safety.

Frequently Asked Questions about worktree-safety

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

FAQPage Schema
How do I keep experimental code off the main branch in git?

To keep experimental code off the main branch, you should always create a feature branch first. This workflow ensures isolation by enforcing branch creation and a baseline test before any code changes are made.

Why do I need to run a baseline test before starting a new feature?

A baseline test is required before starting a new feature to verify the branch is safe for coding. It establishes a passing baseline that ensures your new multi-commit tasks or experiments do not introduce regressions to main.

What is the best way to isolate multi-commit tasks in a git workflow?

The best way to isolate multi-commit tasks is using a git worktree feature branch. Creating a dedicated branch ensures risky work happens in isolation, protecting the main branch until your changes are fully ready.

How to create a safe feature branch for testing new code?

To create a safe feature branch for testing, check your current branch, create a new task branch, run baseline tests, and confirm readiness. This process guarantees your code changes remain isolated from main.

When should I use a feature branch instead of committing directly to main?

You should use a feature branch whenever starting new features, multi-commit tasks, or trying experiments. This approach protects main by enforcing isolation and preventing risky work from happening directly on the baseline.

Does this branching workflow work for temporary experiments?

Yes, this branching workflow applies to prompts to try experiments. It enforces branch creation and a baseline test so that any experimental or risky work is safely isolated from the main branch.