スキル一覧に戻る
Howmany-Zeta

python-coding

by Howmany-Zeta

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: python-coding description: Comprehensive Python development guidance covering best practices, coding patterns, testing strategies, and code quality standards. version: 1.0.0 author: AIECS Team tags:

  • python
  • development
  • coding
  • testing
  • best-practices dependencies: [] recommended_tools:
  • python
  • pytest
  • ruff
  • mypy scripts: validate-python: path: scripts/validate-python.sh mode: subprocess description: Validates Python syntax and runs basic linting checks parameters: file_path: type: string required: true description: Path to the Python file to validate run-tests: path: scripts/run-tests.sh mode: subprocess description: Runs pytest on a specified test file or directory parameters: test_path: type: string required: false description: Path to test file or directory (defaults to current directory) verbose: type: boolean required: false description: Run tests with verbose output

Python Coding Skill

This skill provides comprehensive guidance for Python development, including best practices, coding patterns, testing strategies, and code quality standards.

When to Use This Skill

Activate this skill when:

  • Writing new Python code or modules
  • Refactoring existing Python code
  • Setting up Python project structure
  • Writing or improving unit tests
  • Debugging Python applications
  • Reviewing code for best practices

Key Principles

PEP 8 Compliance

Follow Python's official style guide for consistent, readable code:

  • Use 4 spaces for indentation
  • Limit lines to 88 characters (Black formatter default)
  • Use snake_case for functions and variables
  • Use PascalCase for class names
  • Add blank lines to separate logical sections

Type Hints

Use type annotations for better code clarity and IDE support:

def process_data(items: list[str], limit: int = 10) -> dict[str, int]:
    ...

Testing Practices

  • Write tests alongside code using pytest
  • Aim for high test coverage on critical paths
  • Use fixtures for reusable test setup
  • Mock external dependencies appropriately

Quick Reference

Common Patterns

PatternUse Case
Context ManagerResource management (files, connections)
DataclassSimple data containers
ProtocolStructural subtyping / duck typing
GeneratorMemory-efficient iteration

Essential Commands

# Validate Python syntax
python -m py_compile your_file.py

# Run tests
pytest test_file.py -v

# Type checking
mypy your_module/

# Linting
ruff check your_module/

Resources

See references/best-practices.md for detailed guidelines and examples/code-patterns.py for code samples.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です