Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问clear审计通过

python-proPython 专业版

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

2,895

周安装

116

GitHub Stars

76

下载量

937
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:python-pro(Python 专业版)
来源仓库:https://github.com/404kidwiz/claude-supercode-skills
仓库路径:skills/python-pro
安装命令:
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill python-pro
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill python-pro

简介

python-pro 提供现代 Python 开发支持,涵盖类型注解、异步编程和 FastAPI 框架应用。

  • 它适合构建高性能 API、实现类型安全代码和优化数据处理逻辑,支持 mypy 合规检查。
  • 可用于阅读项目代码、定位测试问题或整理运行命令,但需结合具体虚拟环境和依赖版本使用。
  • 安装需通过 npx 添加指定仓库中的 skill,建议确认项目目录结构和依赖管理工具(如 poetry 或 pipenv)。
  • 涉及脚本执行或文件读写时,应明确运行路径和输入输出范围,防止误操作生产数据或破坏环境隔离。

SKILL.md

Python Pro Specialist

Purpose

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.

When to Use

  • Building Python applications with modern features (3.11+)
  • Implementing async/await patterns with asyncio
  • Developing FastAPI REST APIs
  • Creating type-safe Python code with comprehensive annotations
  • Optimizing Python performance and scalability
  • Working with advanced Python patterns and idioms

Quick Start

Invoke this skill when:

  • Building new Python 3.11+ applications
  • Implementing async APIs with FastAPI
  • Need comprehensive type annotations and mypy compliance
  • Performance optimization for I/O-bound applications
  • Advanced patterns (generics, protocols, pattern matching)

Do NOT invoke when:

  • Simple scripts without type safety requirements
  • Legacy Python 2.x or early 3.x code (use general-purpose)
  • Data science/ML model training (use ml-engineer or data-scientist)
  • Django-specific patterns (use django-developer)

Core Capabilities

Python 3.11+ Modern Features

  • Pattern Matching: Structural pattern matching with match/case statements
  • Exception Groups: Exception handling with exception groups and except*
  • Union Types: Modern union syntax with | instead of Union
  • Self Types: Using typing.Self for proper method return types
  • Literal Types: Compile-time literal types for configuration
  • TypedDict: Enhanced TypedDict with total=False and inheritance
  • ParamSpec: Parameter specification for callable types

Advanced Type Annotations

  • Generics: Complex generic classes, functions, and protocols
  • Protocols: Structural subtyping and duck typing with typing.Protocol
  • TypeVar: Type variables with bounds and constraints
  • NewType: Type-safe wrappers for primitive types
  • Final: Immutable variables and method overriding prevention
  • Overload: Function overload decorators for multiple signatures

Async Programming Expertise

  • Asyncio: Deep understanding of asyncio event loop and coroutines
  • Concurrency Patterns: Async context managers, generators, comprehensions
  • AsyncIO Libraries: aiohttp, asyncpg, asyncpg-pool for high-performance I/O
  • FastAPI: Building async REST APIs with automatic documentation
  • Background Tasks: Async background processing and task queues
  • WebSockets: Real-time communication with async websockets

Decision Framework

When to Use Async

ScenarioUse Async?Reason
API with DB callsYesI/O-bound, benefits from concurrency
CPU-heavy computationNoUse multiprocessing instead
File uploads/downloadsYesI/O-bound operations
External API callsYesNetwork I/O benefits from async
Simple CLI scriptsNoOverhead not worth it

Type Annotation Strategy

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

Core Patterns

Pattern Matching with Type Guards

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"

Async Context Manager

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)

Generic Data Processing Pipeline

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

Best Practices Quick Reference

Code Quality

  • Type Annotations: Add comprehensive type annotations to all public APIs
  • PEP 8 Compliance: Follow style guidelines with black and isort
  • Error Handling: Implement proper exception handling with custom exceptions
  • Documentation: Use docstrings with type hints for all functions and classes
  • Testing: Maintain high test coverage with unit, integration, and E2E tests

Async Programming

  • Async Context Managers: Use async with for resource management
  • Exception Handling: Handle async exceptions properly with try/except
  • Concurrency Limits: Limit concurrent operations with semaphores
  • Timeout Handling: Implement timeouts for async operations
  • Resource Cleanup: Ensure proper cleanup in async functions

Performance

  • Profiling: Profile before optimizing to identify bottlenecks
  • Caching: Implement appropriate caching strategies
  • Connection Pooling: Use connection pools for database access
  • Lazy Loading: Implement lazy loading where appropriate

Development Workflow

Project Setup

  • Uses poetry or pip-tools for dependency management
  • Implements pyproject.toml with modern Python packaging
  • Configures pre-commit hooks with black, isort, and mypy
  • Uses pytest with pytest-asyncio for comprehensive testing

Type Checking

  • Implements strict mypy configuration
  • Uses pyright for enhanced IDE type checking
  • Leverages type stubs for external libraries
  • Uses mypy plugins for Django, SQLAlchemy, and other frameworks

Integration Patterns

python-pro ↔ fastapi/django

  • Handoff: Python pro designs types/models → Framework implements endpoints
  • Collaboration: Shared Pydantic models, type-safe APIs

python-pro ↔ database-administrator

  • Handoff: Python pro uses ORM → DBA optimizes queries
  • Collaboration: Index strategies, query performance

python-pro ↔ devops-engineer

  • Handoff: Python pro writes app → DevOps deploys
  • Collaboration: Dockerfile, requirements.txt, health checks

python-pro ↔ ml-engineer

  • Handoff: Python pro builds API → ML engineer integrates models
  • Collaboration: FastAPI + model serving (TensorFlow Serving, TorchServe)

Additional Resources

- Repository pattern with async SQLAlchemy - Background tasks with Celery + FastAPI - Advanced Pydantic validation patterns

- Anti-patterns (ignoring type hints, blocking async) - FastAPI endpoint examples - Testing patterns with pytest-asyncio

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.26%
按下载量换算255

OpenCode

23.79%
按下载量换算223

windsurf

15.63%
按下载量换算146

Cursor

12.76%
按下载量换算120

Codex

8.53%
按下载量换算80

Gemini CLI

3.86%
按下载量换算36

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills