design
Skill8 starsChanged 10 months agoApache-2.0View on GitHub
Pick the right in-process code pattern for a refactoring or extensibility need (GoF creational/structural/behavioral), and access implementation guides for specific patterns. Use as a decision workflow when unsure which pattern family fits, or go directly to pattern references when you already know. NOT for multi-service/distributed architecture (use architecture).
119 other projects use a version of this.
Adopted by
Most recently taken up by
- nextlevelbuilder/ui-ux-pro-max-skilltheir own version, first seen Nov 18, 2026
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- Boxline-dev/examplestheir own version, first seen Oct 5, 2026
- ofweb/skillstheir own version, first seen Oct 5, 2026
- jesse-merhi/skillstheir own version, first seen Oct 4, 2026
- stage2dev/power-platform-skillstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use banner-design, ui-styling and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lithStudySkillbanner-design
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.
Also in 15 projects that use this
MicrosoftSkillui-styling
Guide for the visual style, structure, and shared building blocks used by Semantic Link Labs interactive UI tools (HTML widgets and anywidget-based widgets). Use this when adding a new interactive UI, modifying an existing one, or adding shared visual components.
Also in 14 projects that use this
uac-opsSkilloperate
Run the live machine — set a north-star metric, build dashboards, automate routines, and run the continuous growth loop. Use when COMPANY.md Stage is operate, or the user says "metrics", "dashboard", "automate", "north star", "run the business", or "what now that I'm live".
Also in 3 projects that use this
lithStudySkillbrand
Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.
Also in 16 projects that use this
JetBrainsSkillslides
Create and edit presentation slide decks (`.pptx`) with PptxGenJS and render/validation utilities. Use when tasks involve building a new PowerPoint deck, recreating slides from screenshots/PDFs/reference decks, modifying slide content while preserving editable output, adding charts/diagrams/visuals, or diagnosing layout issues such as overflow, overlaps, and font substitution.
Also in 16 projects that use this
MicrosoftSkillperf
Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-router.
Also in 5 projects that use this
Other versions119 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 119
- nextlevelbuilder/ui-ux-pro-max-skill★ 156ksame name
- Infisical/agent-vault★ 2.3ksame name
- SethGammon/Citadel★ 922same name
- rshankras/claude-code-apple-skills★ 777same name
- vladikk/modularity★ 549same name
- owainlewis/blueprint★ 410same name
- Adityaraj0421/naksha-studio★ 320same name
- ohad6k/emulo★ 293same name
- ninehills/skills★ 280same name
- genkovich/sdd★ 170same name
109 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectureSkill
- archobsSkill
- debugSkill
- finishSkill
- forecastSkill
- intelSkill
- observabilitySkill
- planSkill
- platformSkill
- resilienceSkill
- reviewSkill
- securitySkill
- specSkill
- testingSkill
- typescriptSkill
- workflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 12 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
If the main pressure is *system-level* (multiple services/processes, partial failures, retries/idempotency, sagas, event-driven …
- Very specific: line 17
If you’re standardizing cross-cutting boundary behavior across multiple services, consider extracting the primitive into a shared package …
- Very specific: line 49
If probe output already exists from an earlier Define-stage skill in this flow (including workflow orchestration), refine it instead of …
- Distinctive: line 55
When context or time is constrained, these are the load-bearing steps:
- Very specific: line 71
Do we need cancellation/backpressure/timeouts (AbortSignal) or long-running “agents”?
- Distinctive: line 72
Do we need undo/redo, queuing, retries, caching, auth, logging, or other cross-cutting concerns?
- Distinctive: line 89
Composite: treat individual objects and object trees uniformly.
- Distinctive: line 90
Decorator: add optional behavior by wrapping (stackable features).
- Distinctive: line 106
Visitor: add new operations over a stable object structure without changing the element classes.
- Distinctive: line 119
Prefer simpler refactors first: extract functions, introduce interfaces, compose objects, use DI.
- Distinctive: line 120
Avoid patterns that force inheritance when composition would do (especially Template Method/Singleton).
- Distinctive: line 122
Keep “pattern seams” small: a tiny interface plus focused implementations.
- Distinctive: line 124
If the change axis is unclear, prototype with a simple interface + two implementations before formalizing.
- Very specific: line 136
If the pressure is cross-service/system-level: architecture
- Very specific: line 137
If the seam should be shared across services: platform
- Very specific: line 138
If you're in TypeScript and hitting systemic constraints (boundaries/lifetimes/errors): typescript
- Distinctive: line 143
When you need implementation details for a specific pattern:
- Distinctive: line 162
When recommending a pattern, return:
- Distinctive: line 167
If implementing: small skeleton + one example call site.
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Design (Choose Code Pattern)
Overview
Pick the simplest design that fits, then map it to a code pattern only if it buys you clear leverage (change isolation, testability, reuse, or performance).
In TypeScript systems, also watch for “complications” that patterns can accidentally amplify (hidden lifetimes, implicit throw, unchecked boundary data, cyclic deps). Prefer patterns that keep boundaries and ownership explicit.
If the main pressure is system-level (multiple services/processes, partial failures, retries/idempotency, sagas, event-driven architecture, domain boundaries), use architecture first; then come back here to pick any code patterns needed for the in-process implementation.
If you’re standardizing cross-cutting boundary behavior across multiple services, consider extracting the primitive into a shared package (see platform) so the pattern becomes a consistent “golden path” instead of copy/paste.
Monolith edge case: In a monolith, use design to isolate modules within the process (Facade for subsystem boundaries, Adapter for third-party libs, Strategy for swappable implementations). If the goal is decomposing the monolith into separate deployable units or defining service boundaries, start with architecture — then return here for the in-process patterns each new service needs.
Inputs / Outputs
Inputs: Archobs JSON — file coupling (xnbr, hubness), cluster leakage (required); architecture output (if exists); forecast lifecycle data (if wrapping external dep).
Outputs: Pattern selection with rationale, implementation sketch, trade-offs. Consumed by testing (test strategy), finish (verification).
Workflow
- Load archobs data (required): Run
archobs show risks --format jsonandarchobs show clusters --format jsonto get risk scores and coupling signals for the files under consideration. Usexnbrto identify files bridging multiple concerns,hubnessto find fan-in bottlenecks, and clusterleakageto see where boundaries are porous. This data helps narrow the pattern choice — e.g., high xnbr suggests Facade or Strategy; high hubness suggests Mediator. If the artifacts do not exist, runarchobs report --repo <path> --out .archobs --suggestions-provider rulesand wait for it to complete before continuing. - Decide whether the context is scriptic vs systemic (short-lived script vs long-lived system). Set policies for boundary validation, error semantics, and ownership/lifetimes.
Restate the problem as: what varies and what must stay stable (API, data model, timing, performance). 2b. Pattern Longevity Check (conditional — run when the selected pattern wraps or isolates an external dependency):
intel forecast # lifecycle phase for the wrapped dependencyDecision mapping: See Lifecycle Decision Mapping — Design: Pattern Longevity for lifecycle phase → pattern adjustment tables and compound signal (archobs x forecast) implications.
- Identify the main pressure:
- Creation pressure: hard-to-test construction, many variants, environment-specific families.
- Structure pressure: wrapping/combining objects, incompatible interfaces, indirection, memory sharing.
- Behavior pressure: pluggable algorithms, eventing, pipelines, undo, state-dependent behavior.
- Pick 1 primary pattern (avoid "pattern soup"). Add a 2nd only if it addresses a different pressure.
- Stress-test the decision (if 2+ viable approaches exist; skip for single viable approach):
- Assumptions: What are facts vs assumptions? Which assumption is least certain — how will we validate it? Cross-reference with pattern longevity check from step 2b (if applicable). (include in output trade-offs)
- Second-Order Effects: What happens next week / next quarter / next year? What new coupling or failure mode does this create? If this pattern choice fails in 6-12 months, what likely caused failure? Cross-reference with pattern longevity check from step 2b (if applicable). (include in output trade-offs)
- Opportunity Cost: What are we saying "no" to with this pattern choice? Are we favoring this due to sunk cost, familiarity, or novelty? (include in output trade-offs)
- If probe output already exists from an earlier Define-stage skill in this flow (including
workfloworchestration), refine it instead of re-running.
- Validate with 2 examples: a "happy path" and a likely future change.
- Confirm the choice reduces coupling and increases testability (or has a clear perf win).
Minimum viable execution
When context or time is constrained, these are the load-bearing steps:
- Load archobs data (step 0) — xnbr and hubness guide pattern choice.
- Identify the main pressure (step 3) — creation, structure, or behavior.
- Pick 1 primary pattern (step 4) — avoid pattern soup.
- Validate with 2 examples (step 6) — happy path and a likely future change.
Steps that can be cut under pressure: pattern longevity check (step 2b), stress-test probes (step 5), scriptic/systemic policy decision (step 1).
Clarifying Questions
- Is this scriptic (one-off) or systemic (long-lived)? Who owns startup/shutdown?
- What is the stable API/contract we must preserve?
- What changes most often: implementations, algorithms, steps, object graphs, external systems?
- Are we at an IO boundary (HTTP/DB/fs/events/env)? What is
unknownand how will it be decoded? - What are the expected failures vs truly unknown failures? Should errors be signified (
Result/tagged unions)? - Do we need cancellation/backpressure/timeouts (
AbortSignal) or long-running “agents”? - Do we need undo/redo, queuing, retries, caching, auth, logging, or other cross-cutting concerns?
- Are there many similar objects (memory pressure) or many collaborators (dependency explosion)?
Pattern Chooser (Cheat Sheet)
Creational
- Factory Method: callers want an interface; subclasses/modules choose which concrete product to create.
- Abstract Factory: pick an “environment” (e.g., OS/vendor) and create a compatible family of products.
- Builder: object has many optional parts or multiple representations; construction must be stepwise/validated.
- Prototype: cloning is cheaper/cleaner than constructing; you must define copy semantics explicitly.
- Singleton (use sparingly): exactly one instance is required; prefer DI/container-managed lifetimes instead.
Structural
- Adapter: translate one interface to another to integrate a legacy/third-party API.
- Bridge: split abstraction from implementation so each can vary independently (two axes of change).
- Composite: treat individual objects and object trees uniformly.
- Decorator: add optional behavior by wrapping (stackable features).
- Facade: hide a complex subsystem behind a small, stable API.
- Flyweight: lots of similar objects; separate intrinsic vs extrinsic state to reduce memory.
- Proxy: stand-in that controls access (lazy load, cache, auth, remote boundary, rate limit).
Behavioral
- Chain of Responsibility: request flows through a configurable pipeline of handlers.
- Command: represent an action/request as an object (queue, schedule, undo).
- Iterator: traverse a structure without exposing representation; support multiple traversal strategies.
- Mediator: reduce many-to-many coupling; centralize coordination rules.
- Memento: snapshot/restore state (undo/redo) without exposing internals.
- Observer: publish/subscribe updates; multiple listeners react to events.
- State: behavior changes as state changes; states own transitions/behaviors.
- Strategy: swap algorithms behind a stable interface; choose at runtime/config.
- Template Method: stable algorithm skeleton with overridable steps (often via hooks; use inheritance only when it already fits).
- Visitor: add new operations over a stable object structure without changing the element classes.
Common Confusions
- Decorator vs Proxy vs Adapter vs Facade:
- Decorator adds behavior; Proxy controls access; Adapter converts interface; Facade simplifies a subsystem.
- Strategy vs State vs Template Method:
- Strategy chooses an algorithm; State changes behavior based on internal state; Template Method fixes skeleton + overrides steps.
- Factory Method vs Abstract Factory vs Builder:
- Factory Method picks a product; Abstract Factory picks a compatible family; Builder controls stepwise construction.
Guardrails
- Prefer simpler refactors first: extract functions, introduce interfaces, compose objects, use DI.
- Avoid patterns that force inheritance when composition would do (especially Template Method/Singleton).
- Remember Template Method can be implemented without inheritance in TS (template function + step hooks); don’t default to base classes.
- Keep “pattern seams” small: a tiny interface plus focused implementations.
- In systemic code, avoid top-level side effects; wire dependencies in a composition root and keep lifetimes explicit.
- If the change axis is unclear, prototype with a simple interface + two implementations before formalizing.
Common failure modes
- Applies patterns prematurely — one use case is not enough to justify a pattern. Wait for the second concrete case before formalizing.
- Picks complex patterns when simple composition works — a Factory with one product, a Strategy with one algorithm. Start with the simplest refactor (extract function, introduce interface).
- Confuses code patterns with system patterns — Saga, CQRS, Event Sourcing are system-level (
architecture), not in-process (design). - Ignores archobs coupling data — picks patterns based on intuition instead of measured xnbr (bridging files → Facade) or hubness (fan-in → Mediator).
References
- Empirical coupling data to inform pattern choice:
archobs - If the pressure is cross-service/system-level:
architecture - If the seam should be shared across services:
platform - If you're in TypeScript and hitting systemic constraints (boundaries/lifetimes/errors):
typescript - Structured-thinking probes + templates:
../references/(checklists for inline probes, templates for escalation)
Pattern Implementation Guides
When you need implementation details for a specific pattern:
- Creational patterns (Factory Method, Abstract Factory, Builder, Prototype, Singleton):
references/patterns-creational.md - Structural patterns (Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy):
references/patterns-structural.md - Behavioral patterns (Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor):
references/patterns-behavioral.md
Individual Pattern References
- Creational:
references/creational/(factory-method, abstract-factory, builder, prototype, singleton) - Structural:
references/structural/(adapter, bridge, composite, decorator, facade, flyweight, proxy) - Behavioral:
references/behavioral/(chain-of-responsibility, command, iterator, mediator, memento, observer, state, strategy, template-method, visitor)
Snippets
- TypeScript:
references/snippets/typescript.md - React:
references/snippets/react.md
Output Template
When recommending a pattern, return:
- 1–2 sentences: pattern + why it fits this problem (what changes, what stays stable).
- Trade-offs and 1 alternative ("no pattern" option included), with assumptions (facts vs assumptions) and opportunity costs if probes were run.
- A minimal implementation plan (roles/interfaces, wiring point, tests).
- If implementing: small skeleton + one example call site.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

