Design Patterns
Apply common design patterns in .NET when they clearly reduce complexity, isolate variation, or improve changeability. Use when evaluating Strategy, Factory, Decorator, Specification, and similar patterns.
Install
npx skills add DIL8654/claude-code-dotnet-template --skill design-patternsgit clone --depth 1 https://github.com/DIL8654/claude-code-dotnet-template.git /tmp/claude-code-dotnet-template
mkdir -p ~/.claude/skills
cp -r /tmp/claude-code-dotnet-template/.claude/skills/design-patterns ~/.claude/skills/design-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Design Patterns Skill
Apply design patterns pragmatically in .NET codebases. Choose the smallest pattern that makes the design clearer.
## When to Use
- Replacing repeated conditional logic
- Isolating policy or algorithm variations
- Simplifying construction with multiple branches
- Reviewing whether an existing abstraction is justified
---
## Quick Reference: Pattern Fit
| Pattern | Use When | Avoid When |
|---------|----------|------------|
| Strategy | Multiple interchangeable behaviors exist | One branch is enough |
| Factory Method | Construction has real branching or hidden dependencies | Constructor call is already clear |
| Decorator | Cross-cutting behavior wraps a boundary | Inheritance would be simpler and local |
| Specification | Query or rule composition is growing noisy | One-off filter logic exists in one place |
---
## Strategy Pattern
```csharp
// GOOD: Policy varies by scenario
public interface IPricingStrategy
{
decimal Calculate(Order order);
}
public sealed class StandardPricingStrategy : IPricingStrategy
{
public decimal Calculate(Order order) => order.Subtotal;
}
public sealed class DiscountPricingStrategy : IPricingStrategy
{
public decimal Calculate(Order order) => order.Subtotal * 0.9m;
}
```
Use when behavior changes by feature flag, product type, tenant, or policy.
---
## Factory MethodDetails
- Skill name
design-patterns- Repository
- DIL8654/claude-code-dotnet-template
- Path
.claude/skills/design-patterns/SKILL.md- License
- GPL-3.0
- Repo updated
- 24 March 2026
FAQ
What does the Design Patterns skill do?
Apply common design patterns in .NET when they clearly reduce complexity, isolate variation, or improve changeability. Use when evaluating Strategy, Factory, Decorator, Specification, and similar patterns.
How do I install the Design Patterns skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add DIL8654/claude-code-dotnet-template --skill design-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Design Patterns popular?
It lives in DIL8654/claude-code-dotnet-template, which has 9 GitHub stars and 5 forks.
Related skills
API Contract Review
9DIL8654/claude-code-dotnet-template
Review ASP.NET Core Web API contracts for HTTP semantics, versioning, backward compatibility, and response consistency. Use when the user asks to review an API, check endpoints, validate REST behavior, or before releasing contract changes.
Architecture Review
9DIL8654/claude-code-dotnet-template
Review Clean Architecture boundaries, dependency direction, layering decisions, and abstraction quality in .NET solutions. Use when evaluating project structure, new dependencies, service boundaries, or architectural drift.
Azure Integration
9DIL8654/claude-code-dotnet-template
Add Azure services to .NET applications with Managed Identity, typed options, infrastructure isolation, and production-safe configuration. Use when wiring Key Vault, App Configuration, Storage, Service Bus, or Azure Identity patterns.
Show Me
10charlie947/skills-for-everyone
Put the finished thing in front of the user instead of describing it. Renders plans, comparisons, options, layouts, reports and drafts as a self-contained HTML page and opens it in their browser before saying a word about it. Use when the user says "show me", "let me see it", "can I see it", "what does it look like", "give me options", "which one", "I don't see anything", or any moment you are about to describe a layout, a plan, a comparison or a design in prose. Always use it before asking the user to pick, approve or judge anything visual.
Bar3
9HaasStefan/skills-lint
Performs the foo operation with input validation and schema checking.
Pool Info
8KyberNetwork/kyberswap-skills
This skill should be used when the user asks to "check pool info", "get pool details", "pool TVL", "pool volume", "pool APR", "find pools", "search pools", "best pool for", "which pool", "pool address info", "what DEX is this pool", "identify pool", "pool stats", or wants to look up pool metadata (DEX, fee tier, tokens, TVL, volume, APR) before zapping into a pool. Also used internally by zap skills for DEX auto-detection when the user provides a pool address without specifying the DEX.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.