All skills / Stacked-PR workflow

/engineering:next

/next — Reset Session to Start Fresh

Reset the working tree between tasks. Checks out a clean `dummy` branch rebased on latest `main` so the next task starts from a known good state. Use when user says "next", "start fresh", "reset for the next thing", or wants to clear out a finished branch before starting new work.

Resets the working tree to the `dummy` branch, rebased on latest `main`. Use this between tasks to start with a clean slate.

Full skill instructions

This is the same file the agent loads when the skill triggers. Source: plugins/engineering/skills/next/SKILL.md.

Instructions

When the user runs /next, execute the following steps:

  1. Fetch latest main and switch to dummy:

    git fetch origin main
    

    Then switch to the dummy branch. If it doesn't exist yet, create it:

    git switch dummy || git switch -c dummy origin/main
    

    Then reset to latest main:

    git reset --hard origin/main
    

    This works in worktrees where main is checked out by the parent tree. The dummy branch exists solely as a parking branch for worktree sessions.

  2. Report the result:

    • On success: Confirm the branch is ready and show the latest commit on main
    • On conflict or error: Show what went wrong and ask the user how to proceed
  3. Prompt for next task: Ask the user what they'd like to work on next.

Plugin

Part of the Engineering plugin. Install with claude plugin install engineering@pace.