[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75W2H01926TSSSRRN735FNC":3,"skill-same:01M75W2H01926TSSSRRN735FNC":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M75W2H01926TSSSRRN735FNC","bug-debugging",null,"Investigate reproducible software bugs and identify likely root causes. Includes API debugging. Use when asked to debug crashes, regressions, inconsistent outputs, logic errors, broken endpoints, auth failures, bad payloads, timeouts, or schema mismatches. Do not use for feature planning or code style cleanup.","ItWasYou-SAM\u002FSkill-is-All-you-Need","ItWasYou-SAM","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255364315?v=4","01M75VMN2DKTF5V9QPG2D5PBY0","Sam","01M75VMN31FCZMM9RZ4W8ZHCR4",6,"MIT","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F06-code-quality\u002Fbug-debugging\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: bug-debugging\ndescription: Investigate reproducible software bugs and identify likely root causes. Includes API debugging. Use when asked to debug crashes, regressions, inconsistent outputs, logic errors, broken endpoints, auth failures, bad payloads, timeouts, or schema mismatches. Do not use for feature planning or code style cleanup.\n---\n\n# Bug Debugging\n\n## Goal\nFind the smallest evidence-backed explanation for a bug.\n\n## When to use\n- Crash or exception with stack trace\n- Regression after recent change\n- Inconsistent output between environments\n- Logic error producing wrong results\n- Flaky test or intermittent failure\n\n## When not to use\n- Feature planning or design\n- Code style cleanup or formatting\n- Performance optimization without a specific bug\n- Architecture decisions\n- Use debugging-and-error-recovery for broader recovery strategies and incident playbooks\n\n## Inputs to collect\n- Expected behavior\n- Actual behavior\n- Reproduction steps\n- Logs, traces, stack traces\n- Relevant files or commits\n\n## Process\n1. Restate expected vs actual behavior.\n2. Reproduce if possible.\n3. Narrow the failing layer.\n4. Form 2 to 3 root-cause hypotheses.\n5. Rank them by evidence.\n6. Propose the safest smallest fix.\n7. Define validation steps.\n\n## Failure-mode taxonomy by stack\n\n### Node.js\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Unhandled Promise Rejection | Process crashes with `UnhandledPromiseRejectionWarning` | Missing `.catch()` on async calls |\n| Memory Leak | RSS grows over time, eventual OOM | `process.memoryUsage()`, heap snapshot |\n| Event Loop Blocking | High latency, timeouts, unresponsive | Sync I\u002FO in hot path, `perf_hooks.monitorEventLoopDelay()` |\n| Module Resolution Failure | `MODULE_NOT_FOUND` | Check `node_modules`, symlinks, monorepo config |\n| TypeScript Build Error | Type mismatch at compile time | `tsc --noEmit`, check tsconfig paths |\n\n### Python\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| GIL Contention | CPU-bound threads don't parallelize | `threading` + CPU work → use `multiprocessing` |\n| Import Circular Dependency | `ImportError: cannot import name` | Check import order, use `TYPE_CHECKING` |\n| NoneType Error | `AttributeError: 'NoneType'` has no attribute | Check return values, add None guards |\n| Virtual Env Mismatch | Wrong package version installed | `which python`, `pip list`, check `.venv` |\n| Encoding Error | `UnicodeDecodeError` | Check file encoding, use `errors='replace'` |\n| Asyncio Never Awaits | Coroutine runs but doesn't execute | Check for missing `await`, event loop running |\n\n### Go\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Goroutine Leak | Memory grows, goroutine count increases | `runtime.NumGoroutine()`, check channel blocking |\n| Channel Deadlock | `fatal error: all goroutines are asleep` | Unbuffered channels, missing receivers |\n| Nil Pointer Dereference | `panic: invalid memory address` | Check error returns, nil checks on interfaces |\n| Race Condition | `go build -race` detects | Shared state without mutex, use channels |\n| Import Cycle | `import cycle not allowed` | Restructure packages, use interfaces |\n\n## Reproduction time budget\n\n| Bug Type | Reproduction Strategy | Max Time |\n|----------|----------------------|----------|\n| UI bug | Screenshot + DOM inspection + CSS diff | 10 min |\n| API bug | Request\u002Fresponse capture + wiremock | 15 min |\n| Performance bug | Profile → flamegraph → hotspot | 20 min |\n| Concurrency bug | Stress test + race detector | 30 min |\n| Data bug | DB snapshot + query reproduction | 15 min |\n| Environment bug | Docker compose + env diff | 20 min |\n\n## Log triage order\n\n1. **Error logs** — exact error message and stack trace\n2. **Warning logs** — degraded state indicators\n3. **Request logs** — input parameters and timing\n4. **State logs** — before\u002Fafter snapshots\n5. **Metric logs** — CPU, memory, latency at time of failure\n\n## Rollback rules\n\n| Severity | Action | Time Limit |\n|----------|--------|------------|\n| Critical (production down) | Rollback immediately, investigate after | 5 min |\n| High (feature broken) | Rollback if fix > 30 min | 30 min |\n| Medium (degraded) | Hotfix if possible, rollback if not | 2 hours |\n| Low (cosmetic) | Fix forward, no rollback | Next release |\n\n## Bug reproduction from tickets\n\nWhen reproducing from a bug report or ticket:\n\n1. Parse signals: error messages, reproduction steps, affected area.\n2. Route to appropriate test strategy based on affected area.\n3. Locate source files and trace the code path.\n4. Form a clear, testable hypothesis.\n5. Write a failing test that reproduces the bug.\n6. Run and classify the result.\n\n### Rules\n- Do not fix the bug — only reproduce it with a failing test\n- Leave test files in place as evidence\n- Maximum 3 attempts before declaring UNCONFIRMED\n- Hard bailout: requires real API credentials, race conditions, manual UI interaction\n\n### Confidence levels\n\n| Level | Criteria |\n|-------|----------|\n| CONFIRMED | Test fails consistently, matches hypothesis |\n| LIKELY | Test fails but failure mode differs slightly |\n| UNCONFIRMED | Cannot trigger the failure |\n| SKIPPED | Hard bailout trigger hit |\n| ALREADY_FIXED | Bug no longer reproduces |\n\n### Reproduction report format\n- Ticket ID and title\n- Confidence level: CONFIRMED \u002F LIKELY \u002F UNCONFIRMED \u002F SKIPPED \u002F ALREADY_FIXED\n- Root cause description\n- Location (file, lines, issue)\n- Failing test path and description\n- Fix hint (pseudocode or approach)\n\n## API debugging\n\nWhen debugging backend API failures:\n\n1. Identify endpoint, caller, environment, and auth path.\n2. Check request shape, headers, params, and payload.\n3. Check response, logs, and traces.\n4. Compare behavior with expected contract.\n5. Determine failing layer.\n6. Recommend fix and verification steps.\n\n### API failure modes\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Auth failure | 401\u002F403, token expired | Check token expiry, scopes, audience |\n| Schema mismatch | 400\u002F422, validation error | Check request\u002Fresponse schema vs contract |\n| Timeout | Request hangs, 504 | Check upstream latency, connection pool |\n| Rate limiting | 429, quota exceeded | Check rate limit headers, backoff strategy |\n| Upstream failure | 502\u002F503, dependency error | Check dependency health, circuit breaker |\n\n## Output format\n- Summary\n- Reproduction\n- Root cause\n- Evidence\n- Fix\n- Validation\n","# Bug Debugging\n\n## Goal\nFind the smallest evidence-backed explanation for a bug.\n\n## When to use\n- Crash or exception with stack trace\n- Regression after recent change\n- Inconsistent output between environments\n- Logic error producing wrong results\n- Flaky test or intermittent failure\n\n## When not to use\n- Feature planning or design\n- Code style cleanup or formatting\n- Performance optimization without a specific bug\n- Architecture decisions\n- Use debugging-and-error-recovery for broader recovery strategies and incident playbooks\n\n## Inputs to collect\n- Expected behavior\n- Actual behavior\n- Reproduction steps\n- Logs, traces, stack traces\n- Relevant files or commits\n\n## Process\n1. Restate expected vs actual behavior.\n2. Reproduce if possible.\n3. Narrow the failing layer.\n4. Form 2 to 3 root-cause hypotheses.\n5. Rank them by evidence.\n6. Propose the safest smallest fix.\n7. Define validation steps.\n\n## Failure-mode taxonomy by stack\n\n### Node.js\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Unhandled Promise Rejection | Process crashes with `UnhandledPromiseRejectionWarning` | Missing `.catch()` on async calls |\n| Memory Leak | RSS grows over time, eventual OOM | `process.memoryUsage()`, heap snapshot |\n| Event Loop Blocking | High latency, timeouts, unresponsive | Sync I\u002FO in hot path, `perf_hooks.monitorEventLoopDelay()` |\n| Module Resolution Failure | `MODULE_NOT_FOUND` | Check `node_modules`, symlinks, monorepo config |\n| TypeScript Build Error | Type mismatch at compile time | `tsc --noEmit`, check tsconfig paths |\n\n### Python\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| GIL Contention | CPU-bound threads don't parallelize | `threading` + CPU work → use `multiprocessing` |\n| Import Circular Dependency | `ImportError: cannot import name` | Check import order, use `TYPE_CHECKING` |\n| NoneType Error | `AttributeError: 'NoneType'` has no attribute | Check return values, add None guards |\n| Virtual Env Mismatch | Wrong package version installed | `which python`, `pip list`, check `.venv` |\n| Encoding Error | `UnicodeDecodeError` | Check file encoding, use `errors='replace'` |\n| Asyncio Never Awaits | Coroutine runs but doesn't execute | Check for missing `await`, event loop running |\n\n### Go\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Goroutine Leak | Memory grows, goroutine count increases | `runtime.NumGoroutine()`, check channel blocking |\n| Channel Deadlock | `fatal error: all goroutines are asleep` | Unbuffered channels, missing receivers |\n| Nil Pointer Dereference | `panic: invalid memory address` | Check error returns, nil checks on interfaces |\n| Race Condition | `go build -race` detects | Shared state without mutex, use channels |\n| Import Cycle | `import cycle not allowed` | Restructure packages, use interfaces |\n\n## Reproduction time budget\n\n| Bug Type | Reproduction Strategy | Max Time |\n|----------|----------------------|----------|\n| UI bug | Screenshot + DOM inspection + CSS diff | 10 min |\n| API bug | Request\u002Fresponse capture + wiremock | 15 min |\n| Performance bug | Profile → flamegraph → hotspot | 20 min |\n| Concurrency bug | Stress test + race detector | 30 min |\n| Data bug | DB snapshot + query reproduction | 15 min |\n| Environment bug | Docker compose + env diff | 20 min |\n\n## Log triage order\n\n1. **Error logs** — exact error message and stack trace\n2. **Warning logs** — degraded state indicators\n3. **Request logs** — input parameters and timing\n4. **State logs** — before\u002Fafter snapshots\n5. **Metric logs** — CPU, memory, latency at time of failure\n\n## Rollback rules\n\n| Severity | Action | Time Limit |\n|----------|--------|------------|\n| Critical (production down) | Rollback immediately, investigate after | 5 min |\n| High (feature broken) | Rollback if fix > 30 min | 30 min |\n| Medium (degraded) | Hotfix if possible, rollback if not | 2 hours |\n| Low (cosmetic) | Fix forward, no rollback | Next release |\n\n## Bug reproduction from tickets\n\nWhen reproducing from a bug report or ticket:\n\n1. Parse signals: error messages, reproduction steps, affected area.\n2. Route to appropriate test strategy based on affected area.\n3. Locate source files and trace the code path.\n4. Form a clear, testable hypothesis.\n5. Write a failing test that reproduces the bug.\n6. Run and classify the result.\n\n### Rules\n- Do not fix the bug — only reproduce it with a failing test\n- Leave test files in place as evidence\n- Maximum 3 attempts before declaring UNCONFIRMED\n- Hard bailout: requires real API credentials, race conditions, manual UI interaction\n\n### Confidence levels\n\n| Level | Criteria |\n|-------|----------|\n| CONFIRMED | Test fails consistently, matches hypothesis |\n| LIKELY | Test fails but failure mode differs slightly |\n| UNCONFIRMED | Cannot trigger the failure |\n| SKIPPED | Hard bailout trigger hit |\n| ALREADY_FIXED | Bug no longer reproduces |\n\n### Reproduction report format\n- Ticket ID and title\n- Confidence level: CONFIRMED \u002F LIKELY \u002F UNCONFIRMED \u002F SKIPPED \u002F ALREADY_FIXED\n- Root cause description\n- Location (file, lines, issue)\n- Failing test path and description\n- Fix hint (pseudocode or approach)\n\n## API debugging\n\nWhen debugging backend API failures:\n\n1. Identify endpoint, caller, environment, and auth path.\n2. Check request shape, headers, params, and payload.\n3. Check response, logs, and traces.\n4. Compare behavior with expected contract.\n5. Determine failing layer.\n6. Recommend fix and verification steps.\n\n### API failure modes\n| Failure Mode | Symptoms | First Check |\n|--------------|----------|-------------|\n| Auth failure | 401\u002F403, token expired | Check token expiry, scopes, audience |\n| Schema mismatch | 400\u002F422, validation error | Check request\u002Fresponse schema vs contract |\n| Timeout | Request hangs, 504 | Check upstream latency, connection pool |\n| Rate limiting | 429, quota exceeded | Check rate limit headers, backoff strategy |\n| Upstream failure | 502\u002F503, dependency error | Check dependency health, circuit breaker |\n\n## Output format\n- Summary\n- Reproduction\n- Root cause\n- Evidence\n- Fix\n- Validation\n",{"name":5,"description":7},"master","f0b9a39cdf4f3e791e3acb54c8740ca23f704176","06-code-quality\u002Fbug-debugging",0,"https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM","https:\u002F\u002Fit-was-you-sam.vercel.app\u002F","AI Engineer ","2026-11-10 22:32:18",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ItWasYou-SAM\u002FSkill-is-All-you-Need --skill bug-debugging",{"tool":39,"command":40},"bunx","bunx skills add ItWasYou-SAM\u002FSkill-is-All-you-Need --skill bug-debugging",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ItWasYou-SAM\u002FSkill-is-All-you-Need --skill bug-debugging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F06-code-quality\u002Fbug-debugging\u002FSKILL.md",true,[],[48,55,62,69,75,81],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M75WFD9BZ3S2ZDECD86QP3T9","invoice-organizer","Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F12-business-productivity\u002Finvoice-organizer\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M75WF96VTQYB6FHW43DK9JZ3","file-organizer","Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F12-business-productivity\u002Ffile-organizer\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M75WF5VR42JXJZ5N6152R4P6","developer-growth-analysis","Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F12-business-productivity\u002Fdeveloper-growth-analysis\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75WF4PKRDZMHWSC90FVJM1R","connect","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F12-business-productivity\u002Fconnect\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M75WF1H9N7Y1C5V6TM397ZGJ","twitter-algorithm-optimizer","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F11-brand-marketing\u002Ftwitter-algorithm-optimizer\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M75WEZGF264KM1G13P0CTY4C","tailored-resume-generator","https:\u002F\u002Fgithub.com\u002FItWasYou-SAM\u002FSkill-is-All-you-Need\u002Fblob\u002Fmaster\u002F11-brand-marketing\u002Ftailored-resume-generator\u002FSKILL.md",[],[]]