[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QJ6AEDXX1751SSY6XV9CKW":3,"skill-same:01M6QJ6AEDXX1751SSY6XV9CKW":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":13,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6QJ6AEDXX1751SSY6XV9CKW","understand-error",null,"Master the art of correctly interpreting error messages, stack traces, and failure indicators. This skill encapsulates the judgment of WHAT an error really means, WHERE it originates, and WHY it occurred. Use when user encounters an error message, unexpected behavior, exception, or when code fails with any kind of diagnostic output. Triggers especially when user pastes an error message and asks \"what does this mean?\", \"why am I getting this error?\", \"how do I fix this?\", or \"error message explained\".","ImaginerLabs\u002Fskill-manager","ImaginerLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F214277308?v=4","01M6QGGDPNF15RMMT1RCFDH9FN","01M6QGGDTH5BY64DQ123NR8M33",0,"MIT","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fcoding\u002Funderstand-error\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"understand error","understand","error","master","error analysis","how to","triggers","judgment","message","do","code","Art","fix","coding","stack","why","how","analysis","messages","error messages","2026-11-10 10:12:30",false,"---\nname: understand-error\ndescription: >-\n  Master the art of correctly interpreting error messages, stack traces, and failure indicators. This skill encapsulates the judgment of WHAT an error really means, WHERE it originates, and WHY it occurred. Use when user encounters an error message, unexpected behavior, exception, or when code fails with any kind of diagnostic output. Triggers especially when user pastes an error message and asks \"what does this mean?\", \"why am I getting this error?\", \"how do I fix this?\", or \"error message explained\".\ncategory: coding\npriority: P0\ntrigger_patterns:\n  - \"what does this error mean\"\n  - \"why am I getting\"\n  - \"how to fix this error\"\n  - \"error message explained\"\n  - \"understand this error\"\n  - \"error analysis\"\n  - \"debug this error\"\n  - \"how to interpret\"\n---\n\n# Understand Error — Error Message Interpretation Framework\n\n## Overview\n\nUnderstand-error is a **behavioral specification skill** that encapsulates expert judgment for correctly interpreting error messages, stack traces, and diagnostic output.\n\nThe core judgment it provides: **\"What does this error REALLY mean, where did it come from, and what is the actual problem?\"**\n\nThis skill embodies the expertise of developers who can look at an error and immediately understand the root cause — not because they've seen it before, but because they know how to read errors systematically.\n\n## Core Philosophy\n\n### The Error Interpretation Paradox\n\n> \"Error messages are honest — they're telling you exactly what's wrong. The problem is you're not listening.\"\n\nMost developers see errors as obstacles. Expert developers see them as the code explaining itself.\n\n### The Error is Your Friend\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR AS COMMUNICATION                    │\n│                                                             │\n│    CODE: \"Something went wrong!\"                            │\n│         │                                                   │\n│         │ TRANSLATION                                       │\n│         ▼                                                   │\n│    ┌─────────────────────────────────────────────────────┐  │\n│    │ I tried to do X                                     │  │\n│    │ But Y was in an unexpected state                    │  │\n│    │ So I couldn't complete X                            │  │\n│    │ Here's exactly where I was (stack trace)            │  │\n│    │ Here's exactly what I saw (error details)           │  │\n│    └─────────────────────────────────────────────────────┘  │\n│                                                             │\n│    YOUR JOB: Figure out WHY Y was in that state            │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Behavioral Specification\n\n### Layer 1: Error Message Parsing\n\n#### 1.1 Anatomy of an Error\n\n```markdown\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR MESSAGE ANATOMY                     │\n│                                                             │\n│  TypeError: Cannot read property 'name' of undefined       │\n│  ────────┬────────── ───────────────────────────────┬────── │\n│          │                                        │        │\n│    ERROR TYPE                               ERROR DETAILS   │\n│    (What category)                         (What happened)  │\n│                                                             │\n│  at User.getFullName (User.ts:45)                          │\n│  ───────────────────────────────────────────┬─────────────  │\n│  WHERE (Stack trace)                        │ LINE NUMBER    │\n│                                            │                │\n│  at async UserController.handleRequest      │                │\n│  ───────────────────────────────────────────┘               │\n│  CALL STACK (How we got here)                               │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 1.2 Error Type Categories\n\n| Error Type | Implies | Investigation Direction |\n|------------|---------|--------------------------|\n| `TypeError` | Wrong type used | Check variable types |\n| `ReferenceError` | Variable not defined | Check spelling, scope |\n| `SyntaxError` | Invalid syntax | Check parsing |\n| `RangeError` | Value out of bounds | Check limits |\n| `EvalError` | eval() misuse | Avoid eval |\n| `URIError` | URI encoding issue | Check encode\u002Fdecode |\n| `AssertionError` | Condition failed | Check logic |\n\n#### 1.3 Reading the Error Details\n\n```typescript\n\u002F\u002F Error: \"Cannot read property 'name' of undefined\"\n\n\u002F\u002F BREAK IT DOWN:\n\"Cannot read property\"  \u002F\u002F You're accessing a property\n'of undefined'          \u002F\u002F The object is undefined\n'name'                  \u002F\u002F The property name\n\n\u002F\u002F TRANSLATE:\n\"The variable you're trying to access the 'name' property on\nis undefined at this point\"\n```\n\n### Layer 2: Stack Trace Analysis\n\n#### 2.1 Stack Trace Reading Order\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                  STACK TRACE READING                         │\n│                                                             │\n│  1. START AT THE BOTTOM                                    │\n│     └─ This is where execution began                        │\n│                                                             │\n│  2. READ UPWARD                                             │\n│     └─ Each line is who called the next                     │\n│                                                             │\n│  3. ERROR IS AT THE TOP (usually)                          │\n│     └─ This is where it actually broke                      │\n│                                                             │\n│  Example:                                                   │\n│                                                             │\n│  at handleClick (Button.tsx:45)        ◄── ERROR HERE     │\n│      at onPress (Touchable.tsx:89)                         │\n│          at Navigator.dispatch (Router.ts:200)              │\n│              at App.render (App.tsx:50)                    ◄── START HERE\n│                                                             │\n│  Translation: App.render called Navigator.dispatch,         │\n│  which called onPress, which called handleClick,            │\n│  which broke at line 45 in Button.tsx                      │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 2.2 Finding the Real Problem\n\nThe error is AT the problem, but the CAUSE is often BEFORE:\n\n```typescript\n\u002F\u002F Line 45: user.getFullName()\n\u002F\u002F            ^^^^ undefined here\n\n\u002F\u002F But WHY is user undefined?\n\u002F\u002F Look at line 30: const user = getUser(id);\n\u002F\u002F Look at getUser: returns undefined if id invalid\n\u002F\u002F Look at id: passed from request\n\u002F\u002F Conclusion: invalid id passed\n\n\u002F\u002F The error is at line 45\n\u002F\u002F The bug is at how id was validated\n```\n\n### Layer 3: Context Analysis\n\n#### 3.1 Five Whys for Errors\n\n```markdown\n## Root Cause Analysis: \"Cannot read property 'name' of undefined\"\n\nWHY 1: Why is 'name' being accessed on undefined?\n└─ Because user is undefined\n\nWHY 2: Why is user undefined?\n└─ Because getUserById returned undefined\n\nWHY 3: Why did getUserById return undefined?\n└─ Because the user ID doesn't exist in the database\n\nWHY 4: Why is a non-existent ID being queried?\n└─ Because the API endpoint didn't validate the ID parameter\n\nWHY 5: Why didn't the API validate the ID?\n└─ Because validation was not implemented\n\nCONCLUSION: Implement ID validation at API entry point\nFIX: Add schema validation for user ID parameter\n```\n\n#### 3.2 Error Context Checklist\n\nWhen analyzing an error, check these common causes:\n\n| Category | What to Check |\n|----------|---------------|\n| Null\u002FUndefined | Where should this value come from? |\n| Type Mismatch | What type is expected? What was passed? |\n| Async | Is there a missing await? |\n| Scope | Is the variable in scope? |\n| Import | Is the module imported correctly? |\n| Timing | Is the code running at the right time? |\n\n### Layer 4: Error Message Translation\n\n#### 4.1 Common Error Translations\n\n| Error Message | Real Meaning | Common Fix |\n|--------------|--------------|------------|\n| `Cannot read X of undefined` | X is undefined | Add null check or find why it's undefined |\n| `X is not a function` | X is not callable | Check if it's the right type |\n| `X is not defined` | X doesn't exist in scope | Check spelling, imports |\n| `Cannot set property X of undefined` | Object X doesn't exist | Create object first |\n| `X is not an array` | X should be array | Check type conversion |\n| `Unexpected token` | Syntax error | Check quotes, brackets, commas |\n| `Module not found` | Import path wrong | Check file path, extensions |\n| `Cyclic object value` | Circular reference | Check data structure |\n\n#### 4.2 Error Message Templates\n\n```markdown\n## Template: \"Cannot read [PROPERTY] of [UNDEFINED_REASON]\"\n\nPattern: You're accessing [property] on something that is [undefined\u002Fnull]\n\nQuestions to Ask:\n1. Where does [property] come from?\n2. Why is [undefined_reason]?\n3. What should [undefined_reason] be?\n4. Where should it be set?\n\n## Template: \"[TYPE] is not a [EXPECTED_TYPE]\"\n\nPattern: Variable has wrong type\n\nQuestions to Ask:\n1. What type do you expect?\n2. What type is it actually?\n3. Where is it created?\n4. Where is type checking\u002Fvalidation?\n\n## Template: \"[FUNCTION] is not defined\"\n\nPattern: Variable\u002Ffunction not in scope\n\nQuestions to Ask:\n1. Is it spelled correctly?\n2. Is it imported?\n3. Is it in scope?\n4. Is it declared before use?\n```\n\n### Layer 5: From Error to Fix\n\n#### 5.1 The Error → Fix Flow\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR → FIX WORKFLOW                      │\n│                                                             │\n│  ERROR MESSAGE                                              │\n│      │                                                     │\n│      ▼                                                     │\n│  PARSE (What happened?)                                     │\n│      │                                                     │\n│      ▼                                                     │\n│  LOCATE (Where in code?)                                    │\n│      │                                                     │\n│      ▼                                                     │\n│  TRACE (Why did it happen?)                                 │\n│      │                                                     │\n│      ▼                                                     │\n│  HYPOTHESIZE (What would fix it?)                           │\n│      │                                                     │\n│      ▼                                                     │\n│  VERIFY (Does fix work?)                                    │\n│      │                                                     │\n│      ▼                                                     │\n│  PREVENT (Test for regression?)                             │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 5.2 Fix Quality Checklist\n\n```markdown\n## Fix Verification\n\n□ Does the original error still occur without the fix?\n□ Does the fix actually solve the root cause?\n□ Will this fix break anything else?\n□ Is this a symptom fix or a root cause fix?\n□ Should I add a test for this case?\n□ Is there a better way to handle this?\n□ Did I introduce new potential errors?\n```\n\n## Common Error Patterns\n\n### Pattern 1: Async\u002FAwait Errors\n\n```typescript\n\u002F\u002F Error: \"async\u002Fawait is only valid in async functions\"\n\u002F\u002F OR: \"Promise resolved before async operation completed\"\n\nCommon Causes:\n- Forgetting 'async' keyword\n- Not awaiting an async call\n- Mixing callbacks with async\u002Fawait\n\nDiagnosis:\n- Check if function is marked 'async'\n- Check if all async calls have 'await'\n- Check if promise handling is correct\n```\n\n### Pattern 2: Object\u002FArray Errors\n\n```typescript\n\u002F\u002F Error: \"Cannot read property 'X' of undefined\"\n\u002F\u002F OR: \"X is not iterable\"\n\nCommon Causes:\n- Accessing index beyond array bounds\n- Accessing property on null\u002Fundefined\n- Destructuring from non-object\n\nDiagnosis:\n- Check initial value\n- Check if it was reassigned\n- Check if API returned expected type\n```\n\n### Pattern 3: Import\u002FModule Errors\n\n```typescript\n\u002F\u002F Error: \"Module not found\"\n\u002F\u002F OR: \"Cannot find module\"\n\nCommon Causes:\n- Wrong path\n- Wrong file extension\n- Case sensitivity\n- Circular dependencies\n\nDiagnosis:\n- Verify file exists\n- Check path matches exactly\n- Check case sensitivity\n- Check package.json exports\n```\n\n### Pattern 4: Type Errors\n\n```typescript\n\u002F\u002F Error: \"Argument of type 'X' is not assignable to parameter of type 'Y'\"\n\u002F\u002F OR: \"Property 'X' does not exist on type 'Y'\"\n\nCommon Causes:\n- Type inference too narrow\n- Missing type annotation\n- Wrong type imported\n- Using 'any' too liberally\n\nDiagnosis:\n- Check type definitions\n- Check what TS infers\n- Check import types\n- Consider type widening\n```\n\n## Advanced Error Analysis\n\n### Analyzing Minified Stack Traces\n\n```markdown\nWhen stack traces are minified:\n\n1. Look for source maps (xxxx.js.map)\n2. Use browser DevTools to unminify\n3. Look for recognizable function names\n4. Check if build is production mode\n\nExample Minified:\nat n (a.1234.js:1)\nat r (b.5678.js:2)\n\nWhat to do:\n- Enable source maps in dev\n- Check console for original location\n- Use 'Pause on caught exceptions'\n```\n\n### Analyzing Network Errors\n\n| Error | Meaning | Investigation |\n|-------|---------|---------------|\n| 400 Bad Request | Invalid request | Check request body\u002Fparams |\n| 401 Unauthorized | Not authenticated | Check auth token |\n| 403 Forbidden | Authenticated but no permission | Check user roles |\n| 404 Not Found | Resource doesn't exist | Check URL, resource ID |\n| 500 Server Error | Server exception | Check server logs |\n| Network Error | Connection failed | Check network, CORS |\n\n### Analyzing Memory\u002FPerformance Errors\n\n```markdown\n\"Maximum call stack exceeded\"\n└─ Infinite recursion — check base case in recursive function\n\n\"Out of memory\"\n└─ Memory leak — check for unbounded data structures\n\n\"Execution timeout\"\n└─ Infinite loop or too much work — check loops, algorithms\n```\n\n## Key Principles\n\n### 1. Read the Error (Actually Read It)\n\nMost developers skim errors. Actually read every word — they're trying to tell you something.\n\n### 2. Trust the Stack Trace\n\nThe stack trace is honest. If it says line 45, the problem is accessible from line 45. The question is WHY it has that value.\n\n### 3. One Error at a Time\n\nFix one error, then see if others were downstream effects. Don't try to fix everything at once.\n\n### 4. Reproduce Before Fixing\n\nMake the error happen reliably before attempting to fix it. If you can't reproduce, you can't verify the fix.\n\n### 5. The First Error is Usually the Root Cause\n\nDon't assume the first error is a symptom. Usually it's the root. Fix that first.\n\n## Relationship to Other Skills\n\n- `debug-session` — Uses this skill for error understanding\n- `reproduce-bug` — Complementary skill for reliable reproduction\n- `trace-execution` — Follows error understanding in debug flow\n- `test-think` — Write tests to prevent future errors\n- `understand-error` — This IS this skill (self-referential)\n","# Understand Error — Error Message Interpretation Framework\n\n## Overview\n\nUnderstand-error is a **behavioral specification skill** that encapsulates expert judgment for correctly interpreting error messages, stack traces, and diagnostic output.\n\nThe core judgment it provides: **\"What does this error REALLY mean, where did it come from, and what is the actual problem?\"**\n\nThis skill embodies the expertise of developers who can look at an error and immediately understand the root cause — not because they've seen it before, but because they know how to read errors systematically.\n\n## Core Philosophy\n\n### The Error Interpretation Paradox\n\n> \"Error messages are honest — they're telling you exactly what's wrong. The problem is you're not listening.\"\n\nMost developers see errors as obstacles. Expert developers see them as the code explaining itself.\n\n### The Error is Your Friend\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR AS COMMUNICATION                    │\n│                                                             │\n│    CODE: \"Something went wrong!\"                            │\n│         │                                                   │\n│         │ TRANSLATION                                       │\n│         ▼                                                   │\n│    ┌─────────────────────────────────────────────────────┐  │\n│    │ I tried to do X                                     │  │\n│    │ But Y was in an unexpected state                    │  │\n│    │ So I couldn't complete X                            │  │\n│    │ Here's exactly where I was (stack trace)            │  │\n│    │ Here's exactly what I saw (error details)           │  │\n│    └─────────────────────────────────────────────────────┘  │\n│                                                             │\n│    YOUR JOB: Figure out WHY Y was in that state            │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Behavioral Specification\n\n### Layer 1: Error Message Parsing\n\n#### 1.1 Anatomy of an Error\n\n```markdown\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR MESSAGE ANATOMY                     │\n│                                                             │\n│  TypeError: Cannot read property 'name' of undefined       │\n│  ────────┬────────── ───────────────────────────────┬────── │\n│          │                                        │        │\n│    ERROR TYPE                               ERROR DETAILS   │\n│    (What category)                         (What happened)  │\n│                                                             │\n│  at User.getFullName (User.ts:45)                          │\n│  ───────────────────────────────────────────┬─────────────  │\n│  WHERE (Stack trace)                        │ LINE NUMBER    │\n│                                            │                │\n│  at async UserController.handleRequest      │                │\n│  ───────────────────────────────────────────┘               │\n│  CALL STACK (How we got here)                               │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 1.2 Error Type Categories\n\n| Error Type | Implies | Investigation Direction |\n|------------|---------|--------------------------|\n| `TypeError` | Wrong type used | Check variable types |\n| `ReferenceError` | Variable not defined | Check spelling, scope |\n| `SyntaxError` | Invalid syntax | Check parsing |\n| `RangeError` | Value out of bounds | Check limits |\n| `EvalError` | eval() misuse | Avoid eval |\n| `URIError` | URI encoding issue | Check encode\u002Fdecode |\n| `AssertionError` | Condition failed | Check logic |\n\n#### 1.3 Reading the Error Details\n\n```typescript\n\u002F\u002F Error: \"Cannot read property 'name' of undefined\"\n\n\u002F\u002F BREAK IT DOWN:\n\"Cannot read property\"  \u002F\u002F You're accessing a property\n'of undefined'          \u002F\u002F The object is undefined\n'name'                  \u002F\u002F The property name\n\n\u002F\u002F TRANSLATE:\n\"The variable you're trying to access the 'name' property on\nis undefined at this point\"\n```\n\n### Layer 2: Stack Trace Analysis\n\n#### 2.1 Stack Trace Reading Order\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                  STACK TRACE READING                         │\n│                                                             │\n│  1. START AT THE BOTTOM                                    │\n│     └─ This is where execution began                        │\n│                                                             │\n│  2. READ UPWARD                                             │\n│     └─ Each line is who called the next                     │\n│                                                             │\n│  3. ERROR IS AT THE TOP (usually)                          │\n│     └─ This is where it actually broke                      │\n│                                                             │\n│  Example:                                                   │\n│                                                             │\n│  at handleClick (Button.tsx:45)        ◄── ERROR HERE     │\n│      at onPress (Touchable.tsx:89)                         │\n│          at Navigator.dispatch (Router.ts:200)              │\n│              at App.render (App.tsx:50)                    ◄── START HERE\n│                                                             │\n│  Translation: App.render called Navigator.dispatch,         │\n│  which called onPress, which called handleClick,            │\n│  which broke at line 45 in Button.tsx                      │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 2.2 Finding the Real Problem\n\nThe error is AT the problem, but the CAUSE is often BEFORE:\n\n```typescript\n\u002F\u002F Line 45: user.getFullName()\n\u002F\u002F            ^^^^ undefined here\n\n\u002F\u002F But WHY is user undefined?\n\u002F\u002F Look at line 30: const user = getUser(id);\n\u002F\u002F Look at getUser: returns undefined if id invalid\n\u002F\u002F Look at id: passed from request\n\u002F\u002F Conclusion: invalid id passed\n\n\u002F\u002F The error is at line 45\n\u002F\u002F The bug is at how id was validated\n```\n\n### Layer 3: Context Analysis\n\n#### 3.1 Five Whys for Errors\n\n```markdown\n## Root Cause Analysis: \"Cannot read property 'name' of undefined\"\n\nWHY 1: Why is 'name' being accessed on undefined?\n└─ Because user is undefined\n\nWHY 2: Why is user undefined?\n└─ Because getUserById returned undefined\n\nWHY 3: Why did getUserById return undefined?\n└─ Because the user ID doesn't exist in the database\n\nWHY 4: Why is a non-existent ID being queried?\n└─ Because the API endpoint didn't validate the ID parameter\n\nWHY 5: Why didn't the API validate the ID?\n└─ Because validation was not implemented\n\nCONCLUSION: Implement ID validation at API entry point\nFIX: Add schema validation for user ID parameter\n```\n\n#### 3.2 Error Context Checklist\n\nWhen analyzing an error, check these common causes:\n\n| Category | What to Check |\n|----------|---------------|\n| Null\u002FUndefined | Where should this value come from? |\n| Type Mismatch | What type is expected? What was passed? |\n| Async | Is there a missing await? |\n| Scope | Is the variable in scope? |\n| Import | Is the module imported correctly? |\n| Timing | Is the code running at the right time? |\n\n### Layer 4: Error Message Translation\n\n#### 4.1 Common Error Translations\n\n| Error Message | Real Meaning | Common Fix |\n|--------------|--------------|------------|\n| `Cannot read X of undefined` | X is undefined | Add null check or find why it's undefined |\n| `X is not a function` | X is not callable | Check if it's the right type |\n| `X is not defined` | X doesn't exist in scope | Check spelling, imports |\n| `Cannot set property X of undefined` | Object X doesn't exist | Create object first |\n| `X is not an array` | X should be array | Check type conversion |\n| `Unexpected token` | Syntax error | Check quotes, brackets, commas |\n| `Module not found` | Import path wrong | Check file path, extensions |\n| `Cyclic object value` | Circular reference | Check data structure |\n\n#### 4.2 Error Message Templates\n\n```markdown\n## Template: \"Cannot read [PROPERTY] of [UNDEFINED_REASON]\"\n\nPattern: You're accessing [property] on something that is [undefined\u002Fnull]\n\nQuestions to Ask:\n1. Where does [property] come from?\n2. Why is [undefined_reason]?\n3. What should [undefined_reason] be?\n4. Where should it be set?\n\n## Template: \"[TYPE] is not a [EXPECTED_TYPE]\"\n\nPattern: Variable has wrong type\n\nQuestions to Ask:\n1. What type do you expect?\n2. What type is it actually?\n3. Where is it created?\n4. Where is type checking\u002Fvalidation?\n\n## Template: \"[FUNCTION] is not defined\"\n\nPattern: Variable\u002Ffunction not in scope\n\nQuestions to Ask:\n1. Is it spelled correctly?\n2. Is it imported?\n3. Is it in scope?\n4. Is it declared before use?\n```\n\n### Layer 5: From Error to Fix\n\n#### 5.1 The Error → Fix Flow\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    ERROR → FIX WORKFLOW                      │\n│                                                             │\n│  ERROR MESSAGE                                              │\n│      │                                                     │\n│      ▼                                                     │\n│  PARSE (What happened?)                                     │\n│      │                                                     │\n│      ▼                                                     │\n│  LOCATE (Where in code?)                                    │\n│      │                                                     │\n│      ▼                                                     │\n│  TRACE (Why did it happen?)                                 │\n│      │                                                     │\n│      ▼                                                     │\n│  HYPOTHESIZE (What would fix it?)                           │\n│      │                                                     │\n│      ▼                                                     │\n│  VERIFY (Does fix work?)                                    │\n│      │                                                     │\n│      ▼                                                     │\n│  PREVENT (Test for regression?)                             │\n└─────────────────────────────────────────────────────────────┘\n```\n\n#### 5.2 Fix Quality Checklist\n\n```markdown\n## Fix Verification\n\n□ Does the original error still occur without the fix?\n□ Does the fix actually solve the root cause?\n□ Will this fix break anything else?\n□ Is this a symptom fix or a root cause fix?\n□ Should I add a test for this case?\n□ Is there a better way to handle this?\n□ Did I introduce new potential errors?\n```\n\n## Common Error Patterns\n\n### Pattern 1: Async\u002FAwait Errors\n\n```typescript\n\u002F\u002F Error: \"async\u002Fawait is only valid in async functions\"\n\u002F\u002F OR: \"Promise resolved before async operation completed\"\n\nCommon Causes:\n- Forgetting 'async' keyword\n- Not awaiting an async call\n- Mixing callbacks with async\u002Fawait\n\nDiagnosis:\n- Check if function is marked 'async'\n- Check if all async calls have 'await'\n- Check if promise handling is correct\n```\n\n### Pattern 2: Object\u002FArray Errors\n\n```typescript\n\u002F\u002F Error: \"Cannot read property 'X' of undefined\"\n\u002F\u002F OR: \"X is not iterable\"\n\nCommon Causes:\n- Accessing index beyond array bounds\n- Accessing property on null\u002Fundefined\n- Destructuring from non-object\n\nDiagnosis:\n- Check initial value\n- Check if it was reassigned\n- Check if API returned expected type\n```\n\n### Pattern 3: Import\u002FModule Errors\n\n```typescript\n\u002F\u002F Error: \"Module not found\"\n\u002F\u002F OR: \"Cannot find module\"\n\nCommon Causes:\n- Wrong path\n- Wrong file extension\n- Case sensitivity\n- Circular dependencies\n\nDiagnosis:\n- Verify file exists\n- Check path matches exactly\n- Check case sensitivity\n- Check package.json exports\n```\n\n### Pattern 4: Type Errors\n\n```typescript\n\u002F\u002F Error: \"Argument of type 'X' is not assignable to parameter of type 'Y'\"\n\u002F\u002F OR: \"Property 'X' does not exist on type 'Y'\"\n\nCommon Causes:\n- Type inference too narrow\n- Missing type annotation\n- Wrong type imported\n- Using 'any' too liberally\n\nDiagnosis:\n- Check type definitions\n- Check what TS infers\n- Check import types\n- Consider type widening\n```\n\n## Advanced Error Analysis\n\n### Analyzing Minified Stack Traces\n\n```markdown\nWhen stack traces are minified:\n\n1. Look for source maps (xxxx.js.map)\n2. Use browser DevTools to unminify\n3. Look for recognizable function names\n4. Check if build is production mode\n\nExample Minified:\nat n (a.1234.js:1)\nat r (b.5678.js:2)\n\nWhat to do:\n- Enable source maps in dev\n- Check console for original location\n- Use 'Pause on caught exceptions'\n```\n\n### Analyzing Network Errors\n\n| Error | Meaning | Investigation |\n|-------|---------|---------------|\n| 400 Bad Request | Invalid request | Check request body\u002Fparams |\n| 401 Unauthorized | Not authenticated | Check auth token |\n| 403 Forbidden | Authenticated but no permission | Check user roles |\n| 404 Not Found | Resource doesn't exist | Check URL, resource ID |\n| 500 Server Error | Server exception | Check server logs |\n| Network Error | Connection failed | Check network, CORS |\n\n### Analyzing Memory\u002FPerformance Errors\n\n```markdown\n\"Maximum call stack exceeded\"\n└─ Infinite recursion — check base case in recursive function\n\n\"Out of memory\"\n└─ Memory leak — check for unbounded data structures\n\n\"Execution timeout\"\n└─ Infinite loop or too much work — check loops, algorithms\n```\n\n## Key Principles\n\n### 1. Read the Error (Actually Read It)\n\nMost developers skim errors. Actually read every word — they're trying to tell you something.\n\n### 2. Trust the Stack Trace\n\nThe stack trace is honest. If it says line 45, the problem is accessible from line 45. The question is WHY it has that value.\n\n### 3. One Error at a Time\n\nFix one error, then see if others were downstream effects. Don't try to fix everything at once.\n\n### 4. Reproduce Before Fixing\n\nMake the error happen reliably before attempting to fix it. If you can't reproduce, you can't verify the fix.\n\n### 5. The First Error is Usually the Root Cause\n\nDon't assume the first error is a symptom. Usually it's the root. Fix that first.\n\n## Relationship to Other Skills\n\n- `debug-session` — Uses this skill for error understanding\n- `reproduce-bug` — Complementary skill for reliable reproduction\n- `trace-execution` — Follows error understanding in debug flow\n- `test-think` — Write tests to prevent future errors\n- `understand-error` — This IS this skill (self-referential)\n",{"name":5,"category":31,"priority":43,"description":7,"trigger_patterns":44},"P0",[45,46,47,48,49,22,50,51],"what does this error mean","why am I getting","how to fix this error","error message explained","understand this error","debug this error","how to interpret","main","b9a52d8e27455bdad953d64928696d028223ea1b","skills\u002Fcoding\u002Funderstand-error","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager","https:\u002F\u002Fgithub.com\u002FImaginerLabs","2026-04-18 16:27:13",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add ImaginerLabs\u002Fskill-manager --skill understand-error",{"tool":64,"command":65},"bunx","bunx skills add ImaginerLabs\u002Fskill-manager --skill understand-error",{"tool":67,"command":68},"pnpm","pnpm dlx skills add ImaginerLabs\u002Fskill-manager --skill understand-error","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fcoding\u002Funderstand-error\u002FSKILL.md",true,[],[73,98,119,140,164,181],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":38},"01M6QJCB2SD5KHC41ZDQC0GA1T","meeting-minutes","Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fmeeting-minutes\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,75,52,90,91,92,93,94,95,96,97],"meeting minutes","meeting","minutes","writing","github","copilot","generate","decisions","meetings","up","agenda","actionable","concise","follow-up","tree","true","action","for",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M6QJC71RRGTGNNFEHJG6S20G","documentation-writer","Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fdocumentation-writer\u002FSKILL.md",[],[105,106,107,83,84,85,108,109,110,111,112,113,52,114,115,116,117,94,95,118],"documentation","documentation writer","writer","https","quality","technical","technical writer","expert","documentation expert","structure","authoring","software","principles","high",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6QJC0V3C7C4R9768J1AJYWY","doc-coauthoring","Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002Fdoc-coauthoring\u002FSKILL.md",[],[126,127,83,128,129,105,130,131,132,133,134,135,52,136,137,115,138,139,94,97],"doc coauthoring","doc","workflow","official","tasks","decision","write","context","proposals","guide","refine","iteration","trigger","co",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"01M6QJBJ0YPVEWGEXZH3PJRRTT","code-review-workflow","Executes comprehensive 4-phase code review: basic review, quality check, bundle analysis, and test coverage. Should be used when the user mentions comprehensive code review, checking code quality, or reviewing staged changes with multi-phase analysis. This is the comprehensive review workflow, distinct from focused skills like frontend-code-review, staged-code-review, or code-change-test-designer.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002Fcode-review-workflow\u002FSKILL.md",[],[147,148,128,28,149,150,151,152,153,154,155,35,156,157,158,159,160,161,162,163],"code review","review","code review workflow","testing","frontend","test","change","code quality","code-review","check","coverage","quality check","basic","multi","comprehensive code review","with","phase",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":38},"01M6QJB7XNHV3VEEQF4W7FMWF6","code-change-test-designer","Analyzes code changes and designs comprehensive test cases. Reads diffs, summarizes capability changes, and designs test cases covering main flows and edge cases. Should be used when the user mentions test coverage, designing tests for code changes, or analyzing diff\u002Fcommit for testing purposes. Distinguished from code-review-workflow which provides comprehensive review, this skill focuses on test case design for code changes.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002Fcode-change-test-designer\u002FSKILL.md",[],[152,153,28,171,172,150,173,174,128,175,155,176,157,177,52,178,179,180,97,163],"designer","code change test designer","design","diffs","commit","edge","diff","tests","flows","which",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":38},"01M6QJB195WD7DCJWDMKWKB29S","skill-creator","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","https:\u002F\u002Fgithub.com\u002FImaginerLabs\u002Fskill-manager\u002Fblob\u002Fmain\u002Fskills\u002Fmeta-skills\u002Fskill-creator\u002FSKILL.md",[],[188,189,190,191,129,192,193,194,195,196,35,197,198,199,52,200,201,94,97,183],"skill creator","creator","performance","run evals","variance analysis","create","run","benchmark","Meta","improve","edit","evals","optimize","existing skill"]