मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग6.0k · #14480

bug-detective

यह क्या करती है

यह स्किल आपके AI को कोड के bugs, exceptions और विफलताएँ ढूँढने का चरण-दर-चरण तरीका देती है। यह उन लोगों के लिए है जिनका कोड टूटा है और जो सावधानी से, सबूत पर आधारित सुधार चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आपके पास जाँचने के लिए कोई error message, exception या stack trace हो।
  • ✓जब कोई चीज़ टूट गई हो या कोई फ़ीचर अचानक काम करना बंद कर दे।
  • ✓जब आप पूछें कि कोई कोड क्यों विफल हो रहा है और कारण साफ़ न हो।

Skill का लिंक

https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/bug-detective/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/bug-detective/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरा लॉगिन पेज पिछले deploy के बाद 500 error दे रहा है। कारण ढूँढिए और उसे ठीक कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट error की जानकारी इकट्ठा करता है, error के प्रकार को छाँटता है, संभावित कारण बनाता है, हर एक को जाँचता है, और फिर सुधार लागू करके उसे परखता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Bug Detective

A systematic debugging workflow for investigating and resolving code errors, exceptions, and failures. Provides structured debugging methods and common error pattern recognition.

Core Philosophy

Debugging is a scientific problem-solving process that requires:

  1. Understand the problem - Clearly define symptoms and expected behavior
  2. Gather evidence - Collect error messages, logs, stack traces
  3. Form hypotheses - Infer possible causes based on evidence
  4. Verify hypotheses - Confirm or eliminate causes through experiments
  5. Resolve the issue - Apply fixes and verify

Debugging Workflow

Step 1: Understand the Problem

Before starting to debug, clarify the following information:

Required information to collect:

  • Complete error message content
  • Exact location of the error (filename and line number)
  • Reproduction steps (how to trigger the error)
  • Expected behavior vs actual behavior
  • Environment info (OS, versions, dependencies)

Question template:

1. What is the exact error message?
2. Which file and line does the error occur at?
3. How can this issue be reproduced? Provide detailed steps.
4. What was the expected result? What actually happened?
5. What recent changes might have introduced this issue?

Step 2: Analyze Error Type

Choose a debugging strategy based on error type:

Error Type Characteristics Debugging Method
Syntax Error Code cannot be parsed Check syntax, bracket matching, quotes
Import Error ModuleNotFoundError Check module installation, path config
Type Error TypeError Check data types, type conversions
Attribute Error AttributeError Check if object attribute exists
Key Error KeyError Check if dictionary key exists
Index Error IndexError Check list/array index range
Null Reference NoneType/NullPointerException Check if variable is None
Network Error ConnectionError/Timeout Check network connection, URL, timeout settings
Permission Error PermissionError Check file permissions, user permissions
Resource Error FileNotFoundError Check if file path exists

Step 3: Locate the Problem Source

Use the following methods to locate the issue:

1. Binary Search Method

  • Comment out half the code, check if the problem persists
  • Progressively narrow the scope until the problematic code is found

2. Log Tracing

  • Add print/logging statements at key locations
  • Track variable value changes
  • Confirm code execution path

3. Breakpoint Debugging

  • Use debugger breakpoint functionality
  • Step through code execution
  • Inspect variable state

4. Stack Trace Analysis

  • Find the call chain from the stack trace in the error message
  • Determine the direct cause of the error
  • Trace back to the root cause

Step 4: Form and Verify Hypotheses

Hypothesis framework:

Hypothesis: [problem description] causes [error phenomenon]

Verification steps:
1. [verification method 1]
2. [verification method 2]

Expected results:
- If hypothesis is correct: [expected phenomenon]
- If hypothesis is wrong: [expected phenomenon]

Step 5: Apply Fix

After fixing, verify:

  1. The original error is resolved
  2. No new errors have been introduced
  3. Related functionality still works correctly
  4. Tests added to prevent regression

Python Common Error Patterns

1. Indentation Errors

2. Mutable Default Arguments

3. Closure Issues in Loops

4. Modifying a List While Iterating

5. Using is for String Comparison

6. Forgetting to Call super().__init__()

JavaScript/TypeScript Common Error Patterns

1. this Binding Issues

2. Async Error Handling

3. Object Reference Comparison

Bash/Zsh Common Error Patterns

1. Spacing Issues

# ❌ No spaces allowed in assignment
name = "John"  # Error: tries to run 'name' command

# ✅ Correct assignment
name="John"

# ❌ Missing spaces in conditional test
if[$name -eq 1]; then  # Error

# ✅ Correct
if [ $name -eq 1 ]; then

2. Quoting Issues

# ❌ Variables not expanded inside single quotes
echo 'The value is $var'  # Output: The value is $var

# ✅ Use double quotes
echo "The value is $var"  # Output: The value is actual_value

# ❌ Using backticks for command substitution (confusing)
result=`command`

# ✅ Use $()
result=$(command)

3. Unquoted Variables

अक्सर पूछे जाने वाले सवाल

मुझे कौन सी जानकारी देनी चाहिए?

पूरा error message, अगर पता हो तो फ़ाइल और लाइन, उसे दोबारा करने के चरण, और आपको क्या होने की उम्मीद थी।

क्या यह अंदाज़े से सुधार बताती है?

नहीं। यह संभावित कारण बनाती है और कोड बदलने से पहले हर एक को जाँचती है।

क्या इसे आम error patterns पता हैं?

हाँ। जाँच को तेज़ करने के लिए इसमें आम error patterns शामिल हैं।

जानकारी

लेखक का मूल विवरण

This skill should be used when the user asks to "debug this", "fix this error", "investigate this bug", "troubleshoot this issue", "find the problem", "something is broken", "this isn't working", "why is this failing", or reports errors/exceptions/bugs. Provides systematic debugging workflow and common error patterns.

repo: Galaxy-Dawn/claude-scholar

लोकप्रियता

GitHub स्टार
6.0k
रैंकिंग में स्थान
#14480
लाइसेंस
MIT
अपडेट की गई
19/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-identifier

6.0k

यह आपके एजेंट को Claude Code agents बनाना सिखाती है, उनका नाम, trigger विवरण, system prompt और settings सही ढंग से लिखकर।

AI और एजेंटएजेंट

architecture-design

6.0k

यह आपके एजेंट को machine learning प्रोजेक्ट के कोड का मानक ढाँचा सिखाती है, और registrable हिस्से जोड़ते समय factory व registry पैटर्न का उपयोग करती है।

कोडिंगसामान्य कोडिंग

citation-verification

6.0k

यह आपके एजेंट को शैक्षणिक पेपर के हर citation को भरोसेमंद स्रोतों से मिलाना सिखाती है, ताकि नकली या गलत संदर्भ पकड़े जाएँ।

लेखन और डॉक्यूमेंटरिसर्च

code-review-excellence

6.0k

यह आपके एजेंट को code changes और pull requests की समीक्षा करने में मदद करती है, साफ़, विनम्र और प्राथमिकता वाली टिप्पणियों के साथ जो असली bugs पकड़ें।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills