From py-inspector
Answer questions about Python code quality, best practices, and quality tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/py-inspector:python-quality-checkerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Answer questions about Python code quality, best practices, and quality tools.
Answer questions about Python code quality, best practices, and quality tools.
This skill is invoked when users ask about:
"How do I use Ty for type checking?"
"What is Ruff?"
"Python 코드 품질을 어떻게 개선하나요?"
"타입 힌트는 왜 필요한가요?"
"What are Python code quality best practices?"
This skill has access to:
references/tools.md - Guide to Python quality toolsreferences/best-practices.md - Python coding best practicesreferences/type-hints.md - Type hints guidepyproject.toml setupA: Ty를 프로젝트에 추가하는 방법:
pip install ty
# 또는 uv로
uv pip install ty
# 전체 프로젝트 체크
ty check .
# 특정 디렉토리만
ty check src/
pyproject.toml):[tool.ty]
python-version = "3.10"
strict = true
strict = true로 점진적 이동# .github/workflows/quality.yml
- name: Type check
run: ty check src/
중요: Ty는 반드시 standalone으로 설치해야 합니다. uv tool run ty는 사용하지 마세요.
A: Key differences between Ruff and Pylint:
Ruff:
Pylint:
Recommendation:
PL prefix)# Fast daily checks
ruff check .
# Deep analysis weekly
pylint src/
A: Steps to add type hints to existing Python code:
# Before
def calculate_total(items):
return sum(item.price for item in items)
# After
def calculate_total(items: list[Item]) -> float:
return sum(item.price for item in items)
# Generate stubs
stubgen -p mypackage -o stubs/
# Use MonkeyType for runtime analysis
monkeytype run script.py
monkeytype apply mymodule
[tool.ty]
# Start permissive
strict = false
# Gradually enable
strict = true
from typing import Optional, Union, TypeVar, Generic
# Optional values
def get_user(id: int) -> Optional[User]:
...
# Multiple types
def process(data: Union[str, bytes]) -> str:
...
# Generics
T = TypeVar('T')
def first(items: list[T]) -> T:
...
# Use built-in types
def process(items: list[str]) -> dict[str, int]:
...
# Union operator
def parse(value: str | int) -> Result:
...
See the references/ directory for detailed guides on:
npx claudepluginhub juyeongyi/jylee_claude_marketplace --plugin py-inspectorCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.