一键导入
design-pattern-application
Apply Gang of Four and architectural patterns appropriately to solve common software design problems
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply Gang of Four and architectural patterns appropriately to solve common software design problems
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design AI agents with appropriate capabilities, tools, and personas for specific software development tasks
Design RESTful APIs with proper resource modeling, HTTP methods, error handling, and clear contracts following REST principles
Document APIs comprehensively with signatures, parameters, return values, errors, and working code examples for developer reference
Implement robust third-party API integrations with proper authentication, error handling, and rate limiting
Apply proven architectural patterns (MVC, layered, microservices) to create maintainable systems with clear separation of concerns
Systematically reproduce, diagnose, and analyze bugs to determine root cause, assess severity, and plan fix strategy
| name | Design Pattern Application |
| description | Apply Gang of Four and architectural patterns appropriately to solve common software design problems |
| category | architecture |
| required_tools | ["Read","Write"] |
Recognize when to apply established design patterns to create flexible, maintainable, and reusable code structures.
# Problem: Multiple payment methods with different processing logic
class PaymentStrategy:
def process(self, amount): pass
class CreditCardPayment(PaymentStrategy):
def process(self, amount):
# Credit card processing logic
print(f"Processing ${amount} via credit card")
class PayPalPayment(PaymentStrategy):
def process(self, amount):
# PayPal processing logic
print(f"Processing ${amount} via PayPal")
class Order:
def __init__(self, payment_strategy: PaymentStrategy):
self.payment = payment_strategy
def checkout(self, amount):
self.payment.process(amount)
# Usage
order1 = Order(CreditCardPayment())
order1.checkout(100)
order2 = Order(PayPalPayment())
order2.checkout(50)