{"id":"58c8cc82-6807-4513-95de-3d9078a461d7","shortId":"Hd4zPf","kind":"skill","title":"Stack Trace Analyzer","tagline":"Interprets error stack traces to pinpoint root cause, explain what went wrong, and suggest fixes.","description":"# Stack Trace Analyzer\n\n## What this skill does\n\nThis skill directs the agent to read a stack trace, identify which frame is the true origin of the bug (not just where the error was thrown), explain what each relevant frame means in plain English, diagnose the root cause, and propose 2–3 concrete fixes ranked by likelihood. It works with JavaScript, TypeScript, Python, Java, Go, Rust, and most other common stack trace formats.\n\nUse this when you have a crash report, a CI failure, or a wall of red text in your terminal and you want to understand it fast.\n\n## How to use\n\n### Claude Code / Cline\n\nCopy this file to `.agents/skills/stack-trace-analyzer/SKILL.md` in your project root.\n\nThen paste the stack trace and ask:\n- *\"Analyze this stack trace using the Stack Trace Analyzer skill.\"*\n- *\"Use the Stack Trace Analyzer skill — what went wrong and how do I fix it?\"*\n\nInclude any relevant context: the action that triggered the error, environment details (Node version, browser, OS), and any recent code changes.\n\n### Cursor\n\nAdd the \"Prompt / Instructions\" section below to your `.cursorrules` file. Then paste the stack trace into the chat.\n\n### Codex\n\nPaste the full stack trace and the relevant source files into the chat, then include the instructions below. Codex benefits from seeing the actual source code so it can match line numbers to real code.\n\n## The Prompt / Instructions for the Agent\n\nWhen given a stack trace, follow these steps:\n\n1. **Identify the language and runtime** from the trace format (Node.js, Python, JVM, Go panic, Rust panic, browser, etc.). Note the runtime version if visible.\n\n2. **Parse the error header.** Extract:\n   - Error type (e.g., `TypeError`, `NullPointerException`, `panic`, `KeyError`)\n   - Error message (the human-readable description)\n   - Any error codes or HTTP status codes present\n\n3. **Walk the stack frames top-to-bottom.** For each frame that belongs to application code (not a framework or standard library):\n   - State what the function does in plain English\n   - Note the file path and line number\n   - Explain why that frame is on the call stack (what called it)\n\n4. **Distinguish surface error from root cause.** The top frame is often just where the error was *detected*, not where it *originated*. Look deeper:\n   - Find the first frame in user-owned code that passed invalid data or made a wrong assumption\n   - Check for null/undefined propagation — where was the value supposed to be set?\n   - Check for async/promise chain breaks\n   - Check for type mismatches introduced by parsing or deserialization\n\n5. **State the root cause** in one clear sentence. Then explain the chain of events that led to it (2–4 sentences).\n\n6. **Suggest 2–3 fixes**, ordered from most likely to least likely:\n   - Each fix must be concrete: name the file, function, and line number if possible\n   - Explain what the fix does and why it solves the root cause\n   - Note any trade-offs or edge cases the fix introduces\n\n7. **Flag anything unusual**, such as:\n   - Async errors that swallowed earlier exceptions\n   - Framework internals that obscure the real caller\n   - Minified or transpiled frames where source maps are missing\n\n8. **Output format:**\n\n```\n## Error Summary\n**Type:** [ErrorType]\n**Message:** [Full error message]\n**Runtime:** [Language/runtime/version]\n\n## Frame Analysis\n1. `[file:line]` — [What this function does and why it's on the stack]\n2. `[file:line]` — ...\n...\n\n## Root Cause\n[One sentence identifying the true origin of the bug.]\n\n[2–4 sentences explaining the chain of events.]\n\n## Suggested Fixes\n\n### Fix 1 (Most Likely) — [Title]\n[Concrete description of the change, with file/function/line reference.]\n\n### Fix 2 — [Title]\n[...]\n\n### Fix 3 — [Title]\n[...]\n\n## Additional Notes\n[Any warnings about obscured frames, missing source maps, async issues, etc.]\n```\n\n## Example\n\n**Input to Agent:**\n> \"Use the Stack Trace Analyzer skill on this error:\n>\n> ```\n> TypeError: Cannot read properties of undefined (reading 'email')\n>     at formatUserDisplay (src/utils/format.ts:23:18)\n>     at UserCard (src/components/UserCard.tsx:41:12)\n>     at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:14985:18)\n>     at mountIndeterminateComponent (node_modules/react-dom/cjs/react-dom.development.js:17811:13)\n>     at beginWork (node_modules/react-dom/cjs/react-dom.development.js:19049:16)\n> ```\"\n\n**Output from Agent:**\n> ## Error Summary\n> **Type:** TypeError\n> **Message:** Cannot read properties of undefined (reading 'email')\n> **Runtime:** Browser / React (react-dom development build)\n>\n> ## Frame Analysis\n> 1. `src/utils/format.ts:23` — `formatUserDisplay` tried to read the `.email` property, but the value passed to it was `undefined`.\n> 2. `src/components/UserCard.tsx:41` — `UserCard` called `formatUserDisplay` with a `user` prop that was `undefined` at render time.\n> 3. React internals — these frames are React mounting the component; not relevant to the bug.\n>\n> ## Root Cause\n> `UserCard` is being rendered before its `user` prop is populated — likely because data is still loading from an async source when the component first mounts.\n>\n> The `user` prop arrives as `undefined` on the first render, `formatUserDisplay` does not guard against this, and accessing `.email` on `undefined` throws immediately.\n>\n> ## Suggested Fixes\n>\n> ### Fix 1 (Most Likely) — Add a loading guard in UserCard\n> In `src/components/UserCard.tsx`, return `null` or a skeleton UI when `user` is falsy: `if (!user) return <Skeleton />`. This prevents the component from trying to render before data is ready.\n>\n> ### Fix 2 — Add a null guard in formatUserDisplay\n> In `src/utils/format.ts:23`, add `if (!user?.email) return ''` before accessing the property. This makes the utility defensive and prevents crashes from any caller.\n>\n> ### Fix 3 — Ensure the parent always passes a defined user\n> Trace where `UserCard` is used and confirm the parent component does not render it until the data fetch is complete. Adding a `user &&` check at the call site prevents the component from mounting with undefined data.","tags":["stack","trace","analyzer","openagentskills","notysoty","agent-skills","claude","claude-code","claude-skills","cline","cursor","llm"],"capabilities":["skill","source-notysoty","skill-stack-trace-analyzer","topic-agent-skills","topic-claude","topic-claude-code","topic-claude-skills","topic-cline","topic-cursor","topic-llm","topic-llm-skills","topic-skills"],"categories":["openagentskills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Notysoty/openagentskills/stack-trace-analyzer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Notysoty/openagentskills","source_repo":"https://github.com/Notysoty/openagentskills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (6,099 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-05-18T19:13:24.943Z","embedding":null,"createdAt":"2026-05-18T13:20:47.053Z","updatedAt":"2026-05-18T19:13:24.943Z","lastSeenAt":"2026-05-18T19:13:24.943Z","tsv":"'1':255,540,579,684,786 '12':640 '13':652 '14985':645 '16':658 '17811':651 '18':635,646 '19049':657 '2':68,280,445,450,554,568,592,702,823 '23':634,686,832 '3':69,308,451,595,718,854 '4':358,446,569 '41':639,704 '5':426 '6':448 '7':497 '8':525 'access':777,839 'action':170 'actual':229 'ad':883 'add':187,789,824,833 'addit':597 'agent':30,246,613,661 'agents/skills/stack-trace-analyzer/skill.md':128 'alway':858 'analysi':539,683 'analyz':3,21,140,148,154,618 'anyth':499 'applic':323 'arriv':763 'ask':139 'assumpt':399 'async':503,607,753 'async/promise':414 'beginwork':654 'belong':321 'benefit':225 'bottom':316 'break':416 'browser':179,272,675 'bug':45,567,732 'build':681 'call':353,356,706,889 'caller':515,852 'cannot':624,667 'case':493 'caus':11,65,364,430,485,558,734 'chain':415,438,573 'chang':185,587 'chat':204,218 'check':400,412,417,886 'ci':100 'claud':121 'clear':433 'cline':123 'code':122,184,231,240,302,306,324,390 'codex':205,224 'common':87 'complet':882 'compon':727,757,813,872,893 'concret':70,464,583 'confirm':869 'context':168 'copi':124 'crash':97,849 'cursor':186 'cursorrul':195 'data':394,747,819,879,898 'deeper':381 'defens':846 'defin':861 'descript':299,584 'deseri':425 'detail':176 'detect':375 'develop':680 'diagnos':62 'direct':28 'distinguish':359 'dom':679 'e.g':288 'earlier':507 'edg':492 'email':630,673,692,778,836 'english':61,338 'ensur':855 'environ':175 'error':5,50,174,283,286,293,301,361,373,504,528,534,622,662 'errortyp':531 'etc':273,609 'event':440,575 'exampl':610 'except':508 'explain':12,53,346,436,474,571 'extract':285 'failur':101 'falsi':806 'fast':117 'fetch':880 'file':126,196,215,341,467,541,555 'file/function/line':589 'find':382 'first':384,758,768 'fix':18,71,163,452,461,477,495,577,578,591,594,784,785,822,853 'flag':498 'follow':252 'format':90,264,527 'formatuserdisplay':632,687,707,770,829 'frame':38,57,312,319,349,367,385,519,538,603,682,722 'framework':327,509 'full':208,533 'function':334,468,545 'given':248 'go':82,268 'guard':773,792,827 'header':284 'http':304 'human':297 'human-read':296 'identifi':36,256,561 'immedi':782 'includ':165,220 'input':611 'instruct':190,222,243 'intern':510,720 'interpret':4 'introduc':421,496 'invalid':393 'issu':608 'java':81 'javascript':78 'jvm':267 'keyerror':292 'languag':258 'language/runtime/version':537 'least':458 'led':442 'librari':330 'like':456,459,581,745,788 'likelihood':74 'line':236,344,470,542,556 'load':750,791 'look':380 'made':396 'make':843 'map':522,606 'match':235 'mean':58 'messag':294,532,535,666 'minifi':516 'mismatch':420 'miss':524,604 'modules/react-dom/cjs/react-dom.development.js':644,650,656 'mount':725,759,895 'mountindeterminatecompon':648 'must':462 'name':465 'node':177,643,649,655 'node.js':265 'note':274,339,486,598 'null':798,826 'null/undefined':402 'nullpointerexcept':290 'number':237,345,471 'obscur':512,602 'off':490 'often':369 'one':432,559 'order':453 'origin':42,379,564 'os':180 'output':526,659 'own':389 'panic':269,271,291 'parent':857,871 'pars':281,423 'pass':392,697,859 'past':134,198,206 'path':342 'pinpoint':9 'plain':60,337 'popul':744 'possibl':473 'present':307 'prevent':811,848,891 'project':131 'prompt':189,242 'prop':711,742,762 'propag':403 'properti':626,669,693,841 'propos':67 'python':80,266 'rank':72 'react':676,678,719,724 'react-dom':677 'read':32,625,629,668,672,690 'readabl':298 'readi':821 'real':239,514 'recent':183 'red':106 'refer':590 'relev':56,167,213,729 'render':716,738,769,817,875 'renderwithhook':642 'report':98 'return':797,809,837 'root':10,64,132,363,429,484,557,733 'runtim':260,276,536,674 'rust':83,270 'section':191 'see':227 'sentenc':434,447,560,570 'set':411 'site':890 'skeleton':801 'skill':24,27,149,155,619 'skill-stack-trace-analyzer' 'solv':482 'sourc':214,230,521,605,754 'source-notysoty' 'src/components/usercard.tsx':638,703,796 'src/utils/format.ts':633,685,831 'stack':1,6,19,34,88,136,142,146,152,200,209,250,311,354,553,616 'standard':329 'state':331,427 'status':305 'step':254 'still':749 'suggest':17,449,576,783 'summari':529,663 'suppos':408 'surfac':360 'swallow':506 'termin':110 'text':107 'throw':781 'thrown':52 'time':717 'titl':582,593,596 'top':314,366 'top-to-bottom':313 'topic-agent-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-skills' 'topic-cline' 'topic-cursor' 'topic-llm' 'topic-llm-skills' 'topic-skills' 'trace':2,7,20,35,89,137,143,147,153,201,210,251,263,617,863 'trade':489 'trade-off':488 'transpil':518 'tri':688,815 'trigger':172 'true':41,563 'type':287,419,530,664 'typeerror':289,623,665 'typescript':79 'ui':802 'undefin':628,671,701,714,765,780,897 'understand':115 'unusu':500 'use':91,120,144,150,614,867 'user':388,710,741,761,804,808,835,862,885 'user-own':387 'usercard':637,705,735,794,865 'util':845 'valu':407,696 'version':178,277 'visibl':279 'walk':309 'wall':104 'want':113 'warn':600 'went':14,157 'work':76 'wrong':15,158,398","prices":[{"id":"6c8154c4-282b-45c2-ade1-6c902fb983aa","listingId":"58c8cc82-6807-4513-95de-3d9078a461d7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Notysoty","category":"openagentskills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:47.053Z"}],"sources":[{"listingId":"58c8cc82-6807-4513-95de-3d9078a461d7","source":"github","sourceId":"Notysoty/openagentskills/stack-trace-analyzer","sourceUrl":"https://github.com/Notysoty/openagentskills/tree/main/skills/stack-trace-analyzer","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:47.053Z","lastSeenAt":"2026-05-18T19:13:24.943Z"}],"details":{"listingId":"58c8cc82-6807-4513-95de-3d9078a461d7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Notysoty","slug":"stack-trace-analyzer","github":{"repo":"Notysoty/openagentskills","stars":8,"topics":["agent-skills","claude","claude-code","claude-skills","cline","cursor","llm","llm-skills","skills"],"license":"mit","html_url":"https://github.com/Notysoty/openagentskills","pushed_at":"2026-03-28T06:50:19Z","description":"A  community-driven library of reusable AI agent skills for Claude Code, Cursor, Codex, Cline, and more.","skill_md_sha":"b352aa59b92d4005943eb248816d169bbfebb349","skill_md_path":"skills/stack-trace-analyzer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Notysoty/openagentskills/tree/main/skills/stack-trace-analyzer"},"layout":"multi","source":"github","category":"openagentskills","frontmatter":{"name":"Stack Trace Analyzer","description":"Interprets error stack traces to pinpoint root cause, explain what went wrong, and suggest fixes."},"skills_sh_url":"https://skills.sh/Notysoty/openagentskills/stack-trace-analyzer"},"updatedAt":"2026-05-18T19:13:24.943Z"}}