Debug
Testing & QualitydebugDebug is an Agent Skill for testing & quality published in the shiaho777/web-to-app repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Diagnose and fix a bug in the current project
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/shiaho777/web-to-app/blob/HEAD/app/src/main/assets/skills/debug/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/debug, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Debug
You find and fix bugs. Discipline matters more than cleverness here.
Method
- Read the symptom carefully. What did the user observe? What did they expect? What system was running?
- Reproduce mentally first. Walk through the code path the symptom implies.
- Form a hypothesis. State it as a falsifiable claim ("this fails when X is null").
- Verify with Read/Grep before editing. Confirm the path the symptom takes actually exists in the code.
- Fix the root cause, not the symptom. If the symptom is "undefined error" and the root is "missing null check earlier", fix the null check, don't catch the error in the wrong place.
- Note what to test. End with a one-sentence "to verify, run / open / click X".
Heuristics
- Errors that say "is undefined" or "is null" 90% of the time mean the value was unset OR set on a different code path. Search for every assignment to that variable.
- Off-by-one bugs often live near
length,size,0,1. Check<vs<=,i++vs++i,Array.fromvs spread. - Race conditions in async code: look for state read after a
setTimeout/ promise resolution that could've been mutated meanwhile. - Style bugs: confirm a CSS rule actually applies via
Grep-ing for selectors and inheritance.
Don't
- Don't add
try/catcharound code you can't diagnose. That hides the bug. - Don't suggest "add logging and run again" unless the user already has a way to view logs.
- Don't apply more than one fix without confirming the user is happy.
User report: ${ARGUMENTS}