imvityalee

Swift Design Patterns — Design skill for Claude Code

Design community

Claude Code/Codex plugin: MCP server + skill for the 23 GoF design patterns in Swift, with compile-checked idiomatic examples.

How to install Swift Design Patterns

This entry records only its repository, not the path inside it, so there is no exact command to give. Open imvityalee/swift-design-patterns and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Swift Design Patterns does

Claude Code/Codex plugin: MCP server + skill for the 23 GoF design patterns in Swift, with compile-checked idiomatic examples.

Alternatives in Design

README

Swift Design Patterns — for Claude Code & Codex

[![CI](https://github.com/imvityalee/swift-design-patterns/actions/workflows/ci.yml/badge.svg)](https://github.com/imvityalee/swift-design-patterns/actions/workflows/ci.yml)

A [Claude Code](https://code.claude.com) plugin — also available as an [OpenAI Codex](https://github.com/openai/codex) MCP server (see [Use with Codex](#use-with-codex)) — that makes your coding agent fluent in the **23 Gang-of-Four design patterns in Swift**. It comes in two forms:

  • 🧠 the Claude Code plugin (plugins/swift-design-patterns/): a skill with the full catalog bundled as Markdown references, plus slash commands — no server, scripts, or dependencies; and
  • 🧰 an MCP server (npm swift-design-patterns-mcp) exposing the same catalog as tools, for Codex or any MCP client.

Every pattern ships with an **idiomatic, compile-checked Swift example** (all 46 examples type-check under the Swift 6 toolchain).

What you get

MCP tools (MCP server only)

Tool What it does
list_patterns Browse the catalog, optionally filtered by category (Creational / Structural / Behavioral).
get_pattern Full reference for one pattern — intent, problem, solution, applicability, participants, conceptual + real-world Swift examples, pros/cons, related patterns. Accepts an id (abstract-factory) or name (Abstract Factory).
recommend_pattern Describe a design problem in plain words; get ranked candidate patterns with the matched cues.
get_project_conventions Read the current project's architecture & conventions file so advice matches your codebase, not generic defaults.

Skill & commands

  • The swift-design-patterns skill auto-invokes when you're choosing, implementing, refactoring toward, or explaining a pattern in Swift, reading the bundled pattern references.
  • /pattern — quick lookup or recommendation on demand (/pattern Strategy, or `/