Agent skill

snakepolish

Implementation phase for stinkysnake workflow. Use when tests are written and plan is ready. Implements functions following the modernization plan, runs tests until passing.

Stars 33
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/python3-development/skills/snakepolish

SKILL.md

<file_paths>$ARGUMENTS</file_paths>

Snake Polish - Implementation Phase

Execute the implementation plan from /python3-development:stinkysnake Phase 9. Implement functions following the modernization plan, run tests iteratively until all pass.

Arguments

<file_paths/>

Prerequisites

Before invoking this skill, ensure:

  1. /python3-development:stinkysnake phases 1-8 completed
  2. Modernization plan reviewed and refined
  3. Interfaces designed and documented
  4. Failing tests written by python3-development:python-pytest-architect

Instructions

Step 1: Load Context

Read the stinkysnake plan artifacts:

text
ARTIFACTS TO LOAD:
- [ ] Modernization plan (Phase 3 output)
- [ ] Plan review feedback (Phase 4-5 output)
- [ ] Interface definitions (Phase 7 output)
- [ ] Failing test files (Phase 8 output)

Step 2: Verify Test Baseline

Run tests to confirm failing state:

bash
uv run pytest <file_paths/> -v --tb=short 2>&1 | head -100

Expected: Tests fail because implementations don't exist yet.

If tests pass: Stop. Implementation already complete or tests are not testing the right things.

Step 3: Implementation Order

Follow this implementation sequence:

text
IMPLEMENTATION ORDER:
1. Type definitions (TypeAlias, TypedDict, Protocol)
2. Data structures (dataclass, Pydantic models)
3. Utility functions (pure functions, no side effects)
4. Core business logic
5. Integration points (API clients, file I/O)
6. Entry points (CLI commands, handlers)

Step 4: Implement Following Plan

For each planned change:

text
FOR EACH IMPLEMENTATION ITEM:
1. Read the interface/protocol definition
2. Read the failing test(s) for this component
3. Implement the function/class
4. Run targeted tests: uv run pytest -k "test_name" -v
5. If fails: debug and fix
6. If passes: move to next item

Step 5: Modern Python Patterns

Apply these patterns during implementation:

Type Annotations

python
# Use modern union syntax
def process(data: str | None) -> dict[str, Any]:
    ...

# Use TypeGuard for narrowing
def is_valid_user(obj: object) -> TypeGuard[User]:
    return isinstance(obj, dict) and "id" in obj

Protocol-Based Design

python
from typing import Protocol

class Serializable(Protocol):
    def to_dict(self) -> dict[str, Any]: ...

def save(item: Serializable) -> None:
    data = item.to_dict()
    ...

Dataclass Patterns

python
from dataclasses import dataclass, field

@dataclass(slots=True, frozen=True)
class Config:
    name: str
    options: list[str] = field(default_factory=list)

Pydantic for Validation

python
from pydantic import BaseModel, Field

class APIResponse(BaseModel):
    status: int = Field(ge=100, le=599)
    data: dict[str, Any]

    model_config = {"strict": True}

Modern Libraries

python
# httpx for async HTTP
async with httpx.AsyncClient() as client:
    response = await client.get(url)

# orjson for fast JSON
data = orjson.loads(response.content)
output = orjson.dumps(result, option=orjson.OPT_INDENT_2)

# tomlkit for TOML with comments preserved
doc = tomlkit.parse(content)
doc["section"]["key"] = value

Step 6: Iterative Test Loop

After each implementation batch:

bash
# Run full test suite
uv run pytest <file_paths/> -v --tb=short

# If failures remain, focus on failing tests
uv run pytest <file_paths/> -v --tb=long -x  # Stop on first failure

Step 7: Static Analysis Verification

Before completion, verify code quality:

bash
# Format check
uv run ruff format --check <file_paths/>

# Lint check
uv run ruff check <file_paths/>

# Type check — match hooks/CI; ty when repo runs ty (do not infer mypy from [tool.mypy] alone)
uv run ty check <file_paths/>
# uv run mypy <file_paths/> --strict

Fix any issues that arise.

Step 8: Final Test Run

Confirm all tests pass:

bash
uv run pytest <file_paths/> -v --cov --cov-report=term-missing

Success Criteria:

  • All tests pass
  • No type errors
  • No lint errors
  • Coverage meets project threshold (typically 80%+)

Completion

When all tests pass and static analysis is clean:

  1. Report implementation summary
  2. List any deferred items or technical debt
  3. Reference documentation updates needed (from Phase 6)

Error Handling

Test Failures That Indicate Test Bugs

If a test failure appears to be a test bug rather than implementation bug:

  1. Document the suspected test issue
  2. Check the test against the interface specification
  3. If test is wrong: fix the test, document the fix
  4. If unclear: flag for review, continue with other implementations

Blocked Implementations

If an implementation is blocked:

  1. Document the blocker
  2. Check if it's a dependency ordering issue
  3. If external dependency: note and continue with independent items
  4. If architectural issue: flag for plan revision

References

  • ../stinkysnake/SKILL.md - Parent workflow
  • ../../agents/python-cli-architect.md - Implementation agent
  • ../python3-development/SKILL.md - Modern Python patterns

Expand your agent's capabilities with these related and highly-rated skills.

Jamie-BitFlight/claude_skills

ccc

This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'.

33 4
Explore
Jamie-BitFlight/claude_skills

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

33 4
Explore
Jamie-BitFlight/claude_skills

delegate

Quick delegation template for sub-agent prompts. Use when assigning work to a sub-agent, before invoking the Agent tool, or when preparing prompts for specialized agents. Provides the WHERE-WHAT-WHY framework. For comprehensive delegation guidance, activate the agent-orchestration how-to-delegate skill.

33 4
Explore
Jamie-BitFlight/claude_skills

swarm-spawning

Spawn agents and teammates in Claude Code swarms. Use when choosing between subagents vs teammates, selecting agent types (Explore, Plan, general-purpose, plugin agents), configuring spawn backends (in-process, tmux, iterm2), or setting environment variables for spawned agents.

33 4
Explore
Jamie-BitFlight/claude_skills

knowledge-explorer

Manage the research/ knowledge base (KB) of tool and library research entries. Use when browsing KB topics, adding new research entries, updating existing entries with dated revisions, fetching GitHub repo metadata into a draft KB entry, or migrating old-format entries to skill-spec frontmatter. Triggers on tasks like "what do we have on X", "add this to the KB", "update the KB entry for Y", "fetch github info for owner/repo", or "migrate old entries".

33 4
Explore
Jamie-BitFlight/claude_skills

design-anti-patterns

Enforce anti-AI UI design rules based on the Uncodixfy methodology. Use when generating HTML, CSS, React, Vue, Svelte, or any frontend UI code. Prevents "Codex UI" — the generic AI aesthetic of soft gradients, floating panels, oversized rounded corners, glassmorphism, hero sections in dashboards, and decorative copy. Applies constraints from Linear/Raycast/Stripe/GitHub design philosophy: functional, honest, human-designed interfaces. Triggers on: UI generation, dashboard building, frontend component creation, CSS styling, landing page design, or any task producing visual interface code.

33 4
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results