.agents/skills/triage/reproduce.md
Reproduce a GitHub issue to determine if a bug is valid and reproducible.
CRITICAL: You MUST always read report.md and write report.md to the triage directory before finishing, regardless of outcome. Even if you encounter errors, cannot reproduce the bug, hit unexpected problems, or need to skip — always write report.md. The orchestrator and downstream skills depend on this file to determine what happened. If you finish without writing it, the entire pipeline fails silently.
SCOPE: Your job is reproduction only. Finish your work once you've completed this workflow. Do NOT go further than this (no larger diagnosis of the issue, no fixing of the issue, etc.). Do not spawn tasks/sub-agents.
These variables are referenced throughout this skill. They may be passed as args by an orchestrator, or inferred from the conversation when run standalone.
triageDir — Directory containing the reproduction project (e.g. triage/issue-123). If not passed as an arg, infer from previous conversation.issueDetails - The GitHub API issue details payload. This must be provided explicitly by the user or available from prior conversation context / tool calls. If this data isn't available, you may run gh issue view ${issue_number} to load the missing issue details directly from GitHub.report.md with detailed findingsConfirm that you have issueDetails as defined/instructed above. Otherwise, fail — we cannot triage a bug that we have no details on.
Once you have issueDetails, read carefully:
astro info output)Before attempting reproduction, check if this issue should be skipped due to a limitation of our sandbox reproduction environment.
If any early exit condition is met, skip to Step 5 and write report.md with the skip details.
Comment Handling for Early Exits: Sometimes future comments will provide additional reproductions. An early exit is only valid if not future comments in that issue "invalidate" it. For example, if the original poster of a bug was on Astro 3.0, we would exit initially (unsupported-version). However, on a future run, if a commenter had later posted a similar reproduction but on the latest version of Astro, we would no longer consider that a valid early exit, and would instead continue on with the workflow.
The following are the documented early exit conditions that we support:
not-actionable)Skip if the issue is not a bug report. This workflow can only triage bugs — feature requests, suggestions, and discussions are not actionable here.
missing-details)Skip if the issue is missing a valid reproduction (see below for list of supported valid reproductions). Skip if the issue is missing a description of the user's expected result (ex: "What's the expected result?" section of our issue template is filled out). We need both of these to successfully reproduce, and later to verify the expected results.
unsupported-version)Skip if the bug targets Astro 4.x or earlier. Look for version in astro info output or package.json mentions.
host-specific)Skip if the bug can only be reproduced on a specific hosting platform (Vercel, Netlify, Cloudflare, Deno Deploy, etc.). Signs to look for:
@astrojs/vercel, @astrojs/netlify, @astrojs/cloudflare)unsupported-runtime)Skip if the bug is specific to Bun or Deno. Our sandbox only supports Node.js.
maintainer-override)Skip if a repository maintainer has commented that this issue should not be reproduced here. To determine if a commenter is a maintainer, check the authorAssociation field on their comment in issueDetails — values of MEMBER, COLLABORATOR, or OWNER indicate a maintainer.
Every bug report should include some sort of reproduction. The reproduction project goes in the triageDir directory (e.g. triage/gh-123). If no triageDir is provided, default to triage/gh-<issue_number>.
Set up the reproduction project based on what the issue provides you. Once the reproduction project directory has been completed, run pnpm install --no-frozen-lockfile in the workspace top-level root to connect it to the rest of the monorepo.
https://stackblitz.com/edit/...)If reproduction was provided as a Stackblitz project URL, download it into the triageDir directory using stackblitz-clone:
npx stackblitz-clone@latest <stackblitz-url> <triageDir>
https://stackblitz.com/github/...)StackBlitz has a special, commonly-used URL to open a GitHub repo in StackBlitz. If we have received one of these as reproduction, parse out the GitHub org & repo names and then treat it as a GitHub URL, following the "GitHub URL" step below.
https://github.com/...)If reproduction was provided as a GitHub repo URL, clone the repo into the triage directory and remove the .git directory to avoid conflicts with the host repo:
git clone https://github.com/<owner>/<repo>.git <triageDir>
rm -rf <triageDir>/.git
If a specific branch or subdirectory is referenced, check out that branch before removing .git, or copy only the relevant subdirectory.
https://gist.github.com/)Fetch the gist contents using the GitHub API to help understand the reproduction:
curl -s "https://api.github.com/gists/<gist-id>"
You may still need to set up a project from scratch (see fallback below) and apply the gist files into it.
If no reproduction URL is provided, you will need to follow the manual steps that the user provided instead. If the user didn't mention a specific template, use minimal as the default.
# 1. List available example templates
ls examples/
# 2. Remove the selected template's node_modules directory to avoid problems with `cp -r`
rm -rf examples/<template>/node_modules
# 3. Copy over the selected template into the triage directory
cp -r examples/<template> <triageDir>
# 4. Re-run install (at the workspace root) to add back missing node_modules dependencies
pnpm install --no-frozen-lockfile
Verify that the project was created in the correct place (cat <triageDir>/package.json).
Then, modify the triage project as needed to attempt your reproduction:
astro.config.mjs with required configuration changes@astrojs/react, etc.)Keep the reproduction as minimal as possible — only add what the issue reporter has documented as needed to trigger the bug.
Use all of the tools at your disposal — pnpm run dev|build|preview|test, curl, agent-browser, etc.
Write report.md to the triage directory:
report.md — Detailed internal report for the next LLM stageWrite a verbose report with everything you learned. This is NOT for humans — it's context for the next stage of the pipeline (diagnose/fix). Downstream skills will NOT have access to the original issue — report.md is their only source of context. Include:
Be thorough. More context is better here.
The report must include all information needed for a final GitHub comment to be generated later by the comment skill. Make sure to include: