mcpbeat Sign in

Gh Bulk Issues Agent Skill

Orchestrate parallel Mastra Code headless instances to debug and fix multiple GitHub issues simultaneously

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
26898
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/mastra-ai/mastra --skill gh-bulk-issues

What it tells the agent to use

found in the instruction text
Task spawns other agents

The instruction itself

8 sections, as written by the author

Bulk Issue Solver

Orchestrate parallel mc (mastracode) headless instances to debug and fix multiple GitHub issues simultaneously. You act as the supervisor — spawning workers, monitoring progress, reviewing output, and creating PRs.

Inputs

$ARGUMENTS should be a space-separated list of GitHub issue numbers, e.g. 1234 5678 9012.

If no arguments are provided, use the GH CLI and the user's contribution history to recommend issues:

RUN gh issue list --state open --limit 50 --json number,title,labels,assignees

RUN git log --author="$(git config user.name)" --pretty=format:'' --name-only --since="6 months ago" | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20

Summarize the user's contribution areas and match them to open issues. Ask the user which issues to work on before proceeding.

Setup

For each issue number in the list:

  • Create a git worktree with a dedicated branch:
   git worktree add ../$(basename $PWD)-issue-<NUMBER> -b fix/issue-<NUMBER>
  • Install and build in the worktree. Run 2 worktrees at a time to manage CPU:
   cd ../$(basename $PWD)-issue-<NUMBER> && pnpm i && pnpm build
  • Spawn an mc headless instance in each worktree with a generous timeout (30 minutes):
   cd ../$(basename $PWD)-issue-<NUMBER> && pnpx tsx <path-to-mastracode>/src/main.ts --timeout 1800 --prompt "Activate the understand-issue skill for issue <NUMBER>"

Run all instances as background processes with a matching timeout on execute_command. Track each PID.

Monitoring

Create a reports/ directory in the main project root. For each issue, maintain a reports/issue-<NUMBER>.md file with:

  • Issue number, title, and link
  • Current status (Analyzing / Implementing / Tests passing / PR open / Done)
  • Summary of the approach and changes
  • PR URL once created
  • Any blockers or notes

Check all processes every 3 minutes. For each check:

  • Read the tail output of every running PID
  • Update the corresponding report file
  • Report a brief status table to the user

When an mc instance finishes or times out

  • Check git diff --stat in the worktree to see what changed
  • Check for new changesets and ISSUE_SUMMARY files
  • If the instance timed out but made progress, restart it with a --prompt that says "Continue working on issue #<NUMBER>." and summarizes where it left off based on the diff and last output
  • If the instance completed its work (code + tests + changeset):
  • Review the diff — does the fix make sense?
  • Report the changes to the user for review
  • When approved, commit, push, and create a PR using /gh-new-pr conventions:
  • Conventional commit title: fix: ... or feat(pkg): ...
  • Concise PR description with code examples
  • Reference Closes #<NUMBER>
  • Update the report file with the PR URL

PR Review Comments

After PRs are created, spawn mc instances with /gh-pr-comments <PR_NUMBER> to handle CodeRabbit and reviewer feedback. If an instance times out, restart it with context about which comments still need addressing.

CI Checks

After pushing a PR (and after each subsequent push from comment fixes), check CI status:

gh pr checks <PR_NUMBER>

If any checks are failing, spawn an mc instance in the worktree with /gh-fix-ci to diagnose and fix the failures. If it times out, restart it with context about which checks failed and what was already attempted.

Key Rules

  • 2 builds at a time to manage CPU during pnpm build
  • All mc instances can run in parallel — they're IO-bound, not CPU-bound
  • One worktree per issue, always — every task related to an issue (debugging, PR comments, CI fixes) must run in that issue's worktree. Never create a second worktree for the same issue. The worktree accumulates context (commits, diffs, build artifacts) that each mc instance benefits from.
  • Always restart timed-out processes with a continuation prompt that includes context from the diff and last output
  • Never leave a process unmonitored — check every 3 minutes
  • Update report files continuously so the user always has a written record
  • Review all mc output before creating PRs — subagent work is untrusted

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take mastra-ai/gh-bulk-issues from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm, npx. Without those the skill loads but fails at the first command.