mach12:gh-sub-issues

mach12:gh-sub-issues is a command for Claude Code from LeanAndMean/scramjet. It costs 23 tokens per session (790 once invoked), scanned A, original, Apache-2.0.

A command for finding smaller GitHub issues linked to a larger issue. GitHub sub-issues are separate work items grouped under a parent issue.

In plain words
What is it for?
Use it with a GitHub issue number to list its sub-issues, optionally including their current states.
Why use it?
It provides a fallback when the normal GitHub API lookup fails by reading sub-issue references from the issue text. It can also include whether each sub-issue is open or closed.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/leanandmean/scramjet/mach12-gh-sub-issues
Clone the repo
git clone --depth 1 https://github.com/LeanAndMean/scramjet

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mach12:gh-sub-issues

README.md
[![agentmods](https://agentmods.dev/badge/commands/leanandmean/scramjet/mach12-gh-sub-issues.svg)](https://agentmods.dev/commands/leanandmean/scramjet/mach12-gh-sub-issues)
Your own site
<a href="https://agentmods.dev/commands/leanandmean/scramjet/mach12-gh-sub-issues"><img src="https://agentmods.dev/badge/commands/leanandmean/scramjet/mach12-gh-sub-issues.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00790
Opus 5 $0.00012 $0.00395
Sonnet 5 $0.00005 $0.00158
Haiku 4.5 $0.00002 $0.00079

Measured yesterday against content hash 5cf94a3510b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mach12:gh-sub-issues scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/scramjet/mach12/commands/mach12:gh-sub-issues.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detect Sub-Issues

Goals

  • Return the caller the best-supported sub-issue list, including state when requested and the strategy used.
  • Preserve the API's authoritative empty result and clearly distinguish the advisory body-parse fallback.

This subroutine is advisory and may fail open through body parsing. Callers must not use it to expand PR closing linkage automatically.

This subroutine is gh-specific. A future forge-agnostic command set would substitute an equivalent glab-sub-issues (or similar); Strategy B is forge-neutral and would survive a swap.

Step 1: Parse input

Extract:

  • The issue number (required, first token).
  • An optional --with-state flag. When present, the return includes each sub-issue's state alongside its number (callers that need to decide based on open/closed status request this).

If no issue number is present, return an error to the caller and stop.

Step 2: Strategy A -- GitHub sub-issues API

Resolve the repository identifier, then query the sub-issues API. The --jq filter depends on whether --with-state was requested:

REPO=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
# Without --with-state:
gh api --paginate repos/$REPO/issues/<issue-number>/sub_issues --jq '.[].number'
# With --with-state:
gh api --paginate repos/$REPO/issues/<issue-number>/sub_issues --jq '.[] | {number, state}'

Three outcomes:

  • API succeeds and returns one or more results: these are the confirmed sub-issues. Return them. Do NOT fall through to Strategy B.
  • API succeeds but returns no results (empty array): the issue has no sub-issues. Return an empty list. Do NOT fall through to Strategy B -- the API is authoritative when it answers.
  • API fails (404, permission error, network timeout, etc.): proceed to Strategy B.

Step 3: Strategy B -- body-parse fallback

This step runs only when Strategy A failed.

Read the issue body (the caller likely already has it -- if not, call gh issue view <issue-number> here). Scan the body for #<number> references on GitHub task-list lines:

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +3 lines 5cf94a3510b5
  2. 6d ago First seen · 69 lines · 23 tokens per session scan A 44584fae3d4f

Subscribe to this mod's changes

mach12:gh-sub-issues is a command published in the GitHub repository LeanAndMean/scramjet (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 790 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.