Index of every page on this site: llms.txt
All skills
mia-cx avatar

/next-slice

@7acdf71
by mia.cxmia-cx/skills4 stars
Run it yourself

Advance to the next PRD slice after a merge: clean up the finished worktree and branch, fast-forward main, pick the next unblocked sub-issue of the PRD, set up a fresh worktree, and hand off to address-issue. Use when the user says "next slice", "move on", "advance", or wants to start the next issue after a merge.

Use this Skill: https://skilld.dev/gh/mia-cx/skills/next-slice

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈82 tokens for metadata: the name and description. ≈759 when used: this file.

Description uses 4.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈328 characters, or 4.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Next slice

Transition from a just-merged slice to the next one. This skill handles the in-between (cleanup, branch hygiene, slice selection, fresh worktree), then hands the chosen issue to the address-issue skill, which owns planning, implementation, and the PR.

Workflow

1. Verify the current slice is done

  • Identify the repo root (the main worktree, not a .worktrees/ child), the current worktree, and its feature branch.
  • Confirm the PR for the current slice is merged. If not, stop and report: the slice isn't done (review-relay / pr-merge come first).

2. Clean up the finished slice

From the repo root (not from inside the worktree being removed):

cd <repo-root>
git worktree remove .worktrees/<current-name>
git branch -d <current-branch>
git pull --ff-only origin main

A -d warning about the branch not being merged to HEAD is expected; it merged to origin/main via the PR. Use -D only if -d fails and the PR is confirmed merged. Confirm the repo root ends up clean and tracking origin/main.

3. Pick the next slice

The parent PRD's sub-issues are the source of truth. A slice is eligible when it is open and unblocked (every issue in its "Blocked by" section is closed):

# Sub-issues of the PRD with their state
gh api graphql -f owner=OWNER -f repo=REPO -F number=PRD_NUMBER -f query='
  query($owner:String!,$repo:String!,$number:Int!){
    repository(owner:$owner,name:$repo){issue(number:$number){
      subIssues(first:50){nodes{number title state}}}}}'

# Check a candidate's blockers via its body's "Blocked by" section
gh issue view <number> --json body,state

Pick the lowest-numbered eligible slice; prefer AFK slices when an HITL slice would otherwise block unattended progress. Without a PRD, fall back to .plans/*.md order or open implementation issues. Skip meta/tracking issues (PRDs, discussions, umbrella trackers).

If no eligible slice remains: report all slices complete, or name the HITL/blocked issues that need the user.

4. Set up the new worktree

Derive the worktree and branch names from the issue title:

cd <repo-root>
git worktree add .worktrees/<short-name> -b feat/<short-name> main

5. Report and hand off

Cleaned up: .worktrees/<old> (branch <old-branch> deleted)
Main: <commit> on origin/main
Next slice: #<N> <title> (sub-issue of PRD #<P>)
Worktree: .worktrees/<new> on branch <new-branch>

Then run the address-issue skill on issue #<N> in the new worktree; it owns the plan file, TODO-per-commit implementation, and the PR. Begin immediately if the user asked to advance and implement; otherwise wait for their go-ahead.

Rules

  • Always operate from the repo root when removing worktrees or pulling main.
  • Never force-delete branches without confirming the PR is merged.
  • Each slice gets its own worktree under .worktrees/; never implement directly on main.
  • If the next eligible slice is HITL, surface the decision it needs instead of starting it unattended.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill manages development workflow transitions by cleaning up Git worktrees and selecting new tasks from GitHub issues. It uses standard developer tools and demonstrates safe operational patterns.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 7acdf71. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago

README badge

README badge for mia-cx/skills/next-slice