← スキル一覧に戻る

python-patterns
by maxbeworks
I convinced myself it will make me more productive
⭐ 0🍴 0📅 2026年1月12日
SKILL.md
name: python-patterns description: Python coding style - pragmatic, readable, fast development over heavy abstraction
Philosophy
- Python is for quick and dirty solutions - prioritize speed and readability over abstraction layers
- Don't overcomplicate with rarely-used built-in methods or excessive safety measures
- Write code that's easy to read and understand, not "clever"
Readability and Style
- Use one-liners when they're clear and simple
- Break into multiple lines when complexity makes it hard to parse
- Best judgment on what's "too complex" - if you have to think twice, split it
- Prefer explicit over implicit when it improves clarity
Type Annotations
- Only use typing and Pydantic when truly necessary
- API endpoints, request/response models - yes, type these
- Internal utility functions, scraping scripts, quick tools - skip typing unless it adds real value
- Don't type just because "best practices" say so - use judgment based on whether the code is static/stable
Error Handling
- Never use bare
except:- always specify exception types - Handle specific exceptions you expect, let others bubble up
- Early returns for error cases
Class Design
- Prefix internal methods with
_(single underscore) when they're only meant for internal class use - Keep classes simple - don't create unnecessary hierarchies
- Composition over inheritance when it makes sense
Code Organization
- Keep functions focused but don't obsess over single responsibility
- Split when readability suffers, not by arbitrary rules
- Colocate related functionality
- Flat is better than nested
Anti-Patterns
- Over-engineering with abstract base classes and complex inheritance
- Type hints on everything just to have them
- Deeply nested comprehensions that require mental gymnastics
- Magic methods unless you have a damn good reason
- Creating classes when simple functions would work fine
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です