python-pro by 404kidwiz/claude-supercode-skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill python-pro提供专业的 Python 开发专长,专注于 Python 3.11+ 特性、类型注解和异步编程模式。利用现代 Python 语法和全面的类型安全,构建基于 FastAPI 的高性能应用程序,适用于复杂系统。
在以下情况调用此技能:
在以下情况请勿调用:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 场景 | 使用异步? | 原因 |
|---|---|---|
| 涉及数据库调用的 API | 是 | I/O 密集型,可从并发中受益 |
| CPU 密集型计算 | 否 | 应使用多进程 |
| 文件上传/下载 | 是 | I/O 密集型操作 |
| 外部 API 调用 | 是 | 网络 I/O 可从异步中受益 |
| 简单的 CLI 脚本 | 否 | 开销不值得 |
New Code
│
├─ Public API (functions, classes)?
│ └─ Full type annotations required
│
├─ Internal helpers?
│ └─ Type annotations recommended
│
├─ Third-party library integration?
│ └─ Use type stubs or # type: ignore
│
└─ Complex generics needed?
└─ Use TypeVar, Protocol, ParamSpec
from typing import Any
def process_data(data: dict[str, Any]) -> str:
match data:
case {"type": "user", "id": user_id, **rest}:
return f"Processing user {user_id} with {rest}"
case {"type": "order", "items": items, "total": total} if total > 1000:
return f"High-value order with {len(items)} items"
case {"status": status} if status in ("pending", "processing"):
return f"Order status: {status}"
case _:
return "Unknown data structure"
from typing import Optional, Type
from types import TracebackType
import asyncpg
class DatabaseConnection:
def __init__(self, connection_string: str) -> None:
self.connection_string = connection_string
self.connection: Optional[asyncpg.Connection] = None
async def __aenter__(self) -> 'DatabaseConnection':
self.connection = await asyncpg.connect(self.connection_string)
return self
async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType]
) -> None:
if self.connection:
await self.connection.close()
async def execute(self, query: str, *args) -> Optional[asyncpg.Record]:
if not self.connection:
raise RuntimeError("Connection not established")
return await self.connection.fetchrow(query, *args)
from typing import TypeVar, Generic, Protocol
from abc import ABC, abstractmethod
T = TypeVar('T')
U = TypeVar('U')
class Processor(Protocol[T, U]):
async def process(self, item: T) -> U: ...
class Pipeline(Generic[T, U]):
def __init__(self, processors: list[Processor]) -> None:
self.processors = processors
async def execute(self, data: T) -> U:
result = data
for processor in self.processors:
result = await processor.process(result)
return result
async with 进行资源管理详细技术参考 : 参见 REFERENCE.md
代码示例与模式 : 参见 EXAMPLES.md
周安装量
68
代码仓库
GitHub 星标数
42
首次出现
2026 年 1 月 23 日
安全审计
安装于
opencode56
claude-code51
codex51
gemini-cli50
cursor47
github-copilot45
Provides expert Python development expertise specializing in Python 3.11+ features, type annotations, and async programming patterns. Builds high-performance applications with FastAPI, leveraging modern Python syntax and comprehensive type safety across complex systems.
Invoke this skill when:
Do NOT invoke when:
| Scenario | Use Async? | Reason |
|---|---|---|
| API with DB calls | Yes | I/O-bound, benefits from concurrency |
| CPU-heavy computation | No | Use multiprocessing instead |
| File uploads/downloads | Yes | I/O-bound operations |
| External API calls | Yes | Network I/O benefits from async |
| Simple CLI scripts | No | Overhead not worth it |
New Code
│
├─ Public API (functions, classes)?
│ └─ Full type annotations required
│
├─ Internal helpers?
│ └─ Type annotations recommended
│
├─ Third-party library integration?
│ └─ Use type stubs or # type: ignore
│
└─ Complex generics needed?
└─ Use TypeVar, Protocol, ParamSpec
from typing import Any
def process_data(data: dict[str, Any]) -> str:
match data:
case {"type": "user", "id": user_id, **rest}:
return f"Processing user {user_id} with {rest}"
case {"type": "order", "items": items, "total": total} if total > 1000:
return f"High-value order with {len(items)} items"
case {"status": status} if status in ("pending", "processing"):
return f"Order status: {status}"
case _:
return "Unknown data structure"
from typing import Optional, Type
from types import TracebackType
import asyncpg
class DatabaseConnection:
def __init__(self, connection_string: str) -> None:
self.connection_string = connection_string
self.connection: Optional[asyncpg.Connection] = None
async def __aenter__(self) -> 'DatabaseConnection':
self.connection = await asyncpg.connect(self.connection_string)
return self
async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType]
) -> None:
if self.connection:
await self.connection.close()
async def execute(self, query: str, *args) -> Optional[asyncpg.Record]:
if not self.connection:
raise RuntimeError("Connection not established")
return await self.connection.fetchrow(query, *args)
from typing import TypeVar, Generic, Protocol
from abc import ABC, abstractmethod
T = TypeVar('T')
U = TypeVar('U')
class Processor(Protocol[T, U]):
async def process(self, item: T) -> U: ...
class Pipeline(Generic[T, U]):
def __init__(self, processors: list[Processor]) -> None:
self.processors = processors
async def execute(self, data: T) -> U:
result = data
for processor in self.processors:
result = await processor.process(result)
return result
async with for resource managementDetailed Technical Reference : See REFERENCE.md
Code Examples & Patterns: See EXAMPLES.md
Weekly Installs
68
Repository
GitHub Stars
42
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode56
claude-code51
codex51
gemini-cli50
cursor47
github-copilot45
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
163,300 周安装
阿里云文档API质量评审工具 - 自动化产品文档与OpenAPI评审报告生成
266 周安装
阿里云文档智能DocMind Node.js SDK使用教程:异步提取文档结构、文本和布局
266 周安装
Super Save - Claude 对话知识保存工具,高效管理项目记忆与团队协作
273 周安装
阿里云AI图像Qwen模型测试技能 - 最小可行性验证与安装指南
271 周安装
Feishu Docx Exporter:飞书/Lark文档转Markdown工具,支持AI分析、批量导出与内容管理
272 周安装
阿里云AI音频TTS语音设计测试技能 - 最小可行性测试与验证指南
272 周安装