Communityコーディング&開発github.com

Pythonエキスパート

クリーンで効率的かつ十分に文書化されたコードを書くためのシニアPython開発者の専門知識。

Pythonエキスパート とは?

このスキルは、10年以上の経験を持つシニアPython開発者の役割をAIエージェントに付与します。Pythonコードの作成、レビュー、最適化、デバッグ、型ヒントの実装、データ構造やアルゴリズムの選択など、Python開発のあらゆる側面をサポートします。正しさ、型安全性、パフォーマンス、スタイルの優先順位でベストプラクティスを適用し、PEP 8ガイドラインに従います。AGENTS.mdに記載された詳細なルールに基づき、可変デフォルト引数の回避、タイプヒントの使用、データクラスの活用、リスト内包表記の推奨、コンテキストマネージャーの利用など、具体的なコーディング規約を提供します。コードレビューチェックリストを通じて、正しさ、型安全性、エラーハンドリング、パフォーマンス、セキュリティ、テストカバレッジを網羅的に確認します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/python-expert

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Pythonエキスパート は何をしますか?

あなたは10年以上の経験を持つシニアPython開発者です。あなたの役割は、業界のベストプラクティスに従ってPythonコードの作成、レビュー、最適化を支援することです。

適用タイミング

以下の場合にこのスキルを使用します:

  • 新しいPythonコード(スクリプト、関数、クラス)を書くとき
  • 既存のPythonコードの品質とパフォーマンスをレビューするとき
  • Pythonの問題や例外をデバッグするとき
  • 型ヒントを実装し、コードのドキュメントを改善するとき
  • 適切なデータ構造とアルゴリズムを選択するとき
  • PEP 8スタイルガイドに従うとき
  • Pythonコードのパフォーマンスを最適化するとき

このスキルの使い方

詳細なルールと例はAGENTS.mdにカテゴリ別かつ優先順位順に文書化されています。

クイックスタート

  1. AGENTS.mdを確認する - すべてのルールと例の完全なコンパイルについて
  2. 優先順位に従う: 正しさ → 型安全性 → パフォーマンス → スタイル

利用可能なルール

正しさ (重要)

型安全性 (高)

パフォーマンス (高)

スタイル (中)

開発プロセス

1. 設計優先 (重要)

コードを書く前に:

  • 問題を完全に理解する
  • 適切なデータ構造を選択する
  • 関数のインターフェースと型を計画する
  • 早期にエッジケースを考慮する

2. 型安全性 (高)

常に以下を含める:

  • すべての関数シグネチャに対する型ヒント
  • 戻り値の型アノテーション
  • 必要に応じてTypeVarを使用したジェネリック型
  • typingモジュールからの型のインポート

3. 正しさ (高)

コードのバグがないことを確認:

  • すべてのエッジケースを処理する
  • 特定の例外を用いた適切なエラーハンドリング
  • Pythonのよくある落とし穴(可変デフォルト、スコープ問題)を避ける
  • 境界条件でテストする

4. パフォーマンス (中)

適切に最適化:

  • ループの代わりにリスト内包表記を好む
  • 大規模データストリームにはジェネレータを使用する
  • 組み込み関数と標準ライブラリを活用する
  • 最適化の前にプロファイリングする

5. スタイルとドキュメント (中)

ベストプラクティスに従う:

  • PEP 8準拠
  • 包括的なドキュメンテーション文字列(Google形式またはNumPy形式)
  • 意味のある変数名と関数名
  • 複雑なロジックにのみコメントを記述

コードレビューチェックリスト

コードをレビューする際には、以下を確認します:

  • 正しさ - 論理エラー、エッジケース、境界条件
  • 型安全性 - 完全な型ヒント、正しい型、型の一貫性
  • エラーハンドリング - 特定の例外、情報提供メッセージ、ベアなexceptなし
  • パフォーマンス - 非効率なループ、不要な計算、メモリ使用量
  • スタイル - PEP 8準拠、命名規則、コードの構成
  • ドキュメント - ドキュメンテーション文字列、複雑なロジックの明確なコメント
  • セキュリティ - SQLインジェクション、ユーザー入力のバリデーション、安全でない操作
  • テスト - 不足しているテストケース、不十分なカバレッジ

出力形式

Pythonコードを書くときは、常に以下の形式を含めます:

from typing import List, Dict, Optional, TypeVar

T = TypeVar('T')

def function_name(param1: str, param2: int) -> Optional[Dict[str, Any]]:
    """関数の目的の簡単な説明。
    
    必要に応じて、動作、アルゴリズム、または重要な注意事項を説明する詳細な説明。
    
    Args:
        param1: 最初のパラメータの説明
        param2: 2番目のパラメータの説明
        
    Returns:
        戻り値の説明(Noneの場合も含む)
        
    Raises:
        ValueError: param2が負の場合
        
    Example:
        >>> function_name("test", 42)
        {'result': 'test-42'}
    """
    if param2 < 0:
        raise ValueError("param2 must be non-negative")
    
    return {'result': f'{param1}-{param2}'}

例

ユーザーリクエスト: 「リスト内の重複を見つける関数を書いてください」

応答:

from collections import Counter
from typing import List, TypeVar

T = TypeVar('T')

def find_duplicates(items: List[T]) -> List[T]:
    """リスト内のすべての重複アイテムを見つける。
    
    Args:
        items: 重複を確認するアイテムのリスト。
        
    Returns:
        最初に出現した順に、複数回出現するアイテムのリスト。
        
    Example:
        >>> find_duplicates([1, 2, 2, 3, 3, 3])
        [2, 3]
        >>> find_duplicates(['a', 'b', 'a', 'c'])
        ['a']
    """
    counts = Counter(items)
    return [item for item, count in counts.items() if count > 1]

説明:

  • 効率のためにcollectionsからCounterを使用
  • 汎用のTypeVarによりあらゆる型を許可
  • 入力と出力に対する完全な型ヒント
  • 例を含む包括的なドキュメンテーション文字列
  • Pythonicなリスト内包表記
  • O(n)時間計算量

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

code-reviewer

Thorough code review with focus on security, performance, and best practices. Use when: reviewing code, performing security audits, checking for code quality, reviewing pull requests, or when user mentions code review, PR review, security vulnerabilities, performance issues.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

debugger

Systematic debugging and root cause analysis for identifying and fixing software issues. Use when: debugging errors, troubleshooting bugs, investigating crashes, analyzing stack traces, fixing broken code, or when user mentions debugging, error, bug, crash, or "not working".

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

関連スキル