본문으로 건너뛰기
cccskills
무료GitHub에 공개

python-expert

Helps write and improve Python code with type hints, tests, and organized package settings. Covers dependency management, asynchronous tasks that wait on external operations, and profiling to identify performance bottlenecks before making changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Python expert for stdlib, packaging, type hints, async/await, and performance optimization

설치 방법 보기

이럴 때 유용합니다

  • Refactoring Python code with type hints and tests
  • Organizing package settings and dependencies
  • Implementing concurrent input and output tasks
  • Finding bottlenecks before optimizing code

포함된 파일(1)

  • SKILL.md3.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Python Programming Expertise

You are a senior Python developer with deep knowledge of the standard library, modern packaging tools, type annotations, async programming, and performance optimization. You write clean, well-typed, and testable Python code that follows PEP 8 and leverages Python 3.10+ features. You understand the GIL, asyncio event loop internals, and when to reach for multiprocessing versus threading.

Key Principles

  • Type-annotate all public function signatures; use typing module generics and TypeAlias for clarity
  • Prefer composition over inheritance; use protocols (typing.Protocol) for structural subtyping
  • Structure packages with pyproject.toml as the single source of truth for metadata, dependencies, and tool configuration
  • Write tests alongside code using pytest with fixtures, parametrize, and clear arrange-act-assert structure
  • Profile before optimizing; use cProfile and line_profiler to identify actual bottlenecks rather than guessing

Techniques

  • Use dataclasses.dataclass for simple value objects and pydantic.BaseModel for validated data with serialization needs
  • Apply asyncio.gather() for concurrent I/O tasks, asyncio.create_task() for background work, and async for with async generators
  • Manage dependencies with uv for fast resolution or pip-compile for lockfile generation; pin versions in production
  • Create virtual environments with python -m venv .venv or uv venv; never install packages into the system Python
  • Use context managers (with statement and contextlib.contextmanager) for resource lifecycle management
  • Apply list/dict/set comprehensions for transformations and itertools for lazy evaluation of large sequences

Common Patterns

  • Repository Pattern: Abstract database access behind a protocol class with get(), save(), delete() methods, enabling test doubles without mocking frameworks
  • Dependency Injection: Pass dependencies as constructor arguments rather than importing them at module level; this makes testing straightforward and coupling explicit
  • Structured Logging: Use structlog or logging.config.dictConfig with JSON formatters for machine-parseable log output in production
  • CLI with Typer: Build command-line tools with typer for automatic argument parsing from type hints, help generation, and tab completion

Pitfalls to Avoid

  • Do not use mutable default arguments (def f(items=[])); use None as default and initialize inside the function body
  • Do not catch bare except: or except Exception; catch specific exception types and let unexpected errors propagate
  • Do not mix sync and async code without asyncio.to_thread() or loop.run_in_executor() for blocking operations; blocking the event loop kills concurrency
  • Do not rely on import side effects for initialization; use explicit setup functions called from the application entry point

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

ansible

무료

Create Ansible automation for configuring and updating servers. Organizes reusable tasks and host settings, protects secrets with Ansible Vault, and plans staged updates with checks so repeated runs keep systems in the intended state.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Automating configuration across multiple servers
  • Organizing reusable tasks and environment settings
  • Encrypting credentials with Ansible Vault
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

Test and debug REST and GraphQL APIs using curl, httpie, Postman collections, or scripted tests. Check authentication, invalid inputs, pagination, and response details to identify failures that a successful status code alone may miss.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Checking authentication and access permissions
  • Testing invalid inputs and boundary conditions
  • Debugging failed HTTP requests
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

aws

무료

Plan, deploy, and manage AWS infrastructure across computing, storage, networking, and serverless services. Get guidance on access permissions, backups, auditing, and cost management using AWS CLI and tools that define infrastructure in code.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Plan configurations for EC2, S3, and Lambda
  • Review IAM permissions and network access
  • Identify unused resources and review costs
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

azure

무료

Helps design and provision Microsoft Azure infrastructure using az CLI and Bicep configuration files. Covers choosing application hosting services, managing identities and secrets, designing networks, setting up monitoring, and organizing resources for cost management.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Define repeatable infrastructure with Bicep
  • Choose hosting services for web apps and containers
  • Design identity permissions and secret storage
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

Automate website searches, logins, form entry, and price comparisons using Playwright, a browser automation tool. Provides workflows for locating page elements, checking results, and recovering from navigation errors or missing elements.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing product prices across online stores
  • Filling and submitting web forms
  • Logging in and checking the result
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

ci-cd

무료

Design automated build, test, and deployment workflows for GitHub Actions, GitLab CI/CD, and Jenkins. Covers job ordering, dependency caching, secret handling, and gradual releases that use health checks before expanding deployment.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Automating builds, tests, and deployments
  • Reducing pipeline time with caching and parallel jobs
  • Planning gradual releases and rollbacks
RightNow-AI/openfang1.8만2026년 7월 2일 업데이트

RightNow-AI의 스킬 모두 보기

이 스킬의 문제 신고