python-patterns
Pythonic イディオム、PEP 8標準、型ヒント、堅牢で効率的かつ保守可能なPythonアプリケーションを構築するためのベストプラクティス。
Skill by marshall0524
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/marshall0524-python-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/python-patterns
What's inside
- Skill name
python-patterns- Description
- Pythonic イディオム、PEP 8標準、型ヒント、堅牢で効率的かつ保守可能なPythonアプリケーションを構築するためのベストプラクティス。
- License
- MIT
- Instructions
- 746 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 746 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Python開発パターン
堅牢で効率的かつ保守可能なアプリケーションを構築するための慣用的なPythonパターンとベストプラクティス。
## いつ有効化するか
- 新しいPythonコードを書くとき
- Pythonコードをレビューするとき
- 既存のPythonコードをリファクタリングするとき
- Pythonパッケージ/モジュールを設計するとき
## 核となる原則
### 1. 可読性が重要
Pythonは可読性を優先します。コードは明白で理解しやすいものであるべきです。
```python
# Good: Clear and readable
def get_active_users(users: list[User]) -> list[User]:
"""Return only active users from the provided list."""
return [user for user in users if user.is_active]
# Bad: Clever but confusing
def get_active_users(u):
return [x for x in u if x.a]
```
### 2. 明示的は暗黙的より良い
魔法を避け、コードが何をしているかを明確にしましょう。
```python
# Good: Explicit configuration
import logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
# Bad: Hidden side effects
import some_module
some_module.setup() # What does this do?
```
### 3. EAFP - 許可を求めるより許しを請う方が簡単
Pythonは条件チェックよりも例外処理を好みます。
```python
# Good: EAFP style
def get_value(dictionary: dict, key: str) -> Any:
try:
return dictionary[key]
except KeyError:
return default_value
# Bad: LBYL (Look Before You Leap) style
def get_value(dictionary: dict, key: str) -> Any:
if key in dictionary:
return dictionary[key]
else:
return default_value
```
## 型ヒント
### 基本的な型アノテーション
```python
from typing import Optional, List, Dict, Any
def process_user(
user_id: str,
data: Dict[str, Any],
active: bool = True
) -> Optional[User]:
"""Process a user and return the updated User or None."""
if not active:
return None
return User(user_id, data)
```
### モダンな型ヒント(Python 3.9+)
```python
# Python 3.9+ - Use built-in types
def process_items(items: list[str]) -> dict[str, int]:
return {item: len(item) for item in items}
# Python 3.8 and earlier - Use typing module
from typing import List, Dict
def process_items(items: List[str]) -> Dict[str, int]:
return {item: len(item) for item in items}
```
### 型エイリアスとTypeVar
```python
from typing import TypeVar, Union
# Type alias for complex types
JSON = Union[dict[str, Any], list[Any], str, int, float, bool, None]
def parse_json(data: str) -> JSON:
return json.loads(data)
# Generic types
T = TypeVar('T')
def first(items: list[T]) -> T | None:
"""Return the first item or None if list is empty."""
return items[0] if items else None
```
### プロトコルベースのダックタイピングFrom marshall0524/everythingclaudecode, MIT.
More from marshall0524/everythingclaudecode
- 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
security-review
marshall0524
認証の追加、ユーザー入力の処理、シークレットの操作、APIエンドポイントの作成、支払い/機密機能の実装時にこのスキルを使用します。包括的なセキュリティチェックリストとパターンを提供します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
nutrient-document-processing
marshall0524
Nutrient DWS API を使用してドキュメントの処理、変換、OCR、抽出、編集、署名、フォーム入力を行います。PDF、DOCX、XLSX、PPTX、HTML、画像に対応しています。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
eval-harness
marshall0524
Claude Codeセッションの正式な評価フレームワークで、評価駆動開発(EDD)の原則を実装します
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
iterative-retrieval
marshall0524
サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
coding-standards
marshall0524
TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。
SkillDFreshness: D★ 41Claude Code +9 - 0.483score
python-testing
marshall0524
pytest、TDD手法、フィクスチャ、モック、パラメータ化、カバレッジ要件を使用したPythonテスト戦略。
SkillDFreshness: D★ 41Claude Code +9
Signals
- Stars
- 41
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Feb 20, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from marshall0524
- 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9
Cite this page
python-patterns skill. Agent Mart. https://agentmart.dev/skills/marshall0524-python-patterns (last updated 2026-10-24)