create-raffles-it 1.0.1
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.
- package/LICENSE +21 -0
- package/README.md +214 -0
- package/agents/.agents +105 -0
- package/agents/backend-specialist/agent.yaml +21 -0
- package/agents/backend-specialist/prompt.md +255 -0
- package/agents/code-archaeologist/agent.yaml +13 -0
- package/agents/code-archaeologist/prompt.md +98 -0
- package/agents/database-architect/agent.yaml +13 -0
- package/agents/database-architect/prompt.md +218 -0
- package/agents/debugger/agent.yaml +7 -0
- package/agents/debugger/prompt.md +219 -0
- package/agents/devops-engineer/agent.yaml +16 -0
- package/agents/devops-engineer/prompt.md +234 -0
- package/agents/documentation-writer/agent.yaml +13 -0
- package/agents/documentation-writer/prompt.md +96 -0
- package/agents/explorer-agent/agent.yaml +16 -0
- package/agents/explorer-agent/prompt.md +65 -0
- package/agents/frontend-specialist/agent.yaml +17 -0
- package/agents/frontend-specialist/prompt.md +585 -0
- package/agents/orchestrator/agent.yaml +21 -0
- package/agents/orchestrator/prompt.md +408 -0
- package/agents/penetration-tester/agent.yaml +15 -0
- package/agents/penetration-tester/prompt.md +180 -0
- package/agents/performance-optimizer/agent.yaml +13 -0
- package/agents/performance-optimizer/prompt.md +179 -0
- package/agents/product-manager/agent.yaml +12 -0
- package/agents/product-manager/prompt.md +104 -0
- package/agents/product-owner/agent.yaml +12 -0
- package/agents/product-owner/prompt.md +87 -0
- package/agents/project-planner/agent.yaml +13 -0
- package/agents/project-planner/prompt.md +397 -0
- package/agents/qa-automation-engineer/agent.yaml +16 -0
- package/agents/qa-automation-engineer/prompt.md +95 -0
- package/agents/security-auditor/agent.yaml +15 -0
- package/agents/security-auditor/prompt.md +162 -0
- package/agents/seo-specialist/agent.yaml +13 -0
- package/agents/seo-specialist/prompt.md +103 -0
- package/agents/test-engineer/agent.yaml +17 -0
- package/agents/test-engineer/prompt.md +150 -0
- package/bin/commands/help.js +19 -0
- package/bin/commands/init.js +125 -0
- package/bin/commands/list.js +40 -0
- package/bin/index.js +44 -0
- package/bin/utils/logger.js +32 -0
- package/bin/utils/scaffold.js +114 -0
- package/configs/mcp_config.json +24 -0
- package/configs/model.yaml +20 -0
- package/configs/runtime.yaml +22 -0
- package/package.json +56 -0
- package/prompts/planning.md +31 -0
- package/prompts/reflection.md +21 -0
- package/prompts/system.md +24 -0
- package/rules/GEMINI.md +273 -0
- package/skills/api-patterns/SKILL.md +81 -0
- package/skills/api-patterns/api-style.md +42 -0
- package/skills/api-patterns/auth.md +24 -0
- package/skills/api-patterns/documentation.md +26 -0
- package/skills/api-patterns/graphql.md +41 -0
- package/skills/api-patterns/rate-limiting.md +31 -0
- package/skills/api-patterns/response.md +37 -0
- package/skills/api-patterns/rest.md +40 -0
- package/skills/api-patterns/scripts/api_validator.py +211 -0
- package/skills/api-patterns/security-testing.md +122 -0
- package/skills/api-patterns/skill.yaml +3 -0
- package/skills/api-patterns/trpc.md +41 -0
- package/skills/api-patterns/versioning.md +22 -0
- package/skills/architecture/SKILL.md +55 -0
- package/skills/architecture/context-discovery.md +43 -0
- package/skills/architecture/examples.md +94 -0
- package/skills/architecture/pattern-selection.md +68 -0
- package/skills/architecture/patterns-reference.md +50 -0
- package/skills/architecture/skill.yaml +3 -0
- package/skills/architecture/trade-off-analysis.md +77 -0
- package/skills/brainstorming/SKILL.md +163 -0
- package/skills/brainstorming/dynamic-questioning.md +350 -0
- package/skills/brainstorming/skill.yaml +3 -0
- package/skills/clean-code/SKILL.md +201 -0
- package/skills/clean-code/skill.yaml +3 -0
- package/skills/code-review-checklist/SKILL.md +109 -0
- package/skills/code-review-checklist/skill.yaml +3 -0
- package/skills/database-design/SKILL.md +52 -0
- package/skills/database-design/database-selection.md +43 -0
- package/skills/database-design/indexing.md +39 -0
- package/skills/database-design/migrations.md +48 -0
- package/skills/database-design/optimization.md +36 -0
- package/skills/database-design/orm-selection.md +30 -0
- package/skills/database-design/schema-design.md +56 -0
- package/skills/database-design/scripts/schema_validator.py +172 -0
- package/skills/database-design/skill.yaml +3 -0
- package/skills/frontend-design/SKILL.md +452 -0
- package/skills/frontend-design/animation-guide.md +331 -0
- package/skills/frontend-design/color-system.md +311 -0
- package/skills/frontend-design/decision-trees.md +418 -0
- package/skills/frontend-design/motion-graphics.md +306 -0
- package/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/skills/frontend-design/skill.yaml +3 -0
- package/skills/frontend-design/typography-system.md +345 -0
- package/skills/frontend-design/ux-psychology.md +1116 -0
- package/skills/frontend-design/visual-effects.md +383 -0
- package/skills/mcp-builder/SKILL.md +176 -0
- package/skills/mcp-builder/skill.yaml +3 -0
- package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
- package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/skills/nextjs-react-expert/9-cache-components.md +103 -0
- package/skills/nextjs-react-expert/SKILL.md +293 -0
- package/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/skills/nextjs-react-expert/skill.yaml +3 -0
- package/skills/nodejs-best-practices/SKILL.md +333 -0
- package/skills/nodejs-best-practices/skill.yaml +3 -0
- package/skills/parallel-agents/SKILL.md +175 -0
- package/skills/parallel-agents/skill.yaml +3 -0
- package/skills/powershell-windows/SKILL.md +167 -0
- package/skills/powershell-windows/skill.yaml +3 -0
- package/skills/python-patterns/SKILL.md +441 -0
- package/skills/python-patterns/skill.yaml +3 -0
- package/skills/seo-fundamentals/SKILL.md +129 -0
- package/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/skills/seo-fundamentals/skill.yaml +3 -0
- package/skills/systematic-debugging/SKILL.md +109 -0
- package/skills/systematic-debugging/skill.yaml +3 -0
- package/skills/tdd-workflow/SKILL.md +149 -0
- package/skills/tdd-workflow/skill.yaml +3 -0
- package/skills/vulnerability-scanner/SKILL.md +276 -0
- package/skills/vulnerability-scanner/checklists.md +121 -0
- package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/skills/vulnerability-scanner/skill.yaml +3 -0
- package/skills/web-design-guidelines/SKILL.md +57 -0
- package/skills/web-design-guidelines/skill.yaml +3 -0
- package/skills/webapp-testing/SKILL.md +187 -0
- package/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/skills/webapp-testing/skill.yaml +3 -0
- package/workflows/brainstorm.md +113 -0
- package/workflows/create.md +59 -0
- package/workflows/debug.md +103 -0
- package/workflows/deploy.md +176 -0
- package/workflows/enhance.md +63 -0
- package/workflows/orchestrate.md +237 -0
- package/workflows/plan.md +89 -0
- package/workflows/preview.md +81 -0
- package/workflows/status.md +86 -0
- package/workflows/test.md +144 -0
- package/workflows/ui-ux-pro-max.md +296 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
# Visual Effects Reference
|
|
2
|
+
|
|
3
|
+
> Modern CSS effect principles and techniques - learn the concepts, create variations.
|
|
4
|
+
> **No fixed values to copy - understand the patterns.**
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Glassmorphism Principles
|
|
9
|
+
|
|
10
|
+
### What Makes Glassmorphism Work
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Key Properties:
|
|
14
|
+
├── Semi-transparent background (not solid)
|
|
15
|
+
├── Backdrop blur (frosted glass effect)
|
|
16
|
+
├── Subtle border (for definition)
|
|
17
|
+
└── Often: light shadow for depth
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### The Pattern (Customize Values)
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
.glass {
|
|
24
|
+
/* Transparency: adjust opacity based on content readability */
|
|
25
|
+
background: rgba(R, G, B, OPACITY);
|
|
26
|
+
/* OPACITY: 0.1-0.3 for dark bg, 0.5-0.8 for light bg */
|
|
27
|
+
|
|
28
|
+
/* Blur: higher = more frosted */
|
|
29
|
+
backdrop-filter: blur(AMOUNT);
|
|
30
|
+
/* AMOUNT: 8-12px subtle, 16-24px strong */
|
|
31
|
+
|
|
32
|
+
/* Border: defines edges */
|
|
33
|
+
border: 1px solid rgba(255, 255, 255, OPACITY);
|
|
34
|
+
/* OPACITY: 0.1-0.3 typically */
|
|
35
|
+
|
|
36
|
+
/* Radius: match your design system */
|
|
37
|
+
border-radius: YOUR_RADIUS;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### When to Use Glassmorphism
|
|
42
|
+
- ✅ Over colorful/image backgrounds
|
|
43
|
+
- ✅ Modals, overlays, cards
|
|
44
|
+
- ✅ Navigation bars with scrolling content behind
|
|
45
|
+
- ❌ Text-heavy content (readability issues)
|
|
46
|
+
- ❌ Simple solid backgrounds (pointless)
|
|
47
|
+
|
|
48
|
+
### When NOT to Use
|
|
49
|
+
- Low contrast situations
|
|
50
|
+
- Accessibility-critical content
|
|
51
|
+
- Performance-constrained devices
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. Neomorphism Principles
|
|
56
|
+
|
|
57
|
+
### What Makes Neomorphism Work
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Key Concept: Soft, extruded elements using DUAL shadows
|
|
61
|
+
├── Light shadow (from light source direction)
|
|
62
|
+
├── Dark shadow (opposite direction)
|
|
63
|
+
└── Background matches surrounding (same color)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### The Pattern
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
.neo-raised {
|
|
70
|
+
/* Background MUST match parent */
|
|
71
|
+
background: SAME_AS_PARENT;
|
|
72
|
+
|
|
73
|
+
/* Two shadows: light direction + dark direction */
|
|
74
|
+
box-shadow:
|
|
75
|
+
OFFSET OFFSET BLUR rgba(light-color),
|
|
76
|
+
-OFFSET -OFFSET BLUR rgba(dark-color);
|
|
77
|
+
|
|
78
|
+
/* OFFSET: typically 6-12px */
|
|
79
|
+
/* BLUR: typically 12-20px */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.neo-pressed {
|
|
83
|
+
/* Inset creates "pushed in" effect */
|
|
84
|
+
box-shadow:
|
|
85
|
+
inset OFFSET OFFSET BLUR rgba(dark-color),
|
|
86
|
+
inset -OFFSET -OFFSET BLUR rgba(light-color);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Accessibility Warning
|
|
91
|
+
⚠️ **Low contrast** - use sparingly, ensure clear boundaries
|
|
92
|
+
|
|
93
|
+
### When to Use
|
|
94
|
+
- Decorative elements
|
|
95
|
+
- Subtle interactive states
|
|
96
|
+
- Minimalist UI with flat colors
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 3. Shadow Hierarchy Principles
|
|
101
|
+
|
|
102
|
+
### Concept: Shadows Indicate Elevation
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Higher elevation = larger shadow
|
|
106
|
+
├── Level 0: No shadow (flat on surface)
|
|
107
|
+
├── Level 1: Subtle shadow (slightly raised)
|
|
108
|
+
├── Level 2: Medium shadow (cards, buttons)
|
|
109
|
+
├── Level 3: Large shadow (modals, dropdowns)
|
|
110
|
+
└── Level 4: Deep shadow (floating elements)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Shadow Properties to Adjust
|
|
114
|
+
|
|
115
|
+
```css
|
|
116
|
+
box-shadow: OFFSET-X OFFSET-Y BLUR SPREAD COLOR;
|
|
117
|
+
|
|
118
|
+
/* Offset: direction of shadow */
|
|
119
|
+
/* Blur: softness (larger = softer) */
|
|
120
|
+
/* Spread: size expansion */
|
|
121
|
+
/* Color: typically black with low opacity */
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Principles for Natural Shadows
|
|
125
|
+
|
|
126
|
+
1. **Y-offset larger than X** (light comes from above)
|
|
127
|
+
2. **Low opacity** (5-15% for subtle, 15-25% for pronounced)
|
|
128
|
+
3. **Multiple layers** for realism (ambient + direct)
|
|
129
|
+
4. **Blur scales with offset** (larger offset = larger blur)
|
|
130
|
+
|
|
131
|
+
### Dark Mode Shadows
|
|
132
|
+
- Shadows less visible on dark backgrounds
|
|
133
|
+
- May need to increase opacity
|
|
134
|
+
- Or use glow/highlight instead
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 4. Gradient Principles
|
|
139
|
+
|
|
140
|
+
### Types and When to Use
|
|
141
|
+
|
|
142
|
+
| Type | Pattern | Use Case |
|
|
143
|
+
|------|---------|----------|
|
|
144
|
+
| **Linear** | Color A → Color B along line | Backgrounds, buttons, headers |
|
|
145
|
+
| **Radial** | Center → outward | Spotlights, focal points |
|
|
146
|
+
| **Conic** | Around center | Pie charts, creative effects |
|
|
147
|
+
|
|
148
|
+
### Creating Harmonious Gradients
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Good Gradient Rules:
|
|
152
|
+
├── Use ADJACENT colors on wheel (analogous)
|
|
153
|
+
├── Or same hue with different lightness
|
|
154
|
+
├── Avoid complementary (can look harsh)
|
|
155
|
+
└── Add middle stops for smoother transitions
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Gradient Syntax Pattern
|
|
159
|
+
|
|
160
|
+
```css
|
|
161
|
+
.gradient {
|
|
162
|
+
background: linear-gradient(
|
|
163
|
+
DIRECTION, /* angle or to-keyword */
|
|
164
|
+
COLOR-STOP-1, /* color + optional position */
|
|
165
|
+
COLOR-STOP-2,
|
|
166
|
+
/* ... more stops */
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* DIRECTION examples: */
|
|
171
|
+
/* 90deg, 135deg, to right, to bottom right */
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Mesh Gradients
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Multiple radial gradients overlapped:
|
|
178
|
+
├── Each at different position
|
|
179
|
+
├── Each with transparent falloff
|
|
180
|
+
├── **Mandatory for "Wow" factor in Hero sections**
|
|
181
|
+
└── Creates organic, colorful effect (Search: "Aurora Gradient CSS")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 5. Border Effects Principles
|
|
187
|
+
|
|
188
|
+
### Gradient Borders
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Technique: Pseudo-element with gradient background
|
|
192
|
+
├── Element has padding = border width
|
|
193
|
+
├── Pseudo-element fills with gradient
|
|
194
|
+
└── Mask or clip creates border effect
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Animated Borders
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Technique: Rotating gradient or conic sweep
|
|
201
|
+
├── Pseudo-element larger than content
|
|
202
|
+
├── Animation rotates the gradient
|
|
203
|
+
└── Overflow hidden clips to shape
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Glow Borders
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
/* Multiple box-shadows create glow */
|
|
210
|
+
box-shadow:
|
|
211
|
+
0 0 SMALL-BLUR COLOR,
|
|
212
|
+
0 0 MEDIUM-BLUR COLOR,
|
|
213
|
+
0 0 LARGE-BLUR COLOR;
|
|
214
|
+
|
|
215
|
+
/* Each layer adds to the glow */
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 6. Glow Effects Principles
|
|
221
|
+
|
|
222
|
+
### Text Glow
|
|
223
|
+
|
|
224
|
+
```css
|
|
225
|
+
text-shadow:
|
|
226
|
+
0 0 BLUR-1 COLOR,
|
|
227
|
+
0 0 BLUR-2 COLOR,
|
|
228
|
+
0 0 BLUR-3 COLOR;
|
|
229
|
+
|
|
230
|
+
/* Multiple layers = stronger glow */
|
|
231
|
+
/* Larger blur = softer spread */
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Element Glow
|
|
235
|
+
|
|
236
|
+
```css
|
|
237
|
+
box-shadow:
|
|
238
|
+
0 0 BLUR-1 COLOR,
|
|
239
|
+
0 0 BLUR-2 COLOR;
|
|
240
|
+
|
|
241
|
+
/* Use color matching element for realistic glow */
|
|
242
|
+
/* Lower opacity for subtle, higher for neon */
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Pulsing Glow Animation
|
|
246
|
+
|
|
247
|
+
```css
|
|
248
|
+
@keyframes glow-pulse {
|
|
249
|
+
0%, 100% { box-shadow: 0 0 SMALL-BLUR COLOR; }
|
|
250
|
+
50% { box-shadow: 0 0 LARGE-BLUR COLOR; }
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Easing and duration affect feel */
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 7. Overlay Techniques
|
|
259
|
+
|
|
260
|
+
### Gradient Overlay on Images
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
Purpose: Improve text readability over images
|
|
264
|
+
Pattern: Gradient from transparent to opaque
|
|
265
|
+
Position: Where text will appear
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
```css
|
|
269
|
+
.overlay::after {
|
|
270
|
+
content: '';
|
|
271
|
+
position: absolute;
|
|
272
|
+
inset: 0;
|
|
273
|
+
background: linear-gradient(
|
|
274
|
+
DIRECTION,
|
|
275
|
+
transparent PERCENTAGE,
|
|
276
|
+
rgba(0,0,0,OPACITY) 100%
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Colored Overlay
|
|
282
|
+
|
|
283
|
+
```css
|
|
284
|
+
/* Blend mode or layered gradient */
|
|
285
|
+
background:
|
|
286
|
+
linear-gradient(YOUR-COLOR-WITH-OPACITY),
|
|
287
|
+
url('image.jpg');
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## 8. Modern CSS Techniques
|
|
293
|
+
|
|
294
|
+
### Container Queries (Concept)
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
Instead of viewport breakpoints:
|
|
298
|
+
├── Component responds to ITS container
|
|
299
|
+
├── Truly modular, reusable components
|
|
300
|
+
└── Syntax: @container (condition) { }
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### :has() Selector (Concept)
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
Parent styling based on children:
|
|
307
|
+
├── "Parent that has X child"
|
|
308
|
+
├── Enables previously impossible patterns
|
|
309
|
+
└── Progressive enhancement approach
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Scroll-Driven Animations (Concept)
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
Animation progress tied to scroll:
|
|
316
|
+
├── Entry/exit animations on scroll
|
|
317
|
+
├── Parallax effects
|
|
318
|
+
├── Progress indicators
|
|
319
|
+
└── View-based or scroll-based timeline
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 9. Performance Principles
|
|
325
|
+
|
|
326
|
+
### GPU-Accelerated Properties
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
CHEAP to animate (GPU):
|
|
330
|
+
├── transform (translate, scale, rotate)
|
|
331
|
+
└── opacity
|
|
332
|
+
|
|
333
|
+
EXPENSIVE to animate (CPU):
|
|
334
|
+
├── width, height
|
|
335
|
+
├── top, left, right, bottom
|
|
336
|
+
├── margin, padding
|
|
337
|
+
└── box-shadow (recalculates)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### will-change Usage
|
|
341
|
+
|
|
342
|
+
```css
|
|
343
|
+
/* Use sparingly, only for heavy animations */
|
|
344
|
+
.heavy-animation {
|
|
345
|
+
will-change: transform;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Remove after animation if possible */
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Reduced Motion
|
|
352
|
+
|
|
353
|
+
```css
|
|
354
|
+
@media (prefers-reduced-motion: reduce) {
|
|
355
|
+
/* Disable or minimize animations */
|
|
356
|
+
/* Respect user preference */
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## 10. Effect Selection Checklist
|
|
363
|
+
|
|
364
|
+
Before applying any effect:
|
|
365
|
+
|
|
366
|
+
- [ ] **Does it serve a purpose?** (not just decoration)
|
|
367
|
+
- [ ] **Is it appropriate for the context?** (brand, audience)
|
|
368
|
+
- [ ] **Have you varied from previous projects?** (avoid repetition)
|
|
369
|
+
- [ ] **Is it accessible?** (contrast, motion sensitivity)
|
|
370
|
+
- [ ] **Is it performant?** (especially on mobile)
|
|
371
|
+
- [ ] **Did you ask user preference?** (if style open-ended)
|
|
372
|
+
|
|
373
|
+
### Anti-Patterns
|
|
374
|
+
|
|
375
|
+
- ❌ Glassmorphism on every element (kitsch)
|
|
376
|
+
- ❌ Dark + neon as default (lazy AI look)
|
|
377
|
+
- ❌ **Static/Flat designs with no depth (FAILED)**
|
|
378
|
+
- ❌ Effects that hurt readability
|
|
379
|
+
- ❌ Animations without purpose
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
> **Remember**: Effects enhance meaning. Choose based on purpose and context, not because it "looks cool."
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-builder
|
|
3
|
+
description: MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MCP Builder
|
|
8
|
+
|
|
9
|
+
> Principles for building MCP servers.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. MCP Overview
|
|
14
|
+
|
|
15
|
+
### What is MCP?
|
|
16
|
+
|
|
17
|
+
Model Context Protocol - standard for connecting AI systems with external tools and data sources.
|
|
18
|
+
|
|
19
|
+
### Core Concepts
|
|
20
|
+
|
|
21
|
+
| Concept | Purpose |
|
|
22
|
+
|---------|---------|
|
|
23
|
+
| **Tools** | Functions AI can call |
|
|
24
|
+
| **Resources** | Data AI can read |
|
|
25
|
+
| **Prompts** | Pre-defined prompt templates |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Server Architecture
|
|
30
|
+
|
|
31
|
+
### Project Structure
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
my-mcp-server/
|
|
35
|
+
├── src/
|
|
36
|
+
│ └── index.ts # Main entry
|
|
37
|
+
├── package.json
|
|
38
|
+
└── tsconfig.json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Transport Types
|
|
42
|
+
|
|
43
|
+
| Type | Use |
|
|
44
|
+
|------|-----|
|
|
45
|
+
| **Stdio** | Local, CLI-based |
|
|
46
|
+
| **SSE** | Web-based, streaming |
|
|
47
|
+
| **WebSocket** | Real-time, bidirectional |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 3. Tool Design Principles
|
|
52
|
+
|
|
53
|
+
### Good Tool Design
|
|
54
|
+
|
|
55
|
+
| Principle | Description |
|
|
56
|
+
|-----------|-------------|
|
|
57
|
+
| Clear name | Action-oriented (get_weather, create_user) |
|
|
58
|
+
| Single purpose | One thing well |
|
|
59
|
+
| Validated input | Schema with types and descriptions |
|
|
60
|
+
| Structured output | Predictable response format |
|
|
61
|
+
|
|
62
|
+
### Input Schema Design
|
|
63
|
+
|
|
64
|
+
| Field | Required? |
|
|
65
|
+
|-------|-----------|
|
|
66
|
+
| Type | Yes - object |
|
|
67
|
+
| Properties | Define each param |
|
|
68
|
+
| Required | List mandatory params |
|
|
69
|
+
| Description | Human-readable |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 4. Resource Patterns
|
|
74
|
+
|
|
75
|
+
### Resource Types
|
|
76
|
+
|
|
77
|
+
| Type | Use |
|
|
78
|
+
|------|-----|
|
|
79
|
+
| Static | Fixed data (config, docs) |
|
|
80
|
+
| Dynamic | Generated on request |
|
|
81
|
+
| Template | URI with parameters |
|
|
82
|
+
|
|
83
|
+
### URI Patterns
|
|
84
|
+
|
|
85
|
+
| Pattern | Example |
|
|
86
|
+
|---------|---------|
|
|
87
|
+
| Fixed | `docs://readme` |
|
|
88
|
+
| Parameterized | `users://{userId}` |
|
|
89
|
+
| Collection | `files://project/*` |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 5. Error Handling
|
|
94
|
+
|
|
95
|
+
### Error Types
|
|
96
|
+
|
|
97
|
+
| Situation | Response |
|
|
98
|
+
|-----------|----------|
|
|
99
|
+
| Invalid params | Validation error message |
|
|
100
|
+
| Not found | Clear "not found" |
|
|
101
|
+
| Server error | Generic error, log details |
|
|
102
|
+
|
|
103
|
+
### Best Practices
|
|
104
|
+
|
|
105
|
+
- Return structured errors
|
|
106
|
+
- Don't expose internal details
|
|
107
|
+
- Log for debugging
|
|
108
|
+
- Provide actionable messages
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 6. Multimodal Handling
|
|
113
|
+
|
|
114
|
+
### Supported Types
|
|
115
|
+
|
|
116
|
+
| Type | Encoding |
|
|
117
|
+
|------|----------|
|
|
118
|
+
| Text | Plain text |
|
|
119
|
+
| Images | Base64 + MIME type |
|
|
120
|
+
| Files | Base64 + MIME type |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 7. Security Principles
|
|
125
|
+
|
|
126
|
+
### Input Validation
|
|
127
|
+
|
|
128
|
+
- Validate all tool inputs
|
|
129
|
+
- Sanitize user-provided data
|
|
130
|
+
- Limit resource access
|
|
131
|
+
|
|
132
|
+
### API Keys
|
|
133
|
+
|
|
134
|
+
- Use environment variables
|
|
135
|
+
- Don't log secrets
|
|
136
|
+
- Validate permissions
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 8. Configuration
|
|
141
|
+
|
|
142
|
+
### Claude Desktop Config
|
|
143
|
+
|
|
144
|
+
| Field | Purpose |
|
|
145
|
+
|-------|---------|
|
|
146
|
+
| command | Executable to run |
|
|
147
|
+
| args | Command arguments |
|
|
148
|
+
| env | Environment variables |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 9. Testing
|
|
153
|
+
|
|
154
|
+
### Test Categories
|
|
155
|
+
|
|
156
|
+
| Type | Focus |
|
|
157
|
+
|------|-------|
|
|
158
|
+
| Unit | Tool logic |
|
|
159
|
+
| Integration | Full server |
|
|
160
|
+
| Contract | Schema validation |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 10. Best Practices Checklist
|
|
165
|
+
|
|
166
|
+
- [ ] Clear, action-oriented tool names
|
|
167
|
+
- [ ] Complete input schemas with descriptions
|
|
168
|
+
- [ ] Structured JSON output
|
|
169
|
+
- [ ] Error handling for all cases
|
|
170
|
+
- [ ] Input validation
|
|
171
|
+
- [ ] Environment-based configuration
|
|
172
|
+
- [ ] Logging for debugging
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
> **Remember:** MCP tools should be simple, focused, and well-documented. The AI relies on descriptions to use them correctly.
|