error-resolver
系統化診斷與解決錯誤
遇到難以理解的錯誤訊息會浪費寶貴的開發時間。此技能提供結構化的五步驟方法論和全面的模式庫,可快速診斷和解決所有主流程式語言和框架中的錯誤。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“error-resolver”。 Error: Cannot find module express
预期结果:
Classification: Dependency / Error / Build-time
Root Cause: The express package is not installed in node_modules or is missing from package.json.
Immediate Fix:
1. Run: npm install express
2. Verify: Check that express appears in node_modules
Proper Fix:
1. Add express to package.json dependencies
2. Run: npm install
3. Commit package.json and package-lock.json
Prevention:
- Always run npm install after cloning
- Use npm ci in CI/CD pipelines
- Add dependencies via npm install --save, not manual edits
正在使用“error-resolver”。 TypeError: Cannot read property name of undefined
预期结果:
Classification: Type / Error / Runtime
Root Cause Analysis (5 Whys):
- Why 1? The object is undefined
- Why 2? API call returned null instead of object
- Why 3? User ID does not exist in database
- Why 4? Stale cache contained invalid ID
- Why 5? Cache invalidation not implemented
Solution: Add null check before property access and implement cache invalidation.
Code Change:
if (user && user.name) {
console.log(user.name);
} else {
console.log(User not found);
}
Prevention: Add TypeScript for compile-time type checking
安全审计
安全This skill contains only documentation and reference materials for error resolution patterns. All 1284 static findings are false positives - they are code examples in markdown files showing common errors and debugging commands, not executable code. The skill provides educational content about error diagnosis across multiple programming languages and does not execute any commands or access system resources.
风险因素
⚡ 包含脚本 (6)
⚙️ 外部命令 (1078)
🌐 网络访问 (48)
📁 文件系统访问 (15)
质量评分
你能构建什么
除錯生產環境事件
當生產環境發生錯誤時,使用此技能快速分類錯誤類型、解析堆疊追蹤,並與已知模式比對,找出適用於類似問題的解決方案。
解決開發阻礙
初級開發人員可以使用全面的模式庫來理解 Node.js、Python、React 和其他框架中的常見錯誤,不僅學習修復方法,還能學習預防策略。
建立團隊知識庫
使用重現系統記錄成功的錯誤解決方案,建立團隊專屬的解決方案知識庫,減少在重複問題上花費的時間。
试试这些提示
I encountered this error: [paste full error message]. I was trying to [describe what you were doing]. Can you help me diagnose and resolve it?
Analyze this stack trace: [paste stack trace]. The error occurs in [file/function name]. What is the root cause and how do I fix it?
I keep getting [error type] in my [language/framework] project. Check if there is a known pattern for this and suggest a permanent fix with prevention strategies.
I resolved an error: [describe error and solution]. Create a replay YAML file following the solution template format so I can reference this in the future.
最佳实践
- 尋求協助時提供包含堆疊追蹤的完整錯誤訊息,因為缺少上下文可能導致錯誤的診斷
- 使用重現 YAML 範本記錄成功的解決方案,為您的團隊建立可搜尋的知識庫
- 應用五個為什麼技術找出根本原因,而不僅僅是修補症狀,這能帶來更穩健的解決方案
避免
- 不要跳過分類步驟直接搜尋解決方案,因為錯誤診斷錯誤類型會浪費時間
- 避免在不理解根本原因的情況下應用修復,這通常會導致問題重複出現或產生新問題
- 不要在修復錯誤後忽略預防策略,這會導致重複解決相同的問題