Get the FREE Ultimate OpenClaw Setup Guide →

open-graphite-stacks

Scanned
npx machina-cli add skill n1ddeh/fantastic-skills/open-graphite-stacks --openclaw
Files (1)
SKILL.md
2.6 KB

Discover My Open Stacks

Install path: This skill expects to be installed at ~/.claude/skills/open-graphite-stacks/. All script paths below assume this location. If installed elsewhere, adjust paths accordingly.

Finds all open PRs authored by the current user, groups them into Graphite stacks, and displays a simple overview.

Step 1: Fetch Data

Run the fetch script which handles everything — fetching PRs, enriching with review threads, and grouping into stacks:

~/.claude/skills/open-graphite-stacks/scripts/fetch-stacks.sh

This outputs pre-grouped JSON:

{
  "my-backend": {
    "stacks": [
      [
        { "number": 101, "title": "...", "isDraft": false, "reviewDecision": "APPROVED",
          "totalThreads": 5, "resolvedThreads": 2 },
        { "number": 102, "title": "...", ... }
      ]
    ],
    "standalone": [
      { "number": 115, "title": "...", ... }
    ]
  }
}

Each stack array is ordered trunk-to-tip. reviewDecision is one of: APPROVED, CHANGES_REQUESTED, REVIEW_REQUIRED, or "".

If all repos have empty stacks and standalone arrays, report: No open PRs found. and stop.

Step 2: Format Output

Render the JSON into this format:

## My Open Stacks

### my-backend

Stack 1:
- [1] [DRAFT] #101 feat: add billing endpoint | 💬 2/5 | CHANGES_REQUESTED
- [2] #102 feat: add billing tests | 💬 0/3 | APPROVED
- [3] #103 feat: billing UI integration | 💬 1/1

Stack 2:
- [1] #110 fix: sync race condition | APPROVED

Standalone:
- #115 chore: bump dependencies | 💬 0/2

### my-frontend

Stack 1:
- [1] #50 feat: new settings page | 💬 3/4 | CHANGES_REQUESTED
- [2] #51 feat: settings validation

---
Summary: {total_prs} open PRs across {total_stacks} stacks and {standalone_count} standalone PRs

Rules:

  • Mark draft PRs with [DRAFT] before the PR number
  • Show review thread counts as 💬 N/M where N = resolved threads and M = total threads — but ONLY when totalThreads > 0. Omit entirely when 0/0
  • Show reviewDecision only if non-empty
  • Use | as delimiter between title, thread count, and review decision. Only include | segments that have content
  • Use markdown list syntax (- ) for each PR line
  • If a repo has no open PRs, omit it entirely
  • Group standalone PRs under a "Standalone" heading separate from numbered stacks
  • Keep it concise — no extra commentary, just the structured output

Source

git clone https://github.com/n1ddeh/fantastic-skills/blob/main/open-graphite-stacks/SKILL.mdView on GitHub

Overview

Find all open PRs authored by you, grouped into Graphite stacks across your GitHub repos. It shows a simple stacked view with PR numbers, titles, and status, so you can quickly see what you have open and where to focus.

How This Skill Works

The skill runs a fetch script at ~/.claude/skills/open-graphite-stacks/scripts/fetch-stacks.sh to collect your open PRs, enrich them with review threads, and group them into stacks and standalone items. It outputs pre-grouped JSON which is then presented in a concise Markdown-style view of each stack and its PRs.

When to Use It

  • Consolidate all open Graphite stacks in one place.
  • Share current stack status with teammates or stakeholders.
  • Audit progress and identify stalled PRs across repos.
  • Compare activity and workload across different stacks or repos.
  • Export a snapshot for reporting or handoffs.

Quick Start

  1. Step 1: Run the fetch script: ~/.claude/skills/open-graphite-stacks/scripts/fetch-stacks.sh
  2. Step 2: Review the pre-grouped JSON output
  3. Step 3: View the rendered My Open Stacks section

Best Practices

  • Run the fetch-stacks.sh script regularly to refresh data.
  • Review reviewDecision and thread counts to prioritize work.
  • Keep PR titles within a stack descriptive and cohesive.
  • Note and address draft PRs, which appear with the [DRAFT] tag in output.
  • Use the Standalone section for single PRs not part of a stack.

Example Use Cases

  • Example: Backend stack my-backend with PR #101 (APPROVED) and #102 (CHANGES_REQUESTED); standalone #115.
  • Example: Frontend stack my-frontend with PR #50 (CHANGES_REQUESTED) and #51.
  • Example: All stacks empty returns No open PRs found.
  • Example: Draft PRs are shown as [DRAFT] before the PR number in the output.
  • Example: Mixed stacks across multiple repos show grouped PRs per stack.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers