Skip to main content

anti-patterns

Common software anti-patterns, code smells, and how to avoid them

インストールへ移動

ソース情報

リポジトリ
NeuralBlitz/Mito
ソースの最終更新活動
2026年3月22日 13:29
検出された SKILL.md の言語
英語
スター
0
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
anti-patterns
description
Common software anti-patterns, code smells, and how to avoid them
license
MIT
compatibility
opencode
metadata
{"audience":"developers","category":"software-development"}
## What I do - Identify code anti-patterns in existing code - Suggest refactoring solutions - Avoid common mistakes in design and implementation - Improve code quality and maintainability - Recognize technical debt indicators ## When to use me When reviewing code, improving designs, or fixing maintainability issues. ## Code Anti-Patterns ### Object-Oriented - **God Object**: Single class doing too much - **Spaghetti Code**: Unstructured, tangled control flow - **Magic Numbers**: Hard-coded values without constants - **Feature Envy**: Excessive use of another class's data - **Data Clumps**: Groups of variables passed together - **Refused Bequest**: Not using inherited methods - **Switch Statements**: Complex conditionals instead of polymorphism - **Parallel Inheritance**: Duplicate class hierarchies ### Design Anti-Patterns - **Singleton Abuse**: Overuse of singletons - **Dependency Hell**: Complex dependency chains - **Circular Dependencies**: A→B→C→A - **Interface Bloat**: Overly complex interfaces - **Leaky Abstractions**: Exposing internal details - **Golden Hammer**: Using one solution for everything - **Reinvention**: Not using built-in features - **Analysis Paralysis**: Over-planning ### Database Anti-Patterns - **Database as IPC**: Using DB for communication - **God Table**: One table for everything - **EAV**: Entity-Attribute-Value pattern - **Naive Enum**: Storing enums as strings without constraints - **Missing Indexes**: Slow queries due to full table scans - **N+1 Queries**: Loading related data inefficiently ### Concurrency - **Race Conditions**: Uncoordinated concurrent access - **Deadlock**: Circular wait dependencies - **Blocking Operations**: Synchronous calls in async code - **Shared Mutex**: Global locks causing contention ### Testing - **Testing the Implementation**: Instead of behavior - **Happy Path Only**: Only testing success cases - **Manual Testing**: No automated tests - **Tight Coupling**: Tests depend on implementation details ## Code Smells - Long methods - Large classes - Duplicate code - Long parameter lists - Primitive obsession - Data classes - Comments explaining bad code ## Refactoring Strategies - Extract Method - Move Method - Replace Conditional with Polymorphism - Introduce Parameter Object - Replace Magic Numbers - Extract Class - Inline Class - Introduce Null Object
GitHubで見る