Token导航 LogoToken导航

Agent Skill · 研究检索

python-standards(Python standards 测试)

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

python-standards 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 17,276。

总安装 6,701周安装 263GitHub Stars 公开资料未说明下载 1,632核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add maxritter/claude-codepro --skill "python-standards"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流,适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。适用于 Python 项目开发和测试场景,特别是需要代码规范和最佳实践检查的任务。

通过 npx skills add maxritter/claude-codepro --skill "python-standards" 命令安装使用。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件或调用外部 API 时,应先明确运行目录和输入输出范围。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/python-standards

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add maxritter/claude-codepro --skill "python-standards";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

python-standards 怎么安装?

在终端执行 npx skills add maxritter/claude-codepro --skill "python-standards"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

python-standards 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

python-standards 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

python-standards 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

python-standards 用的人多吗?

公开数据是累计安装 6,701 次,近一周安装 263 次,下载 1,632 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

python-standards 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
python-standards

Python standards 测试 · 本页

6,701—只读MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Python Standards

Core Rule: Use uv for all package operations, pytest for testing, ruff for formatting/linting. Write self-documenting code with minimal comments.

When to use this skill

  • When installing or managing Python packages and dependencies
  • When writing or running unit tests, integration tests, or test suites
  • When formatting Python code or fixing linting issues
  • When adding type hints or running type checking
  • When writing function/method docstrings
  • When organizing imports in Python files
  • When deciding whether to create a new Python file or extend existing ones
  • When setting up code quality checks (linting, formatting, type checking)
  • When running coverage reports or analyzing test results
  • When ensuring code follows Python best practices and tooling standards

This Skill provides Claude Code with specific guidance on how to adhere to Python tooling standards and best practices for backend development.

Package Management - uv Only

MANDATORY: Use uv for all Python package operations. Never use pip directly.

# Installing packages
uv pip install package-name
uv pip install -r requirements.txt

# Package information
uv pip list
uv pip show package-name

# Running Python scripts/modules
uv run python script.py
uv run pytest

Why uv: Faster dependency resolution, better lock file management, project standard for consistency.

If you catch yourself typing pip: Stop and use uv pip instead.

Testing with pytest

Run tests using uv run pytest:

uv run pytest                                      # All tests
uv run pytest -m unit                              # Unit tests only
uv run pytest -m integration                       # Integration tests only
uv run pytest tests/unit/test_module.py            # Specific file
uv run pytest tests/unit/test_module.py::test_name # Specific test
uv run pytest -v                                   # Verbose output
uv run pytest -s                                   # Show print statements
uv run pytest --cov=src --cov-report=term-missing  # Coverage report
uv run pytest --cov-fail-under=80                  # Enforce 80% coverage

Test markers: Use @pytest.mark.unit and @pytest.mark.integration to categorize tests.

Code Quality Tools

Ruff (Linting & Formatting):

ruff check .           # Check for issues
ruff check . --fix     # Auto-fix issues
ruff format .          # Format all code

Type Checking:

basedpyright src            # Type checker

Run quality checks before marking work complete. Use getDiagnostics tool to verify no errors.

Code Style

Docstrings

Use concise one-line docstrings for most functions:

def calculate_discount(price: float, rate: float) -> float:
    """Calculate discounted price by applying rate."""
    return price * (1 - rate)

Multi-line docstrings only for complex functions:

def process_payment(order_id: str, payment_method: str) -> PaymentResult:
    """
    Process payment for order using specified method.

    Validates payment method, charges customer, updates order status,
    and sends confirmation email. Rolls back on any failure.
    """
    # Implementation

Don't document obvious behavior:

# BAD - docstring adds no value
def get_user_email(user_id: str) -> str:
    """Get the email address for a user by their ID."""

# GOOD - name is self-explanatory
def get_user_email(user_id: str) -> str:
    return db.query(User).filter_by(id=user_id).first().email

Comments

Write self-documenting code. Minimize inline comments.

Use clear names instead of comments:

# BAD - comment explains unclear code
# Check if user has permission
if u.r == 'admin' or u.r == 'moderator':

# GOOD - code explains itself
if user.is_admin() or user.is_moderator():

Use comments only for:

  • Complex algorithms requiring explanation
  • Non-obvious business logic or domain rules
  • Workarounds for external library bugs (include issue link)
  • Performance optimizations that sacrifice clarity

Import Organization

Order: Standard library → Third-party → Local application

# Standard library
import os
from datetime import datetime

# Third-party
import pytest
from sqlalchemy import Column, Integer

# Local application
from app.models import User
from app.services import EmailService

Ruff automatically organizes imports. Run ruff check. --fix to sort.

Remove unused imports immediately. Use getDiagnostics to identify them.

Type Hints

Add type hints to all function signatures:

# Required
def process_order(order_id: str, user_id: int) -> Order:
    pass

# Not required for simple private methods
def _format_price(amount):
    return f"${amount:.2f}"

Use modern type syntax (Python 3.10+):

# Good
def get_users(ids: list[int]) -> list[User]:
    pass

# Avoid (old style)
from typing import List
def get_users(ids: List[int]) -> List[User]:
    pass

File Organization

Prefer editing existing files over creating new ones.

Before creating a new Python file, ask:

  1. Can this fit in an existing module?
  2. Is there a related file to extend?
  3. Does this truly need to be separate?

Benefits: Reduces file sprawl, maintains coherent structure, easier navigation.

When to create new files:

  • New model/entity with distinct responsibility
  • New service layer for separate domain
  • Test file for new module
  • Clear architectural boundary

Common Patterns

Avoid bare except:

# BAD
try:
    process()
except:
    pass

# GOOD
try:
    process()
except ValueError as e:
    logger.error(f"Invalid value: {e}")
    raise

Use context managers for resources:

# GOOD
with open(file_path) as f:
    data = f.read()

# GOOD
with db.session() as session:
    user = session.query(User).first()

Prefer pathlib over os.path:

# GOOD
from pathlib import Path
config_path = Path(__file__).parent / "config.yaml"

# Avoid
import os
config_path = os.path.join(os.path.dirname(__file__), "config.yaml")

Verification Checklist

Before marking Python work complete:

  • Used uv for all package operations (not pip)
  • All tests pass: uv run pytest
  • Code formatted: ruff format.
  • No linting issues: ruff check.
  • Type checking passes: basedpyright src
  • No unused imports (check with getDiagnostics)
  • Docstrings added to public functions
  • Type hints on function signatures
  • Coverage ≥ 80%: uv run pytest --cov=src --cov-fail-under=80

Quick Reference

TaskCommand
Install packageuv pip install package-name
Run testsuv run pytest
Run with coverageuv run pytest --cov=src
Format coderuff format.
Fix lintingruff check. --fix
Type check (pyright)basedpyright src
Run Python scriptuv run python script.py

平台分布

Claude Code

29.7%
按下载量换算485

OpenCode

23.97%
按下载量换算391

Cursor

19.12%
按下载量换算312

windsurf

13.23%
按下载量换算216

trae

7.49%
按下载量换算122

Codex

3.54%
按下载量换算58

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills