Source profileQuality 91/100

Jamie-BitFlight/claude_skills/plugins/python3-development/skills/python3-bug/SKILL.md

python3-bug

Debug functional issues in Python code using specs, logs, and observed behavior. Use when a feature isn't working as specified, when investigating runtime errors, or when scoping a problem before implementing a fix.

Source repository stars
64
Declared platforms
0
Static risk flags
0
Last source update
2026-08-28
Source checked
2026-08-28

Decision brief

What it does: where it fits

The model investigates functional bugs using specifications, logs, and observed behavior to scope the problem before implementing fixes.

Best for

  • Use when a feature isn't working as specified, when investigating runtime errors, or when scoping a problem before implementing a fix.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/Jamie-BitFlight/claude_skills --skill "plugins/python3-development/skills/python3-bug"
Safe inspection promptEditorial

Inspect the Agent Skill "python3-bug" from https://github.com/Jamie-BitFlight/claude_skills/blob/a00194f25fec502d3d659b7d610369614967251e/plugins/python3-development/skills/python3-bug/SKILL.md at commit a00194f25fec502d3d659b7d610369614967251e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Instructions

    Consult ../python3-development/references/python3-standards.md when applying shared architecture, typing, testing, or CLI rules; full standards, graphs, and amendment process are documented there.

    Gather context from user (spec, logs, reproduction steps)Scope the problem (what works, what doesn't, boundaries)Form hypotheses about root cause
  2. 02

    Phase 1: Problem Intake

    Ask for these if not provided:

    Ask for these if not provided:
  3. 03

    Phase 2: Problem Scoping

    Establish what works and what doesn't:

    Establish what works and what doesn't:
  4. 04

    Phase 3: Hypothesis Formation

    Based on symptoms, form multiple hypotheses:

    Based on symptoms, form multiple hypotheses:
  5. 05

    Phase 4: Systematic Investigation

    Review the “Phase 4: Systematic Investigation” section in the pinned source before continuing.

    Review and apply the “Phase 4: Systematic Investigation” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars64SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
Jamie-BitFlight/claude_skills
Skill path
plugins/python3-development/skills/python3-bug/SKILL.md
Commit
a00194f25fec502d3d659b7d610369614967251e
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

<problem_description>$ARGUMENTS</problem_description>

Python Functional Bug Investigation

The model investigates functional bugs using specifications, logs, and observed behavior to scope the problem before implementing fixes.

Arguments

<problem_description/>

Instructions

Consult ../python3-development/references/python3-standards.md when applying shared architecture, typing, testing, or CLI rules; full standards, graphs, and amendment process are documented there.

  1. Gather context from user (spec, logs, reproduction steps)
  2. Scope the problem (what works, what doesn't, boundaries)
  3. Form hypotheses about root cause
  4. Investigate systematically with evidence
  5. Propose fix only after understanding root cause

Phase 1: Problem Intake

Required Information

Ask for these if not provided:

SPECIFICATION
- [ ] What should the feature do? (spec, user story, acceptance criteria)
- [ ] What behavior is expected?

OBSERVED BEHAVIOR
- [ ] What actually happens?
- [ ] Error messages (exact text)
- [ ] Logs (relevant sections)

REPRODUCTION
- [ ] Steps to reproduce
- [ ] Input data that triggers the bug
- [ ] Environment (Python version, OS, dependencies)

CONTEXT
- [ ] When did it last work? (if ever)
- [ ] What changed recently?
- [ ] Is it intermittent or consistent?

Intake Template

## Bug Report

**Expected Behavior**:
[What should happen according to spec]

**Actual Behavior**:
[What is happening]

**Error/Logs**:

[Paste exact error messages or relevant log output]


**Reproduction Steps**:
1. [First step]
2. [Second step]
3. [Step where failure occurs]

**Environment**:
- Python: [version]
- OS: [os]
- Relevant packages: [list]

**Recent Changes**:
[What changed before this started happening]

Phase 2: Problem Scoping

Define Boundaries

Establish what works and what doesn't:

WORKING
- [ ] [Feature X works correctly]
- [ ] [Feature Y works correctly]

NOT WORKING
- [ ] [Feature Z fails with error]
- [ ] [Feature W produces wrong output]

UNKNOWN
- [ ] [Feature V not tested yet]

Narrow the Scope

Questions to answer:
1. Is this a regression or never worked?
2. Does it fail for all inputs or specific ones?
3. Does it fail in all environments or specific ones?
4. Is the failure consistent or intermittent?
5. What's the smallest reproduction case?

Create Minimal Reproduction

# Minimal reproduction case
# Goal: Smallest code that demonstrates the bug


def test_reproduction():
    """Minimal reproduction of the bug."""
    # Setup
    input_data = {"key": "value"}  # Specific input that triggers bug

    # Action
    result = buggy_function(input_data)

    # Expected vs Actual
    assert result == expected, f"Got {result}, expected {expected}"

Phase 3: Hypothesis Formation

Generate Hypotheses

Based on symptoms, form multiple hypotheses:

## Hypothesis List

H1: [Description of potential cause]
    Evidence for: [what supports this]
    Evidence against: [what contradicts this]
    Test: [how to verify]

H2: [Description of potential cause]
    Evidence for: [what supports this]
    Evidence against: [what contradicts this]
    Test: [how to verify]

H3: [Description of potential cause]
    Evidence for: [what supports this]
    Evidence against: [what contradicts this]
    Test: [how to verify]

Common Bug Categories

CategorySymptomsInvestigation
Type ErrorAttributeError, TypeErrorCheck types at boundary
State MutationIntermittent, order-dependentLook for shared mutable state
Race ConditionIntermittent, timing-dependentCheck async/threading code
Edge CaseSpecific inputs failTest boundary conditions
IntegrationWorks in isolation, fails togetherCheck interface contracts
ConfigurationEnvironment-dependentCompare working vs failing env

Phase 4: Systematic Investigation

Tracing Approach

Follow the data flow:

1. INPUT: What data enters the function?
   - Log: input values, types, shapes

2. PROCESSING: What transformations occur?
   - Add debug logging at each step
   - Check intermediate values

3. OUTPUT: What comes out?
   - Compare actual vs expected output
   - Check return type and structure

4. SIDE EFFECTS: What else changes?
   - Database writes
   - File system changes
   - External API calls
   - Global state modifications

Debug Logging Pattern

import logging

logger = logging.getLogger(__name__)


def investigate_function(data: InputType) -> OutputType:
    logger.debug(f"INPUT: data={data!r}, type={type(data)}")

    # Step 1
    intermediate1 = process_step1(data)
    logger.debug(f"STEP1: intermediate1={intermediate1!r}")

    # Step 2
    intermediate2 = process_step2(intermediate1)
    logger.debug(f"STEP2: intermediate2={intermediate2!r}")

    # Step 3
    result = process_step3(intermediate2)
    logger.debug(f"OUTPUT: result={result!r}, type={type(result)}")

    return result

Hypothesis Testing

For each hypothesis:

def test_hypothesis_1():
    """Test H1: [hypothesis description]"""
    # Setup to isolate this hypothesis
    # ...

    # Action that should reveal if H1 is correct
    # ...

    # Assertion that confirms or refutes H1
    # If this passes, H1 is likely correct
    # If this fails, H1 is refuted

Phase 5: Root Cause Analysis

Evidence Collection

## Root Cause Evidence

**Confirmed Root Cause**: [description]

**Evidence**:
1. [File:line] - [what this shows]
2. [Log entry] - [what this shows]
3. [Test result] - [what this shows]

**Why This Causes the Bug**:
[Explanation of the causal chain from root cause to symptom]

**Eliminated Hypotheses**:
- H2: Ruled out because [evidence]
- H3: Ruled out because [evidence]

Fix Requirements

Before implementing fix:

## Fix Specification

**Root Cause**: [concise description]
**Location**: [file:line range]

**Fix Approach**:
[Description of what needs to change]

**Risks**:
- [Potential side effect 1]
- [Potential side effect 2]

**Test Coverage**:
- [ ] Test for original bug (regression test)
- [ ] Test for edge cases
- [ ] Test for potential side effects

Phase 6: Fix Implementation

Fix Checklist

BEFORE FIX
- [ ] Root cause identified with evidence
- [ ] Minimal reproduction exists
- [ ] Test coverage plan created

DURING FIX
- [ ] Fix addresses root cause (not symptoms)
- [ ] Fix is minimal (no scope creep)
- [ ] Regression test written first

AFTER FIX
- [ ] Regression test passes
- [ ] Existing tests still pass
- [ ] Edge case tests added
- [ ] Code review if significant change

Regression Test Pattern

def test_bug_12345_description():
    """Regression test for bug #12345.

    Bug: [brief description of the original bug]
    Root cause: [what was wrong]
    Fix: [what was changed]
    """
    # Arrange: Setup that triggered the bug
    input_data = create_problematic_input()

    # Act: The operation that failed
    result = fixed_function(input_data)

    # Assert: Verify correct behavior
    assert result == expected_output
    # Also verify the specific fix worked
    assert result.specific_field == expected_value

Investigation Report Format

## Bug Investigation Report

**Issue**: [Brief description]
**Status**: [Investigating | Root Cause Found | Fixed | Cannot Reproduce]

### Problem Statement

**Expected**: [spec behavior]
**Actual**: [observed behavior]
**Impact**: [who/what is affected]

### Investigation Timeline

1. [timestamp] - [action taken] - [result]
2. [timestamp] - [action taken] - [result]
3. [timestamp] - [action taken] - [result]

### Hypotheses

| # | Hypothesis | Status | Evidence |
|---|------------|--------|----------|
| H1 | [description] | Confirmed/Refuted | [evidence] |
| H2 | [description] | Confirmed/Refuted | [evidence] |

### Root Cause

**Location**: [file:line]
**Description**: [what's wrong and why]
**Evidence**: [how we know this is the cause]

### Fix

**Approach**: [what will be changed]
**Files Modified**: [list]
**Tests Added**: [list]

### Verification

- [ ] Bug no longer reproduces
- [ ] Regression test passes
- [ ] Existing tests pass
- [ ] Edge cases covered

Common Python Bug Patterns

NoneType Errors

# Bug: AttributeError: 'NoneType' has no attribute 'x'
# Cause: Function returns None unexpectedly

# Investigation
result = get_something()
print(f"result is None: {result is None}")  # Check this first

# Fix: Add proper None handling
if (result := get_something()) is None:
    raise ValueError("Expected result but got None")
return result.x

Mutable Default Arguments

# Bug: List accumulates across calls
def buggy(items=[]):  # WRONG: mutable default
    items.append(1)
    return items


# Fix
def fixed(items: list | None = None) -> list:
    if items is None:
        items = []
    items.append(1)
    return items

Async/Await Issues

# Bug: Coroutine never executed
async def fetch_data():
    return await api_call()


# WRONG: Missing await
result = fetch_data()  # Returns coroutine, not result

# Fix
result = await fetch_data()

Import Errors

# Bug: ImportError or circular import
# Investigation: Check import order and dependencies

# Fix: Use local imports for circular dependencies
def function_that_needs_other_module():
    from .other_module import OtherClass  # Local import

    return OtherClass()

References

Frequently asked questions

What to verify before installation and use

What does the python3-bug source document cover?

The model investigates functional bugs using specifications, logs, and observed behavior to scope the problem before implementing fixes.

How do I install python3-bug?

The source record exposes this install command: npx skills add https://github.com/Jamie-BitFlight/claude_skills --skill "plugins/python3-development/skills/python3-bug". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 97779

rampstackco/claude-skills

data-warehouse-experimentation

Running experiments out of the data warehouse instead of via dedicated experiment platforms. SQL-based assignment, exposure logging discipline, metric definitions in dbt models, statistical analysis in SQL or Python, variance reduction with CUPED, sequential testing, and the operational tradeoffs vs platforms like Statsig and Optimizely. Triggers on warehouse-native experimentation, run experiments in BigQuery, run experiments in Snowflake, dbt experiments, SQL t-test, CUPED variance reduction,

Computed 97273

Aperivue/medsci-skills

calc-sample-size

Interactive sample size calculator for medical research. Decision-tree guided test selection, reproducible R/Python code, effect size interpretation, and IRB-ready justification text. Supports diagnostic accuracy, agreement, proportions, continuous outcomes, survival, ANOVA, logistic regression, and non-inferiority/equivalence designs.

Computed 97211

PramodDutta/qaskills

Pairwise Test Generator

Generate optimized test combinations using pairwise (all-pairs) testing algorithms to achieve maximum coverage with minimum test cases across multiple input parameters

Computed 966,897

trailofbits/skills

vector-forge

Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify escaped mutants, then generates new test vectors that deliberately exercise the uncovered code paths. Compares before/after mutation kill rates to prove vector effectiveness. Use when generating cryptographic test vectors, measuring Wycheproof coverage gaps, finding escaped mutants via mutation testing, creating cross-implementation test suites, or improving t