bug-capture
Skill0 starsChanged 6 months agoMITView on GitHub
Run capture.js to take a before/after screenshot of a bug fix and build the bug-reviewer payload entry — including issue-tracker screenshots, computed styles, and a parsed git diff. Use when the user says "capture the bug", "take before/after screenshots", "build the payload for bug X", or when the orchestrator runs current/fixed captures during the fix loop.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
- tmusser/ai-engineering-skillstheir own version, first seen Aug 19, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- rohitg00/pro-workflow★ 2.9ksame name
- tmusser/ai-engineering-skills★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ado-bug-lifecycleSkill
- ado-bug-querySkill
- ado-pr-createSkill
- bug-reviewer-runSkill
- bug-triage-sessionSkill
- storyblok-bugfix-storySkill
- storyblok-component-pushSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Write a config file (e.g. /tmp/bug-<ID>-config.json):
- Distinctive: line 102
Capture CURRENT before applying the fix: Never reverse the order.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bug Capture
Wraps capture.js to produce one entry in bugs.json. Each bug is captured twice — once before the fix (current/broken), once after (fixed). The two payloads are merged into a single entry.
The dev server must be running at $PREVIEW_BASE_URL before any capture.
Capture config schema
Write a config file (e.g. /tmp/bug-<ID>-config.json):
{
"id": 12345,
"title": "Bug title from issue tracker",
"description": "<p>HTML from issue tracker description</p>",
"adoScreenshots": ["/tmp/bug-12345-issue-1.png"],
"currentUrl": "https://localhost:3000/dev/bugs/bugfix-component-12345?secret=$DRAFT_SECRET_TOKEN&slug=pages%2Fdev%2Fbugs%2Fbugfix-component-12345",
"fixedUrl": "https://localhost:3000/dev/bugs/bugfix-component-12345?secret=$DRAFT_SECRET_TOKEN&slug=pages%2Fdev%2Fbugs%2Fbugfix-component-12345",
"selector": "[data-c='my-component']",
"styles": ["background-color", "border-color"],
"repoPath": "$TARGET_REPO_PATH"
}Always set selector — target the specific component, not the full page. Full-page screenshots are noisy and hide the diff.
Capture order — strict
The CURRENT screenshot must be captured before the fix is applied. Once the code changes, the broken state can't be recovered.
1. CURRENT (broken) — code unfixed
Set currentUrl only. Omit fixedUrl.
node ~/projects/bug-reviewer/capture.js /tmp/bug-12345-config-current.json /tmp/bug-12345-payload-current.json2. Implement the fix in the target repo.
3. FIXED — code patched
Set fixedUrl only. Omit currentUrl.
node ~/projects/bug-reviewer/capture.js /tmp/bug-12345-config-fixed.json /tmp/bug-12345-payload-fixed.jsonThe fixed pass also runs git diff --unified=3 in repoPath and parses it into the codeDiff field of the payload.
4. Merge the two payloads into bugs.json
Final entry shape (combine fields from both passes):
{
"id": 12345,
"title": "Bug title from issue tracker",
"description": "<p>HTML from issue tracker</p>",
"problem": "One sentence: what the user was seeing",
"fix": "One sentence: what changed in the code, with `backtick` references",
"adoScreenshots": ["/tmp/bug-12345-issue-1.png"],
"currentScreenshot": "/tmp/bug-12345-current.png",
"fixedScreenshot": "/tmp/bug-12345-fixed.png",
"codeDiff": {
"path": "packages/ui/src/components/Button/Button.tsx",
"hunk": "@@ -42,7 +42,7 @@",
"lines": [
{ "type": "ctx", "oldNo": 42, "newNo": 42, "content": " const base = cva(..." },
{ "type": "del", "oldNo": 43, "newNo": null, "content": " 'bg-blue-600'" },
{ "type": "add", "oldNo": null, "newNo": 43, "content": " 'bg-blue-700'" }
]
}
}problem and fix are written by Claude (one sentence each) — capture.js leaves them empty.
problem, fix, and codeDiff are optional — the reviewer UI has graceful fallbacks. Legacy currentStyles/fixedStyles still render if present but are deprecated in favor of codeDiff.
Output paths
capture.js always writes screenshots to /tmp/bug-<id>-current.png and /tmp/bug-<id>-fixed.png. You can rely on those paths in the merged payload.
Hard rules
- The dev server must be running at
$PREVIEW_BASE_URLbefore any capture. Verify withcurl -sk $PREVIEW_BASE_URL | head -5. - Capture CURRENT before applying the fix. Never reverse the order.
- Always set
selector. Full-page captures are too noisy. - No
_storyblok=query param in capture URLs (seestoryblok-bugfix-story).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

