Token导航 LogoToken导航TokenDH.com
AI 工具external-servicegithub未标认证来源可访问clear审计通过

software-patterns软件模式

Agent Skill

software-patterns 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,116

周安装

175

GitHub Stars

40

下载量

1,442
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:software-patterns(软件模式)
来源仓库:https://github.com/bobmatnyc/claude-mpm-skills
仓库路径:skills/software-patterns
安装命令:
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill software-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill software-patterns

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理和分析。
  • 支持对开源项目进行状态跟踪和问题归类。
  • 安装命令:npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill software-patterns
  • 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。

SKILL.md

Software Patterns Primer

Overview

Architectural patterns solve specific structural problems. This skill provides a decision framework for when to apply each pattern, not a catalog to memorize.

Core philosophy: Patterns solve problems. No problem? No pattern needed.

When to Use This Skill

Activate when:

  • Designing a new system or major feature
  • Adding external service integrations
  • Code becomes difficult to test or modify
  • Services start calling each other in circles
  • Failures in one component cascade to others
  • Business logic scatters across multiple locations

Pattern Hierarchy

Foundational (Apply by Default)

These patterns provide the structural foundation for maintainable systems. Apply unless you have specific reasons not to.

PatternProblem SolvedSignal to Apply
Dependency InjectionTight coupling, untestable codeClasses instantiate their own dependencies
Service-Oriented ArchitectureMonolithic tangles, unclear boundariesBusiness logic scattered, no clear ownership

Situational (Apply When Triggered)

These patterns address specific problems. Don't apply preemptively.

PatternProblem SolvedSignal to Apply
RepositoryData access couplingServices know about database details
Domain EventsCircular dependencies, temporal couplingService A calls B calls C calls A
Anti-Corruption LayerExternal system couplingExternal API changes break your code
Circuit BreakerCascading failuresOne slow service takes down everything

Foundational Patterns DetailSituational Patterns Detail

Quick Decision Tree

Is code hard to test?
├─ Yes → Apply Dependency Injection
└─ No → Continue

Is business logic scattered?
├─ Yes → Apply Service-Oriented Architecture
└─ No → Continue

Do services know database details?
├─ Yes → Apply Repository Pattern
└─ No → Continue

Do services call each other in cycles?
├─ Yes → Apply Domain Events
└─ No → Continue

Does external API change break your code?
├─ Yes → Apply Anti-Corruption Layer
└─ No → Continue

Does one slow service break everything?
├─ Yes → Apply Circuit Breaker
└─ No → Current patterns sufficient

Complete Decision Trees

Pattern Selection by Problem

"My code is hard to test"

Primary: Dependency Injection Why: Dependencies passed in = dependencies mockable

"I don't know where business logic lives"

Primary: Service-Oriented Architecture Secondary: Repository (if data access is the confusion) Why: Clear boundaries = clear ownership

"External API changes keep breaking my code"

Primary: Anti-Corruption Layer Why: Translation layer absorbs external volatility

"Services call each other in circles"

Primary: Domain Events Why: Publish/subscribe breaks circular dependencies

"One slow service takes down everything"

Primary: Circuit Breaker Secondary: Retry with Backoff Why: Fail fast prevents cascade

"Database changes ripple through codebase"

Primary: Repository Pattern Why: Abstraction layer isolates data access

Real-World Examples

Implementation Priority

When starting a new system:

  1. First: Establish DI container/pattern
  2. Second: Define service boundaries (SOA)
  3. Third: Add Repository for data access
  4. Then: Layer situational patterns as problems emerge

When refactoring existing system:

  1. First: Identify the specific pain point
  2. Second: Apply the minimal pattern that solves it
  3. Third: Validate improvement before adding more

Key Principles

Minimal Sufficient Pattern Apply the simplest pattern that solves the problem. Over-architecting creates its own maintenance burden.

Problem-First Selection Never ask "which patterns should I use?" Ask "what problem am I solving?"

Composition Over Prescription Patterns combine. Repository + Domain Events + Circuit Breaker is common for external data sources.

Explicit Over Implicit Dependencies should be visible. Service Locator hides them; DI exposes them.

Navigation

Pattern Details

Decision Support

Implementation

  • Examples: Language-agnostic pseudocode for each pattern combination

Red Flags - STOP

STOP when:

  • "Let me add all these patterns upfront" → Apply only what solves current problems
  • "This pattern is best practice" → Best practice for what problem?
  • "We might need this later" → YAGNI - add when needed
  • "Service Locator is simpler" → Hidden dependencies cause testing pain
  • "I'll just call this service directly" → Consider if events would decouple better
  • "External API is stable, no need for ACL" → APIs always change eventually

ALL of these mean: STOP. Identify the specific problem first.

Integration with Other Skills

  • test-driven-development: DI enables testability; TDD validates pattern application
  • systematic-debugging: Clear boundaries (SOA) simplify debugging
  • root-cause-tracing: Well-structured services have clearer call chains

Pattern Combinations

Common effective combinations:

ScenarioPatterns
New microserviceDI + SOA + Repository
External API integrationDI + ACL + Circuit Breaker
Event-driven systemDI + SOA + Domain Events
Data-heavy applicationDI + SOA + Repository + Unit of Work

Remember: Patterns exist to solve problems. Start with the problem, not the pattern.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.32%
按下载量换算365

Gemini CLI

21.47%
按下载量换算310

OpenCode

18.2%
按下载量换算262

Antigravity

13.08%
按下载量换算189

windsurf

8.24%
按下载量换算119

github-copilot

3.37%
按下载量换算49

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills