Best for
- Use when addressing technical debt, eliminating Any types, applying modern Python patterns, or refactoring for better design.
Jamie-BitFlight/claude_skills/plugins/python3-development/skills/stinkysnake/SKILL.md
Progressive Python quality improvement with static analysis, type refinement, modernization planning, plan review, and test-driven implementation. Use when addressing technical debt, eliminating Any types, applying modern Python patterns, or refactoring for better design.
Decision brief
Systematic Python code quality improvement through static analysis, type refinement, modernization planning with review, and test-driven implementation.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/Jamie-BitFlight/claude_skills --skill "plugins/python3-development/skills/stinkysnake"Inspect the Agent Skill "stinkysnake" from https://github.com/Jamie-BitFlight/claude_skills/blob/b70ba8737e664d9e2482912e3ddbe7ecb77e0539/plugins/python3-development/skills/stinkysnake/SKILL.md at commit b70ba8737e664d9e2482912e3ddbe7ecb77e0539. 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
Review the “Workflow Overview” section in the pinned source before continuing.
Run automated tools to fix all resolvable issues before manual work begins.
Review the “Step 1.1: Format Code” section in the pinned source before continuing.
Review the “Step 1.2: Auto-Fix Linting Issues” section in the pinned source before continuing.
Inspect .pre-commit-config.yaml (then CI) first, then pyproject.toml. Default for new work: ty. If hooks or CI invoke mypy: run mypy and do not rip it out. Do not switch to mypy only because [tool.mypy] exists — many repos keep that section while ty is the real gate.
Permission review
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
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 64 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
<file_paths>$ARGUMENTS</file_paths>
Systematic Python code quality improvement through static analysis, type refinement, modernization planning with review, and test-driven implementation.
<file_paths/>
┌─────────────────────────────────────────────────────────────────────────────┐
│ STINKYSNAKE WORKFLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ Phase 1: STATIC ANALYSIS │
│ ├── Run formatters (ruff format) │
│ ├── Run linters (ruff check --fix) │
│ ├── Run type checkers (ty default; mypy/pyright if project configures) │
│ └── Auto-fix all resolvable issues │
│ │ │
│ ▼ │
│ Phase 2: TYPE ANALYSIS │
│ ├── Determine minimum Python version │
│ ├── Inventory all `Any` types │
│ ├── Map type dependencies │
│ └── Identify typing gaps │
│ │ │
│ ▼ │
│ Phase 3: MODERNIZATION PLANNING │
│ ├── Plan Protocol usage for duck typing │
│ ├── Plan Generic type parameters │
│ ├── Plan TypeGuard narrowing │
│ ├── Plan TypeAlias definitions │
│ ├── Plan TypedDict for dict shapes │
│ ├── Plan dataclass/Pydantic models │
│ └── Plan library modernization (httpx, orjson, etc.) │
│ │ │
│ ▼ │
│ Phase 4: PLAN REVIEW (context: fork) │
│ ├── Review against pythonic best practices │
│ ├── Verify against online references │
│ ├── Check feasibility │
│ ├── Identify breaking changes │
│ └── Produce review report │
│ │ │
│ ▼ │
│ Phase 5: PLAN REFINEMENT │
│ └── Update plan based on review feedback │
│ │ │
│ ▼ │
│ Phase 6: DOCUMENTATION DISCOVERY │
│ ├── Find docs requiring updates │
│ └── Note what changes are needed │
│ │ │
│ ▼ │
│ Phase 7: INTERFACE DESIGN │
│ └── Create interfaces/protocols first │
│ │ │
│ ▼ │
│ Phase 8: TEST-FIRST (context: fork, python-pytest-architect) │
│ ├── Write failing tests against interfaces │
│ └── Stop after tests written │
│ │ │
│ ▼ │
│ Phase 9: IMPLEMENTATION (/python3-development:snakepolish) │
│ ├── context: fork with python-cli-architect │
│ ├── Follow plans and implement functions │
│ └── Run tests until passing │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
This skill integrates with plugins in the same marketplace:
Activation: Skill(skill: "holistic-linting:holistic-linting")
Provides: Linting rules knowledge base, linting-root-cause-resolver agent, automatic linter detection.
Activation: Skill(skill: "python3-development:pre-commit")
Provides: Git hook automation for quality gates.
Run automated tools to fix all resolvable issues before manual work begins.
# Format all Python files
uv run ruff format $ARGUMENTS
# Verify formatting
uv run ruff format --check $ARGUMENTS
# Fix all auto-fixable issues
uv run ruff check --fix $ARGUMENTS
# Fix unsafe fixes if appropriate
uv run ruff check --fix --unsafe-fixes $ARGUMENTS
Inspect .pre-commit-config.yaml (then CI) first, then pyproject.toml. Default for new work: ty. If hooks or CI invoke mypy: run mypy and do not rip it out. Do not switch to mypy only because [tool.mypy] exists — many repos keep that section while ty is the real gate.
# Default (ty) — when hooks run ty, [tool.ty] is active, or no mypy invocation in hooks/CI
uv run ty check $ARGUMENTS
# Project that actually runs mypy in hooks/CI — respect mypy.ini / [tool.mypy]
uv run mypy $ARGUMENTS
# Project standardizes on pyright / basedpyright
uv run pyright $ARGUMENTS
# uv run basedpyright $ARGUMENTS
Create inventory of issues that cannot be auto-fixed:
## Static Analysis Results
### Auto-Fixed
- [X] Formatting issues: N fixed
- [X] Import sorting: N fixed
- [X] Safe linting fixes: N fixed
### Requires Manual Resolution
| File:Line | Rule | Issue | Complexity |
|-----------|------|-------|------------|
| src/api.py:45 | ANN001 | Missing type annotation | Low |
| src/models.py:120 | B006 | Mutable default | Medium |
Determine Python compatibility and inventory typing gaps.
Check project configuration:
# Check pyproject.toml
grep -E "requires-python|python_requires" pyproject.toml
# Check setup.py if exists
grep -E "python_requires" setup.py
Document the constraint:
## Python Version Constraint
Minimum Version: Python 3.11
Reason: [from pyproject.toml requires-python = ">=3.11"]
Available Language Features:
- Native generics (list[str], dict[str, int])
- Union syntax (str | None)
- Pattern matching (match/case)
- Exception groups
- Self type
- TypeVarTuple
- Required/NotRequired in TypedDict
Any TypesSearch for explicit and implicit Any usage:
# Find explicit Any imports and usage
uv run rg "from typing import.*Any|: Any|-> Any" $ARGUMENTS
# Implicit Any / strict diagnostics — use the same checker the project uses
uv run ty check $ARGUMENTS 2>&1 | grep -iE "Any|implicit" || true
# If project uses mypy instead:
# uv run mypy --strict $ARGUMENTS 2>&1 | grep -E "has type.*Any|Implicit.*Any"
Create inventory:
## Any Type Inventory
### Explicit Any Usage
| Location | Variable | Current Type | Proposed Type |
|----------|----------|--------------|---------------|
| api.py:23 | response | Any | dict[str, JSONValue] |
| utils.py:45 | callback | Any | Callable[[str], None] |
### Implicit Any (from untyped libraries)
| Location | Source | Mitigation |
|----------|--------|------------|
| client.py:12 | third_party.get() | Add type stub or cast |
Understand how types flow through the codebase:
## Type Dependency Map
Entry Points (public API):
- cli.main() -> int
- api.fetch_data(url: str) -> ??? # Needs typing
Internal Flow:
fetch_data() -> parse_response() -> validate() -> Model
Type Gaps:
- parse_response returns Any
- validate accepts Any
Plan how to apply modern Python features to eliminate type gaps and improve design.
Skill(skill: "python3-development:modernpython")
For each Any in the inventory, plan the replacement using appropriate constructs:
Select the appropriate type construct for each Any replacement:
See references/type-patterns.md for before/after code samples and library modernization reference table.
See the library modernization reference table in references/type-patterns.md#library-modernization-reference.
Resolve the plan directory at runtime: uv run python -c 'from dh_paths import plan_dir; print(plan_dir())' (typically ~/.dh/projects/{slug}/plan/). Create the plan at {plan_dir}/stinkysnake-plan.md using the template in references/plan-templates.md#modernization-plan-template-phase-3-output.
Delegate to a review agent with context fork to critique the plan.
Delegate to code-reviewer using the prompt in references/agent-prompts.md#phase-4-plan-review.
The reviewer produces a report following the template in references/plan-templates.md#plan-review-report-template-phase-4-output.
Update the plan based on review feedback.
For each blocking issue:
For each warning:
For each suggestion:
Update {plan_dir}/stinkysnake-plan.md (resolve plan_dir as in Step 3.4) using the revised plan format in references/plan-templates.md#revised-plan-template-phase-5-output.
Find documentation that needs updating after code changes.
# Find all documentation files
fd -e md -e rst -e txt . docs/ README.md CHANGELOG.md
# Find docstrings in affected files
uv run rg "^\s+\"\"\"" $ARGUMENTS
Create documentation update plan using the template in references/plan-templates.md#documentation-update-plan-template-phase-6-output.
Create interfaces and protocols before implementation.
# src/types.py
from typing import TypeAlias
JSONValue: TypeAlias = str | int | float | bool | None | list["JSONValue"] | dict[str, "JSONValue"]
APIResponse: TypeAlias = dict[str, JSONValue]
# src/protocols.py
from typing import Protocol
class Handler(Protocol):
def handle(self, data: bytes) -> None: ...
class Serializable(Protocol):
def to_dict(self) -> dict[str, Any]: ...
# src/schemas.py
from typing import TypedDict, NotRequired
class UserData(TypedDict):
name: str
email: str
age: NotRequired[int]
# src/models.py
from dataclasses import dataclass
@dataclass
class User:
name: str
email: str
age: int | None = None
Delegate to python-pytest-architect to write failing tests against the interfaces.
Delegate to python-pytest-architect using the prompt in references/agent-prompts.md#phase-8-test-writing-agent.
# Run tests - they should fail
uv run pytest tests/ -v
# Expected output: X failed, 0 passed
Use the /python3-development:snakepolish skill to implement until tests pass.
/python3-development:snakepolish $ARGUMENTS
This skill:
context: fork to work in isolationagent: python-cli-architect for implementation# Final verification
uv run pytest tests/ -v
uv run ty check $ARGUMENTS
# If project uses mypy: uv run mypy $ARGUMENTS
uv run ruff check $ARGUMENTS
The complete workflow produces:
| Artifact | Location | Purpose |
|---|---|---|
| Static Analysis Results | .claude/reports/static-analysis-{ts}.md | Auto-fix summary |
| Type Inventory | .claude/reports/type-inventory-{ts}.md | Any types found |
| Modernization Plan | {plan_dir}/stinkysnake-plan.md | Implementation plan |
| Plan Review | .claude/reports/plan-review-{ts}.md | Review feedback |
| Revised Plan | {plan_dir}/stinkysnake-plan.md | Updated plan |
| Doc Update Plan | .claude/reports/doc-updates-{ts}.md | Docs to change |
| Test Files | tests/test_*.py | Failing tests |
| Implementation | src/ | Passing code |
Skill(skill: "holistic-linting:holistic-linting") # Linting workflows
Skill(skill: "python3-development:pre-commit") # Git hooks
Skill(skill: "python3-development:modernpython") # Python 3.11+ patterns
Skill(skill: "python3-development:python3-development") # Core patterns
Agent(subagent_type="holistic-linting:linting-root-cause-resolver", ...) # Phase 1 linting
Agent(subagent_type="python3-development:code-reviewer", ...) # Phase 4 review
Agent(subagent_type="python3-development:python-pytest-architect", ...) # Phase 8 tests
/python3-development:snakepolish # Phase 9 implementation (context: fork)
When Phase 4 (quality improvement implementation) involves 3+ independent improvement areas where findings from one area inform or challenge another, consider agent teams instead of sequential subagents.
A quality improvement workflow is a candidate for agent teams when ALL of these are true:
A quality improvement workflow is NOT a candidate for agent teams when:
See ../../../plugin-creator/skills/claude-skills-overview-2026/resources/agent-teams.md for complete criteria, architecture, and usage patterns.
SOURCE: Lines 27-39 of agent-teams.md (accessed 2026-02-06)
../python3-development/references/python3-standards.md — Shared development standards, knowledge graph, and process graphreferences/plan-templates.md — document formats for modernization plan, review report, revised plan, and documentation update planreferences/agent-prompts.md — pre-built delegation prompts for Phase 4 review agent and Phase 8 test writing agentFrequently asked questions
Systematic Python code quality improvement through static analysis, type refinement, modernization planning with review, and test-driven implementation.
The source record exposes this install command: npx skills add https://github.com/Jamie-BitFlight/claude_skills --skill "plugins/python3-development/skills/stinkysnake". Inspect the command and pinned source before running it.
Alternatives
travisjneuman/.claude
This skill should be used when writing test cases, fixing bugs, analyzing code for potential issues, or improving test coverage for JavaScript/TypeScript applications. Use this for unit tests, integration tests, end-to-end tests, debugging runtime errors, logic bugs, performance issues, security vulnerabilities, and systematic code analysis.
Jamie-BitFlight/claude_skills
Multi-phase Python quality improvement system for file paths passed as arguments. Runs prek/ruff/ty static analysis with auto-fixes, inventories Any types and typing gaps, plans Protocol/Generic/TypeGuard/TypedDict/dataclass modernization, forks a code-reviewer agent to critique the plan, refines the plan, discovers documentation changes, designs interfaces first, forks python-pytest-architect for failing tests, then hands off to snakepolish for implementation. Use when eliminating Any types, ad
yonatangross/orchestkit
Grade work that already exists and decide whether it can merge. Runs the project's current unit, integration, and E2E suites plus security scanning and type checking, scores every dimension 0-10, and returns a merge verdict with a VERIFIED-vs-CLAIMED evidence manifest. Writes no test files and edits no source. Use when verifying changes are ready to merge. Use /ork:cover instead when the tests still have to be written.
microsoft/Sico
Execute Android UI workflows on a sandbox device, review results, and produce a structured execution report.