start-feature

michael-menard's avatarfrom michael-menard

Commit or stash current work, then start a new feature using worktree workflow. Use when beginning work on a new story or feature, ensures clean state before starting new work.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 28, 2025

When & Why to Use This Skill

The start-feature skill streamlines the developer workflow by automating Git state management and initializing new feature development. It eliminates the friction of context switching by ensuring a clean working directory—offering options to commit, stash, or discard pending changes—before seamlessly invoking an AI Dev agent to begin a new worktree-based task. This tool is essential for maintaining repository hygiene and preventing accidental data loss during rapid feature iterations.

Use Cases

  • Scenario 1: Safely pausing current progress on a bug fix to start a high-priority feature without manually managing Git stashes or branches.
  • Scenario 2: Ensuring a standardized, clean environment before triggering AI-driven code generation for new user stories or tasks.
  • Scenario 3: Automating the repetitive 'git status', 'git add', and 'git commit' sequence when transitioning between different development workstreams.
  • Scenario 4: Reducing manual overhead for developers using worktree workflows by combining state preservation and agent invocation into a single command.
namestart-feature
descriptionCommit or stash current work, then start a new feature using worktree workflow. Use when beginning work on a new story or feature, ensures clean state before starting new work.

/start-feature - Commit and Start New Feature

Description

Commits or stashes current work, then invokes the Dev agent to start a new feature using the worktree workflow.

Usage

/start-feature

What It Does

Step 1: Check Git Status

git status --porcelain

Step 2: Handle Uncommitted Changes

If there are uncommitted changes:

Ask user:

⚠️  You have uncommitted changes. What would you like to do?

1. Commit changes
2. Stash changes
3. Discard changes (dangerous!)
4. Cancel

Option 1: Commit Changes

# Show current changes
git status

# Ask for commit message
# User provides: "WIP: feature implementation"

# Stage all changes
git add -A

# Commit
git commit -m "{user_message}"

# Push to current branch
git push origin HEAD

Option 2: Stash Changes

# Ask for stash message (optional)
# User provides: "WIP on gallery feature"

# Stash with message
git stash push -m "{user_message}"

# Confirm
echo "✅ Changes stashed. Use 'git stash pop' to restore."

Option 3: Discard Changes

# Warn user
echo "⚠️  WARNING: This will permanently delete all uncommitted changes!"
echo "Are you sure? (yes/no)"

# If yes:
git reset --hard HEAD
git clean -fd

echo "✅ All changes discarded."

Option 4: Cancel

❌ Operation cancelled. Your changes are untouched.

Step 3: Invoke Dev Agent

After changes are handled (or if there were no changes):

✅ Working directory is clean!

Invoking Dev agent to start new feature...

@dev
*start-work

Then the Dev agent takes over and runs the start-worktree-from-story task.

Benefits

✅ Safe Workflow - Never lose uncommitted work ✅ Clean State - Start new features from clean working directory ✅ One Command - Handles commit + agent invocation ✅ Flexible - Choose commit, stash, or discard ✅ Seamless - Automatically transitions to Dev agent

Notes

  • This is a slash command (one-shot operation)
  • After handling changes, it invokes the Dev skill (@dev)
  • The Dev skill then runs the *start-work command
  • This creates a smooth transition from current work to new feature