{"id":"e398d661-6d91-4e24-8bb1-43d522fc685b","shortId":"Kfw28n","kind":"skill","title":"bug-hunter","tagline":"Systematically finds and fixes bugs using proven debugging techniques. Traces from symptoms to root cause, implements fixes, and prevents regression.","description":"# Bug Hunter\n\nSystematically hunt down and fix bugs using proven debugging techniques. No guessing—follow the evidence.\n\n## When to Use This Skill\n\n- User reports a bug or error\n- Something isn't working as expected\n- User says \"fix the bug\" or \"debug this\"\n- Intermittent failures or weird behavior\n- Production issues need investigation\n\n## The Debugging Process\n\n### 1. Reproduce the Bug\n\nFirst, make it happen consistently:\n\n```\n1. Get exact steps to reproduce\n2. Try to reproduce locally\n3. Note what triggers it\n4. Document the error message/behavior\n5. Check if it happens every time or randomly\n```\n\nIf you can't reproduce it, gather more info:\n- What environment? (dev, staging, prod)\n- What browser/device?\n- What user actions preceded it?\n- Any error logs?\n\n### 2. Gather Evidence\n\nCollect all available information:\n\n**Check logs:**\n```bash\n# Application logs\ntail -f logs/app.log\n\n# System logs\njournalctl -u myapp -f\n\n# Browser console\n# Open DevTools → Console tab\n```\n\n**Check error messages:**\n- Full stack trace\n- Error type and message\n- Line numbers\n- Timestamp\n\n**Check state:**\n- What data was being processed?\n- What was the user trying to do?\n- What's in the database?\n- What's in local storage/cookies?\n\n### 3. Form a Hypothesis\n\nBased on evidence, guess what's wrong:\n\n```\n\"The login times out because the session cookie \nexpires before the auth check completes\"\n\n\"The form fails because email validation regex \ndoesn't handle plus signs\"\n\n\"The API returns 500 because the database query \nhas a syntax error with special characters\"\n```\n\n### 4. Test the Hypothesis\n\nProve or disprove your guess:\n\n**Add logging:**\n```javascript\nconsole.log('Before API call:', userData);\nconst response = await api.login(userData);\nconsole.log('After API call:', response);\n```\n\n**Use debugger:**\n```javascript\ndebugger; // Execution pauses here\nconst result = processData(input);\n```\n\n**Isolate the problem:**\n```javascript\n// Comment out code to narrow down\n// const result = complexFunction();\nconst result = { mock: 'data' }; // Use mock data\n```\n\n### 5. Find Root Cause\n\nTrace back to the actual problem:\n\n**Common root causes:**\n- Null/undefined values\n- Wrong data types\n- Race conditions\n- Missing error handling\n- Incorrect logic\n- Off-by-one errors\n- Async/await issues\n- Missing validation\n\n**Example trace:**\n```\nSymptom: \"Cannot read property 'name' of undefined\"\n↓\nWhere: user.profile.name\n↓\nWhy: user.profile is undefined\n↓\nWhy: API didn't return profile\n↓\nWhy: User ID was null\n↓\nRoot cause: Login didn't set user ID in session\n```\n\n### 6. Implement Fix\n\nFix the root cause, not the symptom:\n\n**Bad fix (symptom):**\n```javascript\n// Just hide the error\nconst name = user?.profile?.name || 'Unknown';\n```\n\n**Good fix (root cause):**\n```javascript\n// Ensure user ID is set on login\nconst login = async (credentials) => {\n  const user = await authenticate(credentials);\n  if (user) {\n    session.userId = user.id; // Fix: Set user ID\n    return user;\n  }\n  throw new Error('Invalid credentials');\n};\n```\n\n### 7. Test the Fix\n\nVerify it actually works:\n\n```\n1. Reproduce the original bug\n2. Apply the fix\n3. Try to reproduce again (should fail)\n4. Test edge cases\n5. Test related functionality\n6. Run existing tests\n```\n\n### 8. Prevent Regression\n\nAdd a test so it doesn't come back:\n\n```javascript\ntest('login sets user ID in session', async () => {\n  const user = await login({ email: 'test@example.com', password: 'pass' });\n  \n  expect(session.userId).toBe(user.id);\n  expect(session.userId).not.toBeNull();\n});\n```\n\n## Debugging Techniques\n\n### Binary Search\n\nCut the problem space in half repeatedly:\n\n```javascript\n// Does the bug happen before or after this line?\nconsole.log('CHECKPOINT 1');\n// ... code ...\nconsole.log('CHECKPOINT 2');\n// ... code ...\nconsole.log('CHECKPOINT 3');\n```\n\n### Rubber Duck Debugging\n\nExplain the code line by line out loud. Often you'll spot the issue while explaining.\n\n### Print Debugging\n\nStrategic console.logs:\n\n```javascript\nconsole.log('Input:', input);\nconsole.log('After transform:', transformed);\nconsole.log('Before save:', data);\nconsole.log('Result:', result);\n```\n\n### Diff Debugging\n\nCompare working vs broken:\n- What changed recently?\n- What's different between environments?\n- What's different in the data?\n\n### Time Travel Debugging\n\nUse git to find when it broke:\n\n```bash\ngit bisect start\ngit bisect bad  # Current commit is broken\ngit bisect good abc123  # This old commit worked\n# Git will check out commits for you to test\n```\n\n## Common Bug Patterns\n\n### Null/Undefined\n\n```javascript\n// Bug\nconst name = user.profile.name;\n\n// Fix\nconst name = user?.profile?.name || 'Unknown';\n\n// Better fix\nif (!user || !user.profile) {\n  throw new Error('User profile required');\n}\nconst name = user.profile.name;\n```\n\n### Race Condition\n\n```javascript\n// Bug\nlet data = null;\nfetchData().then(result => data = result);\nconsole.log(data); // null - not loaded yet\n\n// Fix\nconst data = await fetchData();\nconsole.log(data); // correct value\n```\n\n### Off-by-One\n\n```javascript\n// Bug\nfor (let i = 0; i <= array.length; i++) {\n  console.log(array[i]); // undefined on last iteration\n}\n\n// Fix\nfor (let i = 0; i < array.length; i++) {\n  console.log(array[i]);\n}\n```\n\n### Type Coercion\n\n```javascript\n// Bug\nif (count == 0) { // true for \"\", [], null\n  \n// Fix\nif (count === 0) { // only true for 0\n```\n\n### Async Without Await\n\n```javascript\n// Bug\nconst result = asyncFunction(); // Returns Promise\nconsole.log(result.data); // undefined\n\n// Fix\nconst result = await asyncFunction();\nconsole.log(result.data); // correct value\n```\n\n## Debugging Tools\n\n### Browser DevTools\n\n```\nConsole: View logs and errors\nSources: Set breakpoints, step through code\nNetwork: Check API calls and responses\nApplication: View cookies, storage, cache\nPerformance: Find slow operations\n```\n\n### Node.js Debugging\n\n```javascript\n// Built-in debugger\nnode --inspect app.js\n\n// Then open chrome://inspect in Chrome\n```\n\n### VS Code Debugging\n\n```json\n// .vscode/launch.json\n{\n  \"type\": \"node\",\n  \"request\": \"launch\",\n  \"name\": \"Debug App\",\n  \"program\": \"${workspaceFolder}/app.js\"\n}\n```\n\n## When You're Stuck\n\n1. Take a break (seriously, walk away for 10 minutes)\n2. Explain it to someone else (or a rubber duck)\n3. Search for the exact error message\n4. Check if it's a known issue (GitHub issues, Stack Overflow)\n5. Simplify: Create minimal reproduction\n6. Start over: Delete and rewrite the problematic code\n7. Ask for help (provide context, what you've tried)\n\n## Documentation Template\n\nAfter fixing, document it:\n\n```markdown\n## Bug: Login timeout after 30 seconds\n\n**Symptom:** Users get logged out immediately after login\n\n**Root Cause:** Session cookie expires before auth check completes\n\n**Fix:** Increased session timeout from 30s to 3600s in config\n\n**Files Changed:**\n- config/session.js (line 12)\n\n**Testing:** Verified login persists for 1 hour\n\n**Prevention:** Added test for session persistence\n```\n\n## Key Principles\n\n- Reproduce first, fix second\n- Follow the evidence, don't guess\n- Fix root cause, not symptoms\n- Test the fix thoroughly\n- Add tests to prevent regression\n- Document what you learned\n\n## Related Skills\n\n- `@systematic-debugging` - Advanced debugging\n- `@test-driven-development` - Testing\n- `@codebase-audit-pre-push` - Code review\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["bug","hunter","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-bug-hunter","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/bug-hunter","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34882 github stars · SKILL.md body (7,634 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T12:50:42.102Z","embedding":null,"createdAt":"2026-04-18T21:33:47.489Z","updatedAt":"2026-04-24T12:50:42.102Z","lastSeenAt":"2026-04-24T12:50:42.102Z","tsv":"'/app.js':832 '0':711,726,739,746,750 '1':78,87,453,540,837,950 '10':845 '12':944 '2':93,141,458,544,847 '3':98,205,462,548,857 '30':911 '30s':935 '3600s':937 '4':103,257,469,864 '5':108,315,473,876 '500':245 '6':385,477,881 '7':445,890 '8':481 'abc123':631 'action':135 'actual':323,451 'ad':953 'add':266,484,979 'advanc':993 'api':243,271,281,365,790 'api.login':277 'app':829 'app.js':812 'appli':459 'applic':151,794 'array':716,731 'array.length':713,728 'ask':891,1040 'async':423,501,751 'async/await':345 'asyncfunct':758,768 'audit':1002 'auth':227,927 'authent':428 'avail':146 'await':276,427,504,696,753,767 'away':843 'back':320,492 'bad':395,623 'base':209 'bash':150,617 'behavior':70 'better':661 'binari':519 'bisect':619,622,629 'boundari':1048 'break':840 'breakpoint':784 'broke':616 'broken':592,627 'browser':162,775 'browser/device':132 'bug':2,8,24,31,49,62,81,457,531,646,650,678,707,736,755,907 'bug-hunt':1 'built':807 'built-in':806 'cach':798 'call':272,282,791 'cannot':352 'case':472 'caus':18,318,327,376,391,412,922,972 'chang':594,941 'charact':256 'check':109,148,168,181,228,638,789,865,928 'checkpoint':539,543,547 'chrome':817 'clarif':1042 'clear':1015 'code':301,541,545,554,787,819,889,1005 'codebas':1001 'codebase-audit-pre-push':1000 'coercion':734 'collect':144 'come':491 'comment':299 'commit':625,634,640 'common':325,645 'compar':589 'complet':229,929 'complexfunct':307 'condit':334,676 'config':939 'config/session.js':942 'consist':86 'consol':163,166,777 'console.log':269,279,538,542,546,573,576,580,584,687,698,715,730,761,769 'console.logs':571 'const':274,291,305,308,403,421,425,502,651,655,672,694,756,765 'context':895 'cooki':223,796,924 'correct':700,771 'count':738,745 'creat':878 'credenti':424,429,444 'criteria':1051 'current':624 'cut':521 'data':184,311,314,331,583,606,680,685,688,695,699 'databas':199,248 'debug':11,34,64,76,517,551,569,588,609,773,804,820,828,992,994 'debugg':285,287,809 'delet':884 'describ':1019 'dev':128 'develop':998 'devtool':165,776 'didn':366,378 'diff':587 'differ':598,603 'disprov':263 'document':104,900,904,984 'doesn':237,489 'driven':997 'duck':550,856 'edg':471 'els':852 'email':234,506 'ensur':414 'environ':127,600,1031 'environment-specif':1030 'error':51,106,139,169,174,253,336,344,402,442,668,781,862 'everi':113 'evid':40,143,211,966 'exact':89,861 'exampl':349 'execut':288 'exist':479 'expect':57,510,514 'expert':1036 'expir':224,925 'explain':552,567,848 'f':154,161 'fail':232,468 'failur':67 'fetchdata':682,697 'file':940 'find':5,316,613,800 'first':82,961 'fix':7,20,30,60,387,388,396,410,434,448,461,654,662,693,722,743,764,903,930,962,970,977 'follow':38,964 'form':206,231 'full':171 'function':476 'gather':123,142 'get':88,915 'git':611,618,621,628,636 'github':872 'good':409,630 'guess':37,212,265,969 'half':526 'handl':239,337 'happen':85,112,532 'help':893 'hide':400 'hour':951 'hunt':27 'hunter':3,25 'hypothesi':208,260 'id':372,382,416,437,498 'immedi':918 'implement':19,386 'incorrect':338 'increas':931 'info':125 'inform':147 'input':294,574,575,1045 'inspect':811,815 'intermitt':66 'invalid':443 'investig':74 'isn':53 'isol':295 'issu':72,346,565,871,873 'iter':721 'javascript':268,286,298,398,413,493,528,572,649,677,706,735,754,805 'journalctl':158 'json':821 'key':958 'known':870 'last':720 'launch':826 'learn':987 'let':679,709,724 'limit':1007 'line':178,537,555,557,943 'll':562 'load':691 'local':97,203 'log':140,149,152,157,267,779,916 'logic':339 'login':217,377,420,422,495,505,908,920,947 'logs/app.log':155 'loud':559 'make':83 'markdown':906 'match':1016 'messag':170,177,863 'message/behavior':107 'minim':879 'minut':846 'miss':335,347,1053 'mock':310,313 'myapp':160 'name':355,404,407,652,656,659,673,827 'narrow':303 'need':73 'network':788 'new':441,667 'node':810,824 'node.js':803 'not.tobenull':516 'note':99 'null':374,681,689,742 'null/undefined':328,648 'number':179 'off-by-on':340,702 'often':560 'old':633 'one':343,705 'open':164,814 'oper':802 'origin':456 'output':1025 'overflow':875 'pass':509 'password':508 'pattern':647 'paus':289 'perform':799 'permiss':1046 'persist':948,957 'plus':240 'pre':1003 'preced':136 'prevent':22,482,952,982 'principl':959 'print':568 'problem':297,324,523 'problemat':888 'process':77,187 'processdata':293 'prod':130 'product':71 'profil':369,406,658,670 'program':830 'promis':760 'properti':354 'prove':261 'proven':10,33 'provid':894 'push':1004 'queri':249 'race':333,675 'random':116 're':835 'read':353 'recent':595 'regex':236 'regress':23,483,983 'relat':475,988 'repeat':527 'report':47 'reproduc':79,92,96,121,454,465,960 'reproduct':880 'request':825 'requir':671,1044 'respons':275,283,793 'result':292,306,309,585,586,684,686,757,766 'result.data':762,770 'return':244,368,438,759 'review':1006,1037 'rewrit':886 'root':17,317,326,375,390,411,921,971 'rubber':549,855 'run':478 'safeti':1047 'save':582 'say':59 'scope':1018 'search':520,858 'second':912,963 'serious':841 'session':222,384,500,923,932,956 'session.userid':432,511,515 'set':380,418,435,496,783 'sign':241 'simplifi':877 'skill':45,989,1010 'skill-bug-hunter' 'slow':801 'someon':851 'someth':52 'sourc':782 'source-sickn33' 'space':524 'special':255 'specif':1032 'spot':563 'stack':172,874 'stage':129 'start':620,882 'state':182 'step':90,785 'stop':1038 'storag':797 'storage/cookies':204 'strateg':570 'stuck':836 'substitut':1028 'success':1050 'symptom':15,351,394,397,913,974 'syntax':252 'system':156 'systemat':4,26,991 'systematic-debug':990 'tab':167 'tail':153 'take':838 'task':1014 'techniqu':12,35,518 'templat':901 'test':258,446,470,474,480,486,494,644,945,954,975,980,996,999,1034 'test-driven-develop':995 'test@example.com':507 'thorough':978 'throw':440,666 'time':114,218,607 'timeout':909,933 'timestamp':180 'tobe':512 'tool':774 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':13,173,319,350 'transform':578,579 'travel':608 'treat':1023 'tri':94,192,463,899 'trigger':101 'true':740,748 'type':175,332,733,823 'u':159 'undefin':357,363,718,763 'unknown':408,660 'use':9,32,43,284,312,610,1008 'user':46,58,134,191,371,381,405,415,426,431,436,439,497,503,657,664,669,914 'user.id':433,513 'user.profile':361,665 'user.profile.name':359,653,674 'userdata':273,278 'valid':235,348,1033 'valu':329,701,772 've':898 'verifi':449,946 'view':778,795 'vs':591,818 'vscode/launch.json':822 'walk':842 'weird':69 'without':752 'work':55,452,590,635 'workspacefold':831 'wrong':215,330 'yet':692","prices":[{"id":"2af397d0-96f8-4a85-b005-e58c74cec030","listingId":"e398d661-6d91-4e24-8bb1-43d522fc685b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:33:47.489Z"}],"sources":[{"listingId":"e398d661-6d91-4e24-8bb1-43d522fc685b","source":"github","sourceId":"sickn33/antigravity-awesome-skills/bug-hunter","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/bug-hunter","isPrimary":false,"firstSeenAt":"2026-04-18T21:33:47.489Z","lastSeenAt":"2026-04-24T12:50:42.102Z"}],"details":{"listingId":"e398d661-6d91-4e24-8bb1-43d522fc685b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"bug-hunter","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34882,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"2dc312d3d13bcc343f7f64dbea6dd37add84f6ca","skill_md_path":"skills/bug-hunter/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/bug-hunter"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"bug-hunter","description":"Systematically finds and fixes bugs using proven debugging techniques. Traces from symptoms to root cause, implements fixes, and prevents regression."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/bug-hunter"},"updatedAt":"2026-04-24T12:50:42.102Z"}}