dev-patterns

Applies architecture patterns and coding conventions to Shopify Remix app development.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/dan10002ht/shopify-template --skill dev-patterns-dan10002ht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-patterns
Source: https://github.com/dan10002ht/shopify-template/tree/main/.claude/skills/dev-patterns
Command: npx skills add https://github.com/dan10002ht/shopify-template --skill dev-patterns-dan10002ht

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working on Shopify Remix apps often struggle with inconsistent file organization, unclear layer boundaries, and ad-hoc component structure, leading to tangled codebases that are hard to maintain and scale. ## Core Features & Use Cases - Layered Architecture Guidance: Enforces the Repository → Service → Route dependency direction with concrete TypeScript examples for models, services, and Remix loaders/actions. - Atomic Design System: Defines rules for organizing Polaris components into atoms, molecules, organisms, templates, and pages, including import rules and promotion criteria. - Coding Conventions: Standardizes naming, file colocation, DRY rules, error handling with AppError, import ordering, TypeScript type guards, and immutability patterns. - SDLC Workflow: Maps a six-phase development lifecycle (Plan → Design → Build → Test → Deploy → Maintain) to slash commands and deliverables. - Use Case: When creating a new feature, consult this Skill to decide whether code belongs in a model, service, or route, and where new UI components fit in the Atomic Design hierarchy. ## Quick Start Ask the AI to review where a new business logic function should be placed in the app layer structure and which component level a new UI element belongs to.

Frequently Asked Questions about dev-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Shopify Remix app with layered architecture?

Organize code into Routes, Services, Models, and Database layers with strict one-way dependencies: Routes import Services, Services import Models, Models use Prisma. Routes handle auth and validation only, Services contain business rules and side effects, and Models perform CRUD operations.

What is Atomic Design for React components?

Atomic Design organizes components into five levels: atoms (smallest UI elements like badges), molecules (combinations of atoms), organisms (complex sections with internal state), templates (page layouts), and pages (routes with data fetching). Lower levels never import from higher levels.

When should I add a service layer in a Remix app?

Add a service layer when a route action requires two or more model calls, contains business rules, or triggers side effects like queue jobs or notifications. A single model call in a loader can skip the service layer entirely.

Does Atomic Design apply to Shopify storefront extensions?

No, storefront theme app extensions use a flat component structure instead of Atomic Design. The bundle size constraint under 15KB makes abstraction layers impractical, so each storefront component is self-contained.

When should duplicated code be extracted into a shared function?

Follow the rule of three: one copy is fine, two copies warrant consideration, and three copies require extraction. However, do not extract code that merely looks similar but serves different purposes, and never duplicate business rules or validation schemas.