Back to list
kuroRy

python-engineer

by kuroRy

0🍴 0📅 Jan 23, 2026

SKILL.md


name: python-engineer description: Expert Python engineering for code review, quality improvement, and debugging. Use when reviewing Python code for best practices, refactoring for cleaner code, debugging errors, improving type safety with type hints, writing tests with pytest, or developing Web APIs with FastAPI. Focuses on Pythonic patterns, SOLID principles, and production-ready code quality.

Python Engineer

Expert guidance for Python code review, quality improvement, and debugging with focus on Web API development.

Core Workflow

  1. Understand - Analyze current code structure and identify issues
  2. Diagnose - Apply relevant best practices from references
  3. Improve - Implement changes with proper typing and tests
  4. Validate - Verify improvements through testing

Code Review

When reviewing Python code, check:

  1. Type Safety - All functions have type hints, mypy passes
  2. Testing - pytest coverage for critical paths
  3. Clean Code - Pythonic patterns, no code smells
  4. Error Handling - Proper exception handling
  5. Documentation - Docstrings for public APIs

For detailed checklist: references/code-review.md

Debugging

Debug workflow:

  1. Reproduce the issue with minimal test case
  2. Identify error type and stack trace
  3. Apply targeted debugging technique
  4. Verify fix with test

For debugging techniques: references/debugging.md

Quality Improvement

Type Hints

Add comprehensive type annotations:

from typing import TypeVar, Generic
from collections.abc import Callable, Sequence

T = TypeVar("T")

def process_items(
    items: Sequence[T],
    transformer: Callable[[T], T],
) -> list[T]:
    return [transformer(item) for item in items]

For complete guide: references/type-hints.md

Testing with pytest

Write meaningful tests:

import pytest

class TestUserService:
    def test_create_user_with_valid_email_returns_user(
        self, user_service: UserService
    ) -> None:
        result = user_service.create("test@example.com")
        assert result.email == "test@example.com"
        assert result.id is not None

    def test_create_user_with_invalid_email_raises_validation_error(
        self, user_service: UserService
    ) -> None:
        with pytest.raises(ValidationError, match="Invalid email"):
            user_service.create("invalid-email")

For testing patterns: references/testing.md

Clean Code

Prefer:

  • Composition over inheritance
  • Small, focused functions (< 20 lines)
  • Descriptive names over comments
  • Early returns to reduce nesting
  • Dataclasses/Pydantic over raw dicts

For patterns: references/clean-code.md

Web API Development

FastAPI best practices:

from fastapi import FastAPI, HTTPException, status
from pydantic import BaseModel

class UserCreate(BaseModel):
    email: str
    name: str

@app.post("/users", status_code=status.HTTP_201_CREATED)
async def create_user(user: UserCreate) -> User:
    if await user_exists(user.email):
        raise HTTPException(
            status_code=status.HTTP_409_CONFLICT,
            detail="User already exists"
        )
    return await create_user_in_db(user)

For FastAPI patterns: references/fastapi.md

References

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon