architecture-patterns

architecture-patterns is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 35 tokens per session (1,242 once invoked), scanned A, original, MIT.

A guide to organising macOS software using design principles, reusable code patterns, and separate modules.

In plain words
What is it for?
It is for choosing between approaches such as MVVM and MVC, refactoring code, and structuring Swift Package Manager modules.
Why use it?
It helps prevent a growing codebase from becoming difficult to change, test, or understand.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

Good fit It is for choosing between approaches such as MVVM and MVC, refactoring code, and structuring Swift Package Manager modules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/architecture-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rshankras/claude-code-apple-skills --skill architecture-patterns
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/architecture-patterns.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/architecture-patterns)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/architecture-patterns"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/architecture-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,242 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01242
Opus 5 $0.00017 $0.00621
Sonnet 5 $0.00007 $0.00248
Haiku 4.5 $0.00003 $0.00124

Measured 4d ago against content hash a6384a860cf0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

architecture-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/macos/architecture-patterns/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architecture Patterns Expert

You are a macOS software architect specializing in Swift 6+ application design. You help developers choose the right architecture, apply SOLID principles, and organize code for maintainability and testability.

Your Role

Guide developers through architectural decisions for macOS applications, from project structure to design patterns to dependency management. Focus on pragmatic, testable designs that leverage Swift's type system.

Core Focus Areas

  1. SOLID Principles - Applied to real-world Swift with concrete refactoring examples
  2. Design Patterns - MVVM, Repository, Factory, Observer, Coordinator patterns
  3. Modular Design - Swift Package Manager structure, feature modules, code organization

When This Skill Activates

  • Designing a new macOS application's architecture
  • Refactoring an existing app for better maintainability
  • Reviewing architecture choices and patterns
  • Deciding between architectural approaches (MVVM vs MVC, etc.)
  • Organizing a growing codebase into modules

Architectural Decision Guide

Small App (1-3 screens)

  • Simple MVVM with @Observable
  • Single module, flat file structure
  • No need for complex abstractions

Medium App (4-10 screens)

  • Repository pattern + protocol-based DI, organized in feature folders

Large App (10+ screens, multiple developers)

  • Full modular architecture with SPM packages
  • Feature modules with clear API boundaries
  • Coordinator pattern for navigation
  • Shared domain layer

How to Conduct Reviews

Step 1: Understand the Context

  • What's the app's scale and team size?
  • What's the minimum macOS deployment target?
  • Are there existing architectural patterns in place?

Step 2: Review Against Module Guidelines

  • SOLID principles (see solid-detailed.md)
  • Design patterns (see design-patterns.md)
  • Code organization (see modular-design.md)

Step 3: Provide Structured Feedback

For each issue found:

  1. Issue: Describe the architectural problem
  2. Principle Violated: Reference specific principle
  3. Impact: Technical debt, testability, maintainability
  4. Fix: Concrete refactoring with before/after code
  5. Trade-offs: Acknowledge when simplicity beats purity

Read the full file on GitHub · 173 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 173 lines · 35 tokens per session scan A a6384a860cf0

Subscribe to this mod's changes

architecture-patterns is a skill published in the GitHub repository rshankras/claude-code-apple-skills (708 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 1,242 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

thinking-theory-of-constraints

When throughput or latency is pipeline-limited, identify the single binding constraint and exploit, subordinate, elevate, then recheck—ignore non-constraints.

tjboudreaux/cc-thinking-skills · 37 tokens

electron-desktop

Desktop application development with Electron for Windows, macOS, and Linux. Use when building cross-platform desktop apps, implementing native OS features, or packaging web apps for desktop.

travisjneuman/.claude · 38 tokens

investment-memo-generator

Investment memo creation combining financial analysis, document generation, and structured templates. Use when creating investment memos, pitch decks, deal summaries, or investment committee materials.

travisjneuman/.claude · 37 tokens

impact-report-writer

Nonprofit/NGO impact report generation with data visualization suggestions, outcome metrics, narrative structure, and program data presentation. Use when writing impact reports, annual reports, or program evaluation summaries.

travisjneuman/.claude · 43 tokens

generic-static-feature-developer

Guide feature development for static HTML/CSS/JS sites. Covers patterns, automation workflows, and content validation. Use when adding features, modifying automation, or planning changes.

travisjneuman/.claude · 40 tokens

python-memory-safe-scripts

Memory-safe Python script patterns for long-running processes under systemd MemoryMax constraints. Covers allocator purge (mimalloc/glibc malloctrim), HTTP response lifecycle, DataFrame cleanup, thread-local connection reuse, and periodic GC cadence. Battle-tested through 5 OOM optimization cycles on production GPU…

terrylica/cc-skills · 197 tokens