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.
npx agentmods add commands/leanandmean/scramjet/mach12-gh-sub-issuesgit clone --depth 1 https://github.com/LeanAndMean/scramjetWrote 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.
[](https://agentmods.dev/commands/leanandmean/scramjet/mach12-gh-sub-issues)<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>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.
| Model | Per session | Once 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 |
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.
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-stateflag. 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:
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.
- yesterday Changed · +3 lines 5cf94a3510b5
- 6d ago First seen · 69 lines · 23 tokens per session scan A 44584fae3d4f
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.
Other commands, from other repositories
computer
Drive a computer's screen, mouse, and keyboard.
afc
Create feature - creates spec in inbox (shortcut for feature-create).
afcl
Close feature [agent] [--adopt] - merges branch, cleans up, optionally adopts from losers (shortcut for feature-close).
afd
Do feature - works in both Drive and Fleet modes (shortcut for feature-do).
ab
Show Kanban board or list view (shortcut for board).
afn
Fast-track feature - create + setup + implement in one step (shortcut for feature-now).