@teckedd-code2save/b2dp 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,242 @@
1
+ # Performance Antipatterns
2
+
3
+ Ten common performance antipatterns in cloud applications and how to resolve them.
4
+
5
+ ---
6
+
7
+ ## 1. Busy Database
8
+
9
+ **Description:** Offloading too much processing to a data store. Using stored procedures for formatting, string manipulation, or complex calculations that belong in the application tier.
10
+
11
+ **Why it happens:**
12
+ - Database viewed as a service rather than a repository
13
+ - Developers write queries that format data for direct display
14
+ - Attempts to correct Extraneous Fetching by pushing compute to the database
15
+
16
+ **Symptoms:**
17
+ - Disproportionate decline in throughput and response times for database operations
18
+
19
+ **How to detect:**
20
+ - Performance monitoring of database activity
21
+ - Examine work performed during slow periods
22
+
23
+ **How to fix:**
24
+ - Move processing (formatting, string manipulation, calculations) to application tiers
25
+ - Limit the database to data access operations (aggregation is acceptable)
26
+ - Don't move processing out if it causes the database to transfer far more data (Extraneous Fetching)
27
+
28
+ **Example scenario:** A SQL query performs XML formatting, string concatenation, and locale-specific formatting in T-SQL instead of returning raw data and letting application code handle presentation.
29
+
30
+ ---
31
+
32
+ ## 2. Busy Front End
33
+
34
+ **Description:** Moving resource-intensive tasks onto foreground/UI threads instead of background threads.
35
+
36
+ **Why it happens:**
37
+ - Processing done synchronously in request handlers
38
+
39
+ **Symptoms:**
40
+ - High latency on requests
41
+ - Poor user responsiveness
42
+
43
+ **How to detect:**
44
+ - Monitor thread utilization and CPU usage on the front-end tier
45
+
46
+ **How to fix:**
47
+ - Move resource-intensive tasks to background threads or services (Azure Functions, WebJobs)
48
+
49
+ **Example scenario:** A web API controller performs image resizing synchronously within the HTTP request pipeline, blocking the thread and causing timeouts for other users during peak load.
50
+
51
+ ---
52
+
53
+ ## 3. Chatty I/O
54
+
55
+ **Description:** Continually sending many small network requests instead of fewer larger ones.
56
+
57
+ **Why it happens:**
58
+ - Following object-oriented patterns that make many small calls
59
+ - Individual property gets instead of batch reads
60
+
61
+ **Symptoms:**
62
+ - High number of I/O operations
63
+ - High latency due to network round trips
64
+
65
+ **How to detect:**
66
+ - Monitor the number of I/O requests and their sizes
67
+
68
+ **How to fix:**
69
+ - Bundle multiple smaller requests into fewer larger ones
70
+ - Use caching to avoid repeated calls
71
+ - Read data in bulk
72
+
73
+ **Example scenario:** An application retrieves a user profile by making separate API calls for name, email, address, and preferences instead of a single call that returns the complete profile object.
74
+
75
+ ---
76
+
77
+ ## 4. Extraneous Fetching
78
+
79
+ **Description:** Retrieving more data than needed, resulting in unnecessary I/O and memory consumption.
80
+
81
+ **Why it happens:**
82
+ - `SELECT *` queries
83
+ - Fetching all columns or rows when only a subset is needed
84
+
85
+ **Symptoms:**
86
+ - High memory usage
87
+ - Excessive bandwidth consumption
88
+
89
+ **How to detect:**
90
+ - Profile queries and check data transfer sizes
91
+
92
+ **How to fix:**
93
+ - Request only needed data columns and rows
94
+ - Use pagination and projections
95
+
96
+ **Example scenario:** An order history page runs `SELECT * FROM Orders` and filters in application code, transferring millions of rows when the user only sees the 20 most recent orders.
97
+
98
+ ---
99
+
100
+ ## 5. Improper Instantiation
101
+
102
+ **Description:** Repeatedly creating and destroying objects designed to be shared and reused, such as `HttpClient`, database connections, or service clients.
103
+
104
+ **Why it happens:**
105
+ - Not understanding object lifecycle
106
+ - Creating new instances per request
107
+
108
+ **Symptoms:**
109
+ - Port exhaustion
110
+ - Socket exhaustion
111
+ - Connection pool depletion
112
+
113
+ **How to detect:**
114
+ - Monitor connection counts, socket usage, and object creation rates
115
+
116
+ **How to fix:**
117
+ - Use singleton or static instances for shared clients
118
+ - Use connection pooling
119
+ - Use `IHttpClientFactory` for HTTP clients
120
+
121
+ **Example scenario:** A web application creates a new `HttpClient` instance for every incoming request. Under load, available sockets are exhausted and requests fail with `SocketException` errors.
122
+
123
+ ---
124
+
125
+ ## 6. Monolithic Persistence
126
+
127
+ **Description:** Using one data store for data with very different usage patterns.
128
+
129
+ **Why it happens:**
130
+ - Simplicity of a single database
131
+ - Legacy design decisions
132
+
133
+ **Symptoms:**
134
+ - Performance degradation as different workloads compete for the same resources
135
+
136
+ **How to detect:**
137
+ - Monitor data store metrics and identify competing access patterns
138
+
139
+ **How to fix:**
140
+ - Separate data by usage pattern into appropriate stores (hot/warm/cold)
141
+ - Apply polyglot persistence — use the right store for each data type
142
+
143
+ **Example scenario:** A single SQL database handles both high-throughput transactional writes and complex analytical reporting queries, causing lock contention that degrades both workloads.
144
+
145
+ ---
146
+
147
+ ## 7. No Caching
148
+
149
+ **Description:** Failing to cache frequently accessed data that changes infrequently.
150
+
151
+ **Why it happens:**
152
+ - Not considering a caching strategy
153
+ - Assuming the database can handle all read traffic
154
+
155
+ **Symptoms:**
156
+ - Repeated identical queries
157
+ - High database load
158
+ - Slow response times
159
+
160
+ **How to detect:**
161
+ - Monitor cache hit ratios and look for repeated identical queries
162
+
163
+ **How to fix:**
164
+ - Implement the Cache-Aside pattern
165
+ - Use Azure Cache for Redis
166
+ - Set appropriate TTLs based on data volatility
167
+
168
+ **Example scenario:** A product catalog page queries the database on every page load for data that only changes once a day, generating thousands of identical queries per hour.
169
+
170
+ ---
171
+
172
+ ## 8. Noisy Neighbor
173
+
174
+ **Description:** A single tenant consumes a disproportionate amount of shared resources, starving other tenants.
175
+
176
+ **Why it happens:**
177
+ - Multi-tenant systems without resource isolation or throttling
178
+
179
+ **Symptoms:**
180
+ - Other tenants experience degraded performance
181
+ - Resource starvation for well-behaved tenants
182
+
183
+ **How to detect:**
184
+ - Monitor per-tenant resource usage and identify outliers
185
+
186
+ **How to fix:**
187
+ - Implement tenant isolation, throttling, and quotas
188
+ - Use the Bulkhead pattern to partition resources
189
+ - Separate compute per tenant if needed
190
+
191
+ **Example scenario:** In a shared SaaS platform, one tenant runs a bulk data import that saturates the database connection pool, causing timeout errors for all other tenants.
192
+
193
+ ---
194
+
195
+ ## 9. Retry Storm
196
+
197
+ **Description:** Retrying failed requests too aggressively, amplifying failures during outages.
198
+
199
+ **Why it happens:**
200
+ - Aggressive retry policies without backoff
201
+ - All clients retry simultaneously (thundering herd)
202
+
203
+ **Symptoms:**
204
+ - Cascading failures
205
+ - Overwhelming services that are trying to recover
206
+
207
+ **How to detect:**
208
+ - Monitor retry rates and correlate with service recovery time
209
+
210
+ **How to fix:**
211
+ - Use exponential backoff with jitter
212
+ - Implement the Circuit Breaker pattern
213
+ - Cap retry attempts
214
+
215
+ **Example scenario:** A downstream service goes offline for 30 seconds. Hundreds of clients immediately retry every 100ms with no backoff, generating 10x normal traffic and preventing the service from recovering for several minutes.
216
+
217
+ ---
218
+
219
+ ## 10. Synchronous I/O
220
+
221
+ **Description:** Blocking the calling thread while I/O completes.
222
+
223
+ **Why it happens:**
224
+ - Using synchronous APIs for network or disk operations
225
+
226
+ **Symptoms:**
227
+ - Thread pool exhaustion
228
+ - Poor scalability under load
229
+ - UI freezing in client applications
230
+
231
+ **How to detect:**
232
+ - Monitor thread pool usage and identify blocking calls
233
+
234
+ **How to fix:**
235
+ - Use `async`/`await` patterns
236
+ - Use non-blocking I/O and async APIs
237
+
238
+ **Example scenario:** A web API makes synchronous HTTP calls to three downstream services sequentially. Under load, all thread pool threads are blocked waiting for responses, and the server can no longer accept new requests.
239
+
240
+ ---
241
+
242
+ > Source: [Azure Architecture Center](https://learn.microsoft.com/en-us/azure/architecture/)
@@ -0,0 +1,159 @@
1
+ # Azure Technology Choice Decision Frameworks
2
+
3
+ Decision frameworks for selecting the right Azure service in each category. Use these tables to compare options based on scale, cost, complexity, and use case fit.
4
+
5
+ ## Decision Approach
6
+
7
+ 1. **Start with requirements** — workload type, scale needs, team expertise
8
+ 2. **Use the comparison tables** — narrow to 2-3 candidates
9
+ 3. **Follow the decision trees** — Azure Architecture Center provides flowcharts for compute, data store, load balancing, and messaging
10
+ 4. **Validate with constraints** — budget, compliance, regional availability, existing infrastructure
11
+
12
+ ---
13
+
14
+ ## 1. Compute
15
+
16
+ Choose a compute service based on control needs, scaling model, and operational complexity.
17
+
18
+ | Service | Best For | Scale | Complexity | Cost Model |
19
+ |---|---|---|---|---|
20
+ | Azure VMs | Full control, lift-and-shift, custom OS | Manual/VMSS | High | Per-hour |
21
+ | App Service | Web apps, APIs, mobile backends | Built-in autoscale | Low | Per App Service plan |
22
+ | Azure Functions | Event-driven, short-lived processes | Consumption-based auto | Very Low | Per execution |
23
+ | AKS | Microservices, complex orchestration | Node/pod autoscaling | High | Per node VM |
24
+ | Container Apps | Serverless containers, microservices | KEDA-based autoscale | Medium | Per vCPU/memory/s |
25
+ | Container Instances | Simple containers, batch jobs | Per-instance | Very Low | Per second |
26
+
27
+ **Quick decision:**
28
+ - Need full OS control? → **VMs**
29
+ - Web app or API with minimal ops? → **App Service**
30
+ - Short-lived event-driven code? → **Functions**
31
+ - Complex microservices with K8s expertise? → **AKS**
32
+ - Microservices without K8s management? → **Container Apps**
33
+ - Run a container quickly, no orchestration? → **Container Instances**
34
+
35
+ ---
36
+
37
+ ## 2. Storage
38
+
39
+ Choose a storage service based on data structure, access patterns, and scale.
40
+
41
+ | Service | Best For | Access Pattern | Scale | Cost |
42
+ |---|---|---|---|---|
43
+ | Blob Storage | Unstructured data, media, backups | REST API, SDK | Massive | Per GB + operations |
44
+ | Azure Files | SMB/NFS file shares, lift-and-shift | File system mount | TB-scale | Per GB provisioned |
45
+ | Queue Storage | Simple message queuing | Pull-based | High throughput | Very low per message |
46
+ | Table Storage | NoSQL key-value data | REST API | TB-scale | Per GB + operations |
47
+ | Data Lake Storage | Big data analytics, hierarchical namespace | ABFS, REST | Massive | Per GB, tiered |
48
+
49
+ **Quick decision:**
50
+ - Blobs, images, videos, backups? → **Blob Storage**
51
+ - Need a mounted file share (SMB/NFS)? → **Azure Files**
52
+ - Simple async message queue? → **Queue Storage**
53
+ - Key-value NoSQL without Cosmos DB cost? → **Table Storage**
54
+ - Big data analytics with hierarchical namespace? → **Data Lake Storage**
55
+
56
+ ---
57
+
58
+ ## 3. Database
59
+
60
+ Choose a database based on data model, consistency needs, and scale requirements.
61
+
62
+ | Service | Best For | Consistency | Scale | Cost Model |
63
+ |---|---|---|---|---|
64
+ | Azure SQL | Relational, OLTP, enterprise apps | Strong (ACID) | Up to Hyperscale | DTU or vCore-based |
65
+ | Cosmos DB | Global distribution, multi-model, low latency | Tunable (5 levels) | Unlimited horizontal | RU/s + storage |
66
+ | Azure Database for PostgreSQL | Open-source relational, PostGIS, JSON | Strong (ACID) | Flexible Server auto | vCore-based |
67
+ | Azure Database for MySQL | Open-source relational, web apps | Strong (ACID) | Flexible Server auto | vCore-based |
68
+
69
+ **Quick decision:**
70
+ - Enterprise SQL Server workloads? → **Azure SQL**
71
+ - Global distribution or single-digit-ms latency? → **Cosmos DB**
72
+ - Open-source relational with spatial/JSON? → **PostgreSQL**
73
+ - Open-source relational for web apps? → **MySQL**
74
+
75
+ ---
76
+
77
+ ## 4. Messaging
78
+
79
+ Choose a messaging service based on delivery guarantees, throughput, and integration pattern.
80
+
81
+ | Service | Best For | Delivery | Throughput | Cost |
82
+ |---|---|---|---|---|
83
+ | Service Bus | Enterprise messaging, ordered delivery, transactions | At-least-once, at-most-once | Moderate-high | Per operation + unit |
84
+ | Event Hubs | Event streaming, telemetry, big data ingestion | At-least-once, partitioned | Very high (millions/s) | Per TU/PU + ingress |
85
+ | Event Grid | Event-driven reactive programming, webhooks | At-least-once | High | Per operation |
86
+ | Queue Storage | Simple async messaging, decoupling | At-least-once | Moderate | Very low per message |
87
+
88
+ **Quick decision:**
89
+ - Enterprise messaging with ordering/transactions? → **Service Bus**
90
+ - High-volume event streaming or telemetry? → **Event Hubs**
91
+ - Reactive event routing (resource events, webhooks)? → **Event Grid**
92
+ - Simple, cheap async decoupling? → **Queue Storage**
93
+
94
+ ---
95
+
96
+ ## 5. Networking
97
+
98
+ Choose a load balancing service based on traffic scope, protocol layer, and feature needs.
99
+
100
+ | Service | Best For | Scope | Layer | Features |
101
+ |---|---|---|---|---|
102
+ | Azure Front Door | Global HTTP(S) load balancing, CDN, WAF | Global | Layer 7 | CDN, WAF, SSL offload, caching |
103
+ | Application Gateway | Regional HTTP(S) load balancing, WAF | Regional | Layer 7 | WAF, URL routing, SSL termination |
104
+ | Azure Load Balancer | TCP/UDP traffic distribution | Regional | Layer 4 | High perf, zone redundant |
105
+ | Traffic Manager | DNS-based global traffic routing | Global | DNS | Failover, performance, geographic routing |
106
+
107
+ **Quick decision:**
108
+ - Global HTTP(S) with CDN and WAF? → **Front Door**
109
+ - Regional HTTP(S) with WAF? → **Application Gateway**
110
+ - Regional TCP/UDP load balancing? → **Load Balancer**
111
+ - DNS-based global failover? → **Traffic Manager**
112
+
113
+ ---
114
+
115
+ ## 6. AI Services
116
+
117
+ Choose an AI service based on customization needs and model type.
118
+
119
+ | Service | Best For | Complexity | Scale |
120
+ |---|---|---|---|
121
+ | Azure OpenAI | LLMs, GPT models, generative AI | Medium | API-based, token pricing |
122
+ | Azure AI Services | Pre-built AI (vision, speech, language) | Low | API-based, per transaction |
123
+ | Azure Machine Learning | Custom ML models, MLOps, training | High | Compute cluster-based |
124
+
125
+ **Quick decision:**
126
+ - Need GPT/LLM capabilities? → **Azure OpenAI**
127
+ - Pre-built vision, speech, or language? → **AI Services**
128
+ - Custom model training and MLOps? → **Azure Machine Learning**
129
+
130
+ ---
131
+
132
+ ## 7. Containers
133
+
134
+ Choose a container service based on orchestration needs and operational complexity.
135
+
136
+ | Service | Best For | Orchestration | Complexity | Cost |
137
+ |---|---|---|---|---|
138
+ | AKS | Full Kubernetes, complex workloads | Full K8s control plane | High | Per node VM |
139
+ | Container Apps | Serverless containers, microservices, event-driven | Managed (built on K8s) | Medium | Per vCPU/memory/s |
140
+ | Container Instances | Simple containers, sidecar groups, batch | None (per-instance) | Very Low | Per second |
141
+
142
+ **Quick decision:**
143
+ - Need full Kubernetes API and control? → **AKS**
144
+ - Serverless containers with event-driven scaling? → **Container Apps**
145
+ - Run a single container or batch job quickly? → **Container Instances**
146
+
147
+ ---
148
+
149
+ ## Related Decision Trees
150
+
151
+ The Azure Architecture Center provides detailed flowcharts for these decisions:
152
+
153
+ - [Choose a compute service](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree)
154
+ - [Compare Container Apps with other options](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree#compare-container-options)
155
+ - [Choose a data store](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/data-store-overview)
156
+ - [Load balancing decision tree](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/load-balancing-overview)
157
+ - [Compare messaging services](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/messaging)
158
+
159
+ > Source: [Azure Architecture Center](https://learn.microsoft.com/en-us/azure/architecture/)
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: context7-mcp
3
+ description: This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.
4
+ ---
5
+
6
+ When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
7
+
8
+ ## When to Use This Skill
9
+
10
+ Activate this skill when the user:
11
+
12
+ - Asks setup or configuration questions ("How do I configure Next.js middleware?")
13
+ - Requests code involving libraries ("Write a Prisma query for...")
14
+ - Needs API references ("What are the Supabase auth methods?")
15
+ - Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
16
+
17
+ ## How to Fetch Documentation
18
+
19
+ ### Step 1: Resolve the Library ID
20
+
21
+ Call `resolve-library-id` with:
22
+
23
+ - `libraryName`: The library name extracted from the user's question
24
+ - `query`: The user's full question (improves relevance ranking)
25
+
26
+ ### Step 2: Select the Best Match
27
+
28
+ From the resolution results, choose based on:
29
+
30
+ - Exact or closest name match to what the user asked for
31
+ - Higher benchmark scores indicate better documentation quality
32
+ - If the user mentioned a version (e.g., "React 19"), prefer version-specific IDs
33
+
34
+ ### Step 3: Fetch the Documentation
35
+
36
+ Call `query-docs` with:
37
+
38
+ - `libraryId`: The selected Context7 library ID (e.g., `/vercel/next.js`)
39
+ - `query`: The user's specific question
40
+
41
+ ### Step 4: Use the Documentation
42
+
43
+ Incorporate the fetched documentation into your response:
44
+
45
+ - Answer the user's question using current, accurate information
46
+ - Include relevant code examples from the docs
47
+ - Cite the library version when relevant
48
+
49
+ ## Guidelines
50
+
51
+ - **Be specific**: Pass the user's full question as the query for better results
52
+ - **Version awareness**: When users mention versions ("Next.js 15", "React 19"), use version-specific library IDs if available from the resolution step
53
+ - **Prefer official sources**: When multiple matches exist, prefer official/primary packages over community forks
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: frontend-data-consumer
3
+ description: Ingests backend API contracts and scaffolds high-quality, typed React/Vue components (Data Tables, Detail Cards, Forms) using a specific design system (like Tailwind or Shadcn/UI). Use when a user wants to build a UI for their backend API or data platform.
4
+ ---
5
+
6
+ # Frontend Data Consumer
7
+
8
+ Automatically convert backend API contracts, database schemas, or ORM models into fully functional, strongly-typed frontend components. This skill is the perfect companion to the `business-to-data-platform` backend generator.
9
+
10
+ ## 🎯 When to Use
11
+ - When the backend has been scaffolded and the user wants to start building the frontend features.
12
+ - When you need to generate a React or Vue component that reads or writes to a specific API endpoint.
13
+ - When generating admin dashboards, data tables, or forms based on database tables.
14
+ - Works perfectly alongside the `frontend-design-review` skill to refine the generated UI.
15
+
16
+ ## 🛠️ Step-by-Step Workflow
17
+
18
+ ### 1. Analyze the Backend Contracts
19
+ 1. Locate the backend API routers/controllers, DTOs, or ORM schemas (e.g., Prisma schema, SQLAlchemy models).
20
+ 2. Understand the exact shape of the data returned by the `GET` endpoints.
21
+ 3. Understand the required payloads for the `POST`/`PUT`/`PATCH` endpoints.
22
+
23
+ ### 2. Scaffold Frontend API Hooks/Services
24
+ Once the data shape is known, generate the data-fetching layer in the frontend using modern libraries (e.g., React Query, SWR, or RTK Query for React; Vue Query for Vue).
25
+
26
+ #### Example (React Query):
27
+ ```typescript
28
+ // hooks/useUsers.ts
29
+ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
30
+ import { User, CreateUserDto } from '../types/api';
31
+
32
+ export const useUsers = () => {
33
+ return useQuery<User[], Error>({
34
+ queryKey: ['users'],
35
+ queryFn: async () => {
36
+ const response = await fetch('/api/users');
37
+ if (!response.ok) throw new Error('Failed to fetch users');
38
+ return response.json();
39
+ },
40
+ });
41
+ };
42
+
43
+ export const useCreateUser = () => {
44
+ const queryClient = useQueryClient();
45
+ return useMutation({
46
+ mutationFn: async (newUser: CreateUserDto) => {
47
+ const response = await fetch('/api/users', {
48
+ method: 'POST',
49
+ headers: { 'Content-Type': 'application/json' },
50
+ body: JSON.stringify(newUser),
51
+ });
52
+ if (!response.ok) throw new Error('Failed to create user');
53
+ return response.json();
54
+ },
55
+ onSuccess: () => {
56
+ queryClient.invalidateQueries({ queryKey: ['users'] });
57
+ },
58
+ });
59
+ };
60
+ ```
61
+
62
+ ### 3. Generate UI Components
63
+ Based on the API contracts, scaffold the necessary UI components. Always use the project's preferred styling solution (TailwindCSS, CSS Modules, Styled Components, Shadcn/UI, Material UI).
64
+
65
+ - **Data Tables:** Map array responses to robust data tables (with pagination and sorting if supported by the backend).
66
+ - **Forms:** Generate creation/edit forms using a library like `react-hook-form` paired with `zod` validation that matches the backend rules exactly.
67
+ - **Detail Views:** Generate read-only detail cards for individual records.
68
+
69
+ ### 4. Implement Loading & Error States
70
+ Never return a component that crashes when data is fetching or fails.
71
+ - Always handle the `isLoading` or `isPending` state with skeletons or spinners.
72
+ - Always handle the `isError` state with a friendly error message or fallback UI.
73
+
74
+ ### 5. Finalize UI Contracts (No Hardcoding)
75
+ Adhere strictly to this rule: **Never hardcode static arrays representing business entities.** The components must *always* consume the generated API hooks. If the backend endpoint doesn't exist yet, the hook should query a real endpoint path even if it currently 404s, so the wiring is ready to go.
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: frontend-design-review
3
+ description: >
4
+ Review and create distinctive, production-grade frontend interfaces with high design quality and design system compliance.
5
+ Evaluates using three pillars: frictionless insight-to-action, quality craft, and trustworthy building.
6
+ USE FOR: PR reviews, design reviews, accessibility audits, design system compliance checks, creative frontend design,
7
+ UI code review, component reviews, responsive design checks, theme testing, and creating memorable UI.
8
+ DO NOT USE FOR: Backend API reviews, database schema reviews, infrastructure or DevOps work, pure business logic
9
+ without UI, or non-frontend code.
10
+ acknowledgments: |
11
+ Design review principles and quality pillar framework created by @Quirinevwm (https://github.com/Quirinevwm).
12
+ Creative frontend guidance inspired by Anthropic's frontend-design skill
13
+ (https://github.com/anthropics/skills/tree/main/skills/frontend-design). Licensed under respective terms.
14
+ ---
15
+
16
+ # Frontend Design Review
17
+
18
+ Review UI implementations against design quality standards and your design system **OR** create distinctive, production-grade frontend interfaces from scratch.
19
+
20
+ ## Two Modes
21
+
22
+ ### Mode 1: Design Review
23
+ Evaluate existing UI for design system compliance, three quality pillars (Frictionless, Quality Craft, Trustworthy), accessibility, and code quality.
24
+
25
+ ### Mode 2: Creative Frontend Design
26
+ Create distinctive interfaces that avoid generic "AI slop" aesthetics, have clear conceptual direction, and execute with precision.
27
+
28
+ ---
29
+
30
+ ## Creative Frontend Design
31
+
32
+ Before coding, commit to an aesthetic direction:
33
+ - **Purpose**: What problem does this solve? Who uses it?
34
+ - **Tone**: minimal, maximalist, retro-futuristic, organic, luxury, playful, editorial, brutalist, art deco, soft/pastel, industrial, etc.
35
+ - **Constraints**: Framework, performance, accessibility requirements.
36
+ - **Differentiation**: What makes this distinctive and context-appropriate?
37
+
38
+ ### Aesthetics Guidelines
39
+
40
+ - **Typography**: Distinctive fonts that elevate aesthetics. Pair a display font with a refined body font. Avoid Inter, Roboto, Arial, Space Grotesk.
41
+ - **Color & Theme**: Cohesive palette with CSS variables. Dominant colors + sharp accents > timid, evenly-distributed palettes.
42
+ - **Motion**: CSS-only preferred. One well-orchestrated page load with staggered reveals > scattered micro-interactions.
43
+ - **Spatial Composition**: Asymmetry, overlap, diagonal flow, grid-breaking elements, generous negative space OR controlled density.
44
+ - **Backgrounds**: Gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, grain overlays.
45
+
46
+ **AVOID**: Overused fonts, cliched color schemes, predictable layouts, cookie-cutter design without context-specific character.
47
+
48
+ Match implementation complexity to vision. Maximalist = elaborate code. Minimalist = restraint and precision.
49
+
50
+ ---
51
+
52
+ ## Design Review
53
+
54
+ ### Design System Workflow
55
+
56
+ **Before implementing:**
57
+ 1. Review component in your Storybook / component library for API and usage
58
+ 2. Use Figma Dev Mode to get exact specs (spacing, tokens, properties)
59
+ 3. Implement using design system components + design tokens
60
+
61
+ **During review:**
62
+ 1. Compare implementation to Figma design
63
+ 2. Verify design tokens are used (not hardcoded values)
64
+ 3. Check all variants/states are implemented correctly
65
+ 4. Flag deviations (needs design approval)
66
+
67
+ **If component doesn't exist:**
68
+ 1. Check if existing component can be adapted
69
+ 2. Reach out to design for new component creation
70
+ 3. Document exception and rationale in code
71
+
72
+ ### Review Process
73
+
74
+ 1. Identify user task
75
+ 2. Check design system for matching patterns
76
+ 3. Evaluate aesthetic direction
77
+ 4. Identify scope (component, feature, or flow)
78
+ 5. Evaluate each pillar
79
+ 6. Score and prioritize issues (blocking/major/minor)
80
+ 7. Provide recommendations with design system examples
81
+
82
+ ### Core Principles
83
+
84
+ - **Task completion**: Minimum clicks. Every screen answers "What can I do?" and "What happens next?"
85
+ - **Action hierarchy**: 1-2 primary actions per view. Progressive disclosure for secondary.
86
+ - **Onboarding**: Explain features on introduction. Smart defaults over configuration.
87
+ - **Navigation**: Clear entry/exit points. Back/cancel always available. Breadcrumbs for deep flows.
88
+
89
+ ---
90
+
91
+ ## Quality Pillars
92
+
93
+ ### 1. Frictionless Insight to Action
94
+
95
+ **Evaluate:** Task completable in ≤3 interactions? Primary action obvious and singular?
96
+
97
+ **Red flags:** Excessive clicks, multiple competing primary buttons, buried actions, dead ends.
98
+
99
+ ### 2. Quality is Craft
100
+
101
+ **Evaluate:**
102
+ - Design system compliance: matches Figma specs, uses design tokens
103
+ - Aesthetic direction: distinctive typography, cohesive colors, intentional motion
104
+ - Accessibility: Grade C minimum (WCAG 2.1 A), Grade B ideal (WCAG 2.1 AA)
105
+
106
+ **Red flags:** Generic AI aesthetics, hardcoded values, implementation doesn't match Figma, broken reflow, missing focus indicators.
107
+
108
+ ### 3. Trustworthy Building
109
+
110
+ **Evaluate:**
111
+ - AI transparency: disclaimer on AI-generated content
112
+ - Error transparency: actionable error messages
113
+
114
+ **Red flags:** Missing AI disclaimers, opaque errors without guidance.
115
+
116
+ ---
117
+
118
+ ## Review Output Format
119
+
120
+ See [references/review-output-format.md](references/review-output-format.md) for the full review template.
121
+
122
+ ## Review Type Modifiers
123
+
124
+ See [references/review-type-modifiers.md](references/review-type-modifiers.md) for context-specific review focus areas (PR, Creative, Design, Accessibility).
125
+
126
+ ## Quick Checklist
127
+
128
+ See [references/quick-checklist.md](references/quick-checklist.md) for the pre-approval checklist covering design system compliance, aesthetic quality, frictionless, quality craft, and trustworthy pillars.
129
+
130
+ ## Pattern Examples
131
+
132
+ See [references/pattern-examples.md](references/pattern-examples.md) for good/bad examples of creative frontend and design system review work.
133
+
134
+ ---
135
+
136
+ ## Acknowledgments
137
+
138
+ Creative frontend principles inspired by [Anthropic's frontend-design skill](https://github.com/anthropics/skills/tree/main/skills/frontend-design). Design review principles and quality pillar framework created by [@Quirinevwm](https://github.com/Quirinevwm) for systematic UI evaluation.
@@ -0,0 +1,21 @@
1
+ # Pattern Examples
2
+
3
+ ## Creative Frontend (New Interfaces)
4
+
5
+ ### Good: Clear Aesthetic Direction
6
+ - Landing page with brutalist aesthetic: Raw typography (Neue Haas Grotesk), stark black and white, asymmetric layouts
7
+ - Dashboard with organic theme: Rounded forms, earth tones, flowing animations, textured backgrounds
8
+
9
+ ### Bad: Generic AI Aesthetic
10
+ - Overused fonts, cliched color schemes, centered content, generic card layouts
11
+
12
+ ## Design System Review (Existing Work)
13
+
14
+ ### Good: Frictionless
15
+ - Single primary button, clear task completion path
16
+
17
+ ### Good: Quality Craft
18
+ - Uses design system with tokens, distinctive typography, keyboard accessible, tested in themes
19
+
20
+ ### Bad: Quality Craft
21
+ - Hardcoded values, generic overused fonts, poor contrast in dark mode