Swiftui View Refactor
Dimillian/Skills
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.
Apply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems.
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/design-patterns-implementation .claude/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .claude/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/design-patterns-implementation .agents/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .agents/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/design-patterns-implementation .cursor/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .cursor/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/tmcfarlane/oh-my-cursor.git --path skills/design-patterns-implementation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/design-patterns-implementation .gemini/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .gemini/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/design-patterns-implementation .github/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .github/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install tmcfarlane/oh-my-cursor design-patterns-implementation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tmcfarlane/oh-my-cursor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/design-patterns-implementation .opencode/skills/design-patterns-implementation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "design-patterns-implementation" agent skill from https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/design-patterns-implementation into .opencode/skills/design-patterns-implementation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "design-patterns-implementation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
design-patterns-implementationApply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems.
Design Patterns Implementation is an agent skill from tmcfarlane/oh-my-cursor. Apply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems. Use when refactoring code architecture, implementing extensible systems, or following SOLID principles.
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Design patterns. The repository describes itself as: Like “oh-my-opencode”, but for Cursor IDE. Multi-agent orchestration, natively, using nothing but a few config files. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 5bad458. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript, python, javascript and java).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Design Patterns Implementation loads about 2.2k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 244 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from tmcfarlane/oh-my-cursor at commit 5bad458, republished under its MIT licence (© tmcfarlane). 244 words, ~2,161 tokens.
.claude/skills/design-patterns-implementation/SKILL.md (or your agent's skills folder).Apply proven design patterns to create maintainable, extensible, and testable code architectures.
Ensure a class has only one instance with global access.
class DatabaseConnection {
private static instance: DatabaseConnection;
private connection: any;
private constructor() {
this.connection = this.createConnection();
}
public static getInstance(): DatabaseConnection {
if (!DatabaseConnection.instance) {
DatabaseConnection.instance = new DatabaseConnection();
}
return DatabaseConnection.instance;
}
private createConnection() {
return { /* connection logic */ };
}
}
// Usage
const db1 = DatabaseConnection.getInstance();
const db2 = DatabaseConnection.getInstance();
// db1 === db2 (same instance)Create objects without specifying exact classes.
from abc import ABC, abstractmethod
class PaymentProcessor(ABC):
@abstractmethod
def process_payment(self, amount: float) -> bool:
pass
class StripeProcessor(PaymentProcessor):
def process_payment(self, amount: float) -> bool:
# Stripe-specific logic
return True
class PayPalProcessor(PaymentProcessor):
def process_payment(self, amount: float) -> bool:
# PayPal-specific logic
return True
class PaymentProcessorFactory:
@staticmethod
def create_processor(processor_type: str) -> PaymentProcessor:
if processor_type == 'stripe':
return StripeProcessor()
elif processor_type == 'paypal':
return PayPalProcessor()
else:
raise ValueError(f'Unknown processor: {processor_type}')
# Usage
processor = PaymentProcessorFactory.create_processor('stripe')
processor.process_payment(100.00)Define one-to-many dependency for event notification.
class Subject {
constructor() {
this.observers = [];
}
attach(observer) {
this.observers.push(observer);
}
detach(observer) {
this.observers = this.observers.filter(obs => obs !== observer);
}
notify(data) {
this.observers.forEach(observer => observer.update(data));
}
}
class Observer {
update(data) {
console.log('Received update:', data);
}
}
// Usage
const subject = new Subject();
const observer1 = new Observer();
const observer2 = new Observer();
subject.attach(observer1);
subject.attach(observer2);
subject.notify({ event: 'data_changed' });Define family of algorithms and make them interchangeable.
interface CompressionStrategy {
byte[] compress(byte[] data);
}
class ZipCompression implements CompressionStrategy {
public byte[] compress(byte[] data) {
// ZIP compression logic
return data;
}
}
class GzipCompression implements CompressionStrategy {
public byte[] compress(byte[] data) {
// GZIP compression logic
return data;
}
}
class FileCompressor {
private CompressionStrategy strategy;
public FileCompressor(CompressionStrategy strategy) {
this.strategy = strategy;
}
public void setStrategy(CompressionStrategy strategy) {
this.strategy = strategy;
}
public byte[] compressFile(byte[] data) {
return strategy.compress(data);
}
}
// Usage
FileCompressor compressor = new FileCompressor(new ZipCompression());
compressor.compressFile(fileData);
// Change strategy at runtime
compressor.setStrategy(new GzipCompression());
compressor.compressFile(fileData);Add responsibilities to objects dynamically.
interface Coffee {
cost(): number;
description(): string;
}
class SimpleCoffee implements Coffee {
cost(): number {
return 5;
}
description(): string {
return 'Simple coffee';
}
}
class MilkDecorator implements Coffee {
constructor(private coffee: Coffee) {}
cost(): number {
return this.coffee.cost() + 2;
}
description(): string {
return this.coffee.description() + ', milk';
}
}
class SugarDecorator implements Coffee {
constructor(private coffee: Coffee) {}
cost(): number {
return this.coffee.cost() + 1;
}
description(): string {
return this.coffee.description() + ', sugar';
}
}
// Usage
let coffee: Coffee = new SimpleCoffee();
console.log(coffee.cost()); // 5
coffee = new MilkDecorator(coffee);
console.log(coffee.cost()); // 7
coffee = new SugarDecorator(coffee);
console.log(coffee.cost()); // 8
console.log(coffee.description()); // "Simple coffee, milk, sugar"Abstract data access logic.
from abc import ABC, abstractmethod
from typing import List, Optional
class UserRepository(ABC):
@abstractmethod
def find_by_id(self, user_id: int) -> Optional[User]:
pass
@abstractmethod
def find_all(self) -> List[User]:
pass
@abstractmethod
def save(self, user: User) -> User:
pass
@abstractmethod
def delete(self, user_id: int) -> bool:
pass
class DatabaseUserRepository(UserRepository):
def __init__(self, db_connection):
self.db = db_connection
def find_by_id(self, user_id: int) -> Optional[User]:
result = self.db.query('SELECT * FROM users WHERE id = ?', user_id)
return User.from_dict(result) if result else None
def find_all(self) -> List[User]:
results = self.db.query('SELECT * FROM users')
return [User.from_dict(r) for r in results]
def save(self, user: User) -> User:
self.db.execute('INSERT INTO users (...) VALUES (...)', user.to_dict())
return user
def delete(self, user_id: int) -> bool:
return self.db.execute('DELETE FROM users WHERE id = ?', user_id)Invert control by injecting dependencies.
// Bad: Hard-coded dependencies
class OrderService {
private db = new MySQLDatabase(); // Tightly coupled
private email = new GmailService(); // Tightly coupled
createOrder(order: Order) {
this.db.save(order);
this.email.send(order.customer_email, 'Order created');
}
}
// Good: Dependency injection
interface Database {
save(entity: any): void;
}
interface EmailService {
send(to: string, subject: string): void;
}
class OrderService {
constructor(
private db: Database,
private email: EmailService
) {}
createOrder(order: Order) {
this.db.save(order);
this.email.send(order.customer_email, 'Order created');
}
}
// Usage - easy to test with mocks
const service = new OrderService(
new MySQLDatabase(),
new GmailService()
);
// Test with mocks
const testService = new OrderService(
new MockDatabase(),
new MockEmailService()
);| Pattern | Use Case |
|---|---|
| Singleton | Database connections, configuration managers |
| Factory | Creating objects based on runtime conditions |
| Observer | Event systems, pub/sub, reactive programming |
| Strategy | Algorithms that can be swapped at runtime |
| Decorator | Adding features dynamically without inheritance |
| Repository | Abstracting data access from business logic |
| Adapter | Making incompatible interfaces work together |
| Facade | Simplifying complex subsystems |
| Command | Undo/redo, task queuing, macro recording |
© tmcfarlane, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/design-patterns-implementation of tmcfarlane/oh-my-cursor.
Open the folder on GitHubat commit 5bad458
Design Patterns Implementation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Design Patterns Implementation this skilltmcfarlane/oh-my-cursor | 109 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Swiftui View RefactorDimillian/Skills | 4k | 5 repos | ~2k | Automated safety check: Pass | MIT | |
| RTK Rust Design Patternsrtk-ai/rtk | 83k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Effect Client WrapperUsefulSoftwareCo/executor | 4.1k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Architecture PatternsKartikLabhshetwar/better-shot | 2.4k | 2 repos | ~1.4k | Automated safety check: Pass | Custom licence | |
| GitVersion .NET DevelopmentGitTools/GitVersion | 3.1k | — | ~1.7k | Automated safety check: Pass | MIT |
Dimillian/Skills
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.
rtk-ai/rtk
Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.
UsefulSoftwareCo/executor
Pattern for wrapping third-party SDK clients (Stripe, Resend, AWS, etc.) with Effect.
KartikLabhshetwar/better-shot
Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.
GitTools/GitVersion
Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.
prisma/orm
Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.
tmcfarlane/oh-my-cursor
Write documentation following Metabase's conversational, clear, and user-focused style.
tmcfarlane/oh-my-cursor
Systematic 4-phase debugging with root cause investigation. An agent skill from tmcfarlane/oh-my-cursor.
tmcfarlane/oh-my-cursor
Technical documentation expert for creating clear, comprehensive documentation.
tmcfarlane/oh-my-cursor
Technical implementation planning and architecture design. An agent skill from tmcfarlane/oh-my-cursor.
tmcfarlane/oh-my-cursor
Search and navigate large codebases efficiently. An agent skill from tmcfarlane/oh-my-cursor.
tmcfarlane/oh-my-cursor
Generate and iterate images in Cursor using the built-in image model and strong prompts.
Categories
Apply appropriate design patterns (Singleton, Factory, Observer, Strategy, etc.) to solve architectural problems. Design Patterns Implementation is an agent skill from tmcfarlane/oh-my-cursor.) to solve architectural problems.
Design Patterns Implementation fits situations like: refactoring code architecture; implementing extensible systems; following SOLID principles.
Run `npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a claude-code`. Or copy the skill folder (skills/design-patterns-implementation in tmcfarlane/oh-my-cursor) into .claude/skills/design-patterns-implementation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a codex`. Or copy the skill folder (skills/design-patterns-implementation in tmcfarlane/oh-my-cursor) into .agents/skills/design-patterns-implementation in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tmcfarlane/oh-my-cursor --skill design-patterns-implementation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design-patterns-implementation, .gemini/skills/design-patterns-implementation, .github/skills/design-patterns-implementation and .opencode/skills/design-patterns-implementation in your project.
SKILL.md names no scripts, command-line tools or credentials: Design Patterns Implementation is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Design Patterns Implementation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Design Patterns Implementation: Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars), Effect Client Wrapper (UsefulSoftwareCo/executor, 4.1k stars) and Architecture Patterns (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
tmcfarlane (a GitHub user) maintains it in tmcfarlane/oh-my-cursor, which has 109 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on July 2, 2026.
Source: tmcfarlane/oh-my-cursor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.