Start Feature
Prepare a clean branch from main and plan a new feature or fix.
Workflow
Step 1: Parse Arguments
The user provides a description of the work they want to plan. This becomes the basis for:
- •The branch name (kebab-cased, prefixed with
feat/orfix/) - •The input to
/workflows:plan
If no arguments provided, ask: "What feature or fix would you like to plan?"
Step 2: Ensure Clean Working Directory
Check for uncommitted changes:
bash
git status --porcelain
If changes exist: Use AskUserQuestion to ask:
- •"You have uncommitted changes. What would you like to do?"
- •Stash changes (recommended)
- •Commit changes first
- •Abort
Handle based on selection:
- •Stash:
git stash push -m "Auto-stash before start-feature" - •Commit: Ask for commit message, then
git add . && git commit -m "<message>" - •Abort: Stop execution
Step 3: Switch to Main and Update
bash
# Get the default branch name default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@') # Fallback if remote HEAD isn't set if [ -z "$default_branch" ]; then default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master") fi # Switch to default branch and pull latest git checkout "$default_branch" git pull origin "$default_branch"
Step 4: Create Feature Branch
Generate branch name from the work description:
- •Determine prefix:
feat/for features,fix/for bugs - •Convert description to kebab-case (lowercase, spaces to hyphens, remove special chars)
- •Truncate to reasonable length (max 50 chars)
bash
git checkout -b <branch-name>
Example transformations:
- •"Add user authentication" →
feat/add-user-authentication - •"Fix login timeout issue" →
fix/login-timeout-issue - •"Implement SNI extraction for Swift" →
feat/implement-sni-extraction-for-swift
Step 5: Run Planning Workflow
Invoke the planning workflow with the work description:
code
/workflows:plan <work-description>
Pass the original user input as the feature description.
Arguments
The skill accepts a work description as arguments:
code
/start-feature Add SNI extraction to Swift Network Extension /start-feature Fix the race condition in connection handler
Examples
Example 1: New feature
code
User: /start-feature Add dark mode support to the dashboard
Result:
- •Stash any changes (if needed)
- •Switch to main, pull latest
- •Create branch
feat/add-dark-mode-support-to-dashboard - •Run
/workflows:plan Add dark mode support to the dashboard
Example 2: Bug fix
code
User: /start-feature Fix memory leak in WebSocket handler
Result:
- •Stash any changes (if needed)
- •Switch to main, pull latest
- •Create branch
fix/memory-leak-in-websocket-handler - •Run
/workflows:plan Fix memory leak in WebSocket handler
Notes
- •Always verify the branch was created successfully before proceeding to planning
- •If branch creation fails (e.g., branch already exists), ask user how to proceed
- •The planning workflow will handle all research and plan file creation