diagnose-bug
Skill5 starsChanged 16 days agoMITView on GitHub
Diagnose a hard bug or regression with a repeatable feedback loop before touching the fix. Use when the user says "diagnostica", "depura esto", "por qué falla", "error 500", "no funciona", or when `/task` classifies a task as `bug`. Works on PrestaShop, Laravel and other PHP or JS projects.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- awcameron/skillstheir own version, first seen Nov 29, 2026
- richardochristjia/skillstheir own version, first seen Nov 1, 2026
- LikeMindsCommunity/agentic-workflow-backendtheir own version, first seen Oct 20, 2026
- evelan-de/claude-code-pluginstheir own version, first seen Oct 17, 2026
- blockscout/frontendtheir own version, first seen Oct 17, 2026
- santos-sanz/ai-dev-workflowtheir own version, first seen Oct 13, 2026
Used with
Projects with it also use to-spec.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillto-spec
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- blockscout/frontend★ 308same name
- flurdy/agent-skills★ 10same name
- shady2k/skills★ 6same name
- evelan-de/claude-code-plugins★ 3same name
- richardochristjia/skills★ 3same name
- awcameron/skills★ 2same name
- nhat092005/skills★ 1same name
- LikeMindsCommunity/agentic-workflow-backend★ 0same name
- santos-sanz/ai-dev-workflow★ 0same 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 repository43 other files it gives its agents.
- agents-md-completenessSkill
- blast-radiusSkill
- elementflow-kbSkill
- gitlab-changelog-releaseSkill
- gitlab-ci-quality-gatesSkill
- gitlab-project-bootstrapSkill
- gitlab-security-setupSkill
- gitlab-wiki-bootstrapSkill
- grillSkill
- lando-checkSkill
- lando-img-placeholderSkill
- lando-mail-smtpSkill
- lando-setupSkill
- mallard-releaseSkill
- mr-flowSkill
- no-commentsSkill
- og-previewSkill
- paginated-report-pdfSkill
- panda-kbSkill
- ploi-prestashop-deploySkill
- prestashop-kbSkill
- ps-consoleSkill
- ps-css-buildSkill
- ps-demo-userSkill
- ps-email-previewSkill
- ps-env-faviconsSkill
- ps-image-regenSkill
- ps-invoice-previewSkill
- ps-new-projectSkill
- ps-one-page-checkoutSkill
- ps-project-docSkill
- ps-security-auditSkill
- ps-storefront-polishSkill
- ps-theme-cacheSkill
- ps-translateSkill
- ps-view-transitionsSkill
- ps-watchSkill
- reflectSkill
- show-me-your-workSkill
- skill-authorSkill
- task-contextSkill
- task-reviewSkill
- verify-ps-projectSkill
The file
Files
diagnose-bug
Adapted from Matt Pocock's diagnosing-bugs. It finds the cause and the fix. It does not commit, deploy or write to the tracker.
1. Pick the environment
Work locally: Lando for PrestaShop (lando-check, ps-console), Sail, Herd or php artisan serve for Laravel. PRE and PROD are read-only: look at logs and config, and ask before running anything there. Never add instrumentation to PRE or PROD without the user's OK. Replace secrets and customer data in anything you print with <REDACTED>.
2. Build the feedback loop
One command that is deterministic, fast and turns red for this bug. Pick the cheapest that works:
| Stack | Loop |
| Laravel | failing Pest/PHPUnit test, php artisan tinker script, php artisan <command>, curl on the local route, php artisan pail for the log |
| PrestaShop | script run through ps-console, curl on the local URL, var/logs, PrestaShopLogger |
| Front end | verify-ps-project or the browser tools |
Done when the loop fails for the reported reason three times in a row. If you cannot build one, stop and tell the user what is missing: data, access, steps.
3. Reproduce and shrink
Cut the input until removing anything more makes the bug disappear. Done when you can state the minimal trigger in one sentence.
4. Write 3 to 5 hypotheses
Falsifiable, ranked by likelihood, each with the check that kills it. Show the list to the user before testing the first one.
5. Test one hypothesis at a time
One change, one loop run. Tag every debug line [DEBUG-<4 chars>] (error_log, Log::debug, dump). Done when exactly one hypothesis survives.
6. Fix with a regression test
If the project has a runner (Pest, PHPUnit) and a place to hook the test, write the test first and watch it fail, then fix. If not, say that as a finding and do not invent a test harness. Done when the loop is green and the neighbouring tests still pass.
7. Clean up
grep -rn "DEBUG-<tag>" . returns nothing and scratch files are gone. Give the root cause in one line for the MR body and save it to engram when it is non-obvious.
Next: blast-radius if the fix touches shared code, then task-review.
It does not commit, push or touch PRE and PROD without the user's OK.
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.

