@neyugn/agent-kits 0.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.
Files changed (158) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +514 -0
  3. package/README.vi.md +410 -0
  4. package/README.zh.md +410 -0
  5. package/dist/cli.d.ts +1 -0
  6. package/dist/cli.js +422 -0
  7. package/kits/coder/ARCHITECTURE.md +289 -0
  8. package/kits/coder/agents/ai-engineer.md +344 -0
  9. package/kits/coder/agents/backend-specialist.md +270 -0
  10. package/kits/coder/agents/cloud-architect.md +363 -0
  11. package/kits/coder/agents/code-reviewer.md +284 -0
  12. package/kits/coder/agents/data-engineer.md +401 -0
  13. package/kits/coder/agents/database-specialist.md +251 -0
  14. package/kits/coder/agents/debugger.md +209 -0
  15. package/kits/coder/agents/devops-engineer.md +281 -0
  16. package/kits/coder/agents/documentation-writer.md +296 -0
  17. package/kits/coder/agents/frontend-specialist.md +298 -0
  18. package/kits/coder/agents/i18n-specialist.md +348 -0
  19. package/kits/coder/agents/integration-specialist.md +314 -0
  20. package/kits/coder/agents/mobile-developer.md +271 -0
  21. package/kits/coder/agents/multi-tenant-architect.md +281 -0
  22. package/kits/coder/agents/orchestrator.md +263 -0
  23. package/kits/coder/agents/performance-analyst.md +327 -0
  24. package/kits/coder/agents/project-planner.md +277 -0
  25. package/kits/coder/agents/queue-specialist.md +282 -0
  26. package/kits/coder/agents/realtime-specialist.md +267 -0
  27. package/kits/coder/agents/security-auditor.md +253 -0
  28. package/kits/coder/agents/test-engineer.md +315 -0
  29. package/kits/coder/agents/ux-researcher.md +388 -0
  30. package/kits/coder/rules/.cursorrules +287 -0
  31. package/kits/coder/rules/CLAUDE.md +287 -0
  32. package/kits/coder/rules/CODEX.md +287 -0
  33. package/kits/coder/rules/GEMINI.md +287 -0
  34. package/kits/coder/scripts/checklist.py +318 -0
  35. package/kits/coder/scripts/kit_status.py +292 -0
  36. package/kits/coder/scripts/skills_manager.py +243 -0
  37. package/kits/coder/scripts/verify_all.py +391 -0
  38. package/kits/coder/skills/accessibility-patterns/SKILL.md +372 -0
  39. package/kits/coder/skills/accessibility-patterns/scripts/a11y_checker.py +211 -0
  40. package/kits/coder/skills/ai-rag-patterns/SKILL.md +444 -0
  41. package/kits/coder/skills/api-patterns/SKILL.md +316 -0
  42. package/kits/coder/skills/api-patterns/assets/.gitkeep +1 -0
  43. package/kits/coder/skills/api-patterns/references/deep-dive.md +21 -0
  44. package/kits/coder/skills/api-patterns/scripts/api_validator.py +253 -0
  45. package/kits/coder/skills/api-patterns/scripts/validate.py +56 -0
  46. package/kits/coder/skills/auth-patterns/SKILL.md +267 -0
  47. package/kits/coder/skills/aws-patterns/SKILL.md +576 -0
  48. package/kits/coder/skills/brainstorming/SKILL.md +370 -0
  49. package/kits/coder/skills/brainstorming/assets/.gitkeep +1 -0
  50. package/kits/coder/skills/brainstorming/references/deep-dive.md +21 -0
  51. package/kits/coder/skills/brainstorming/scripts/validate.py +56 -0
  52. package/kits/coder/skills/clean-code/SKILL.md +240 -0
  53. package/kits/coder/skills/clean-code/assets/.gitkeep +1 -0
  54. package/kits/coder/skills/clean-code/references/deep-dive.md +21 -0
  55. package/kits/coder/skills/clean-code/scripts/lint_runner.py +186 -0
  56. package/kits/coder/skills/clean-code/scripts/validate.py +56 -0
  57. package/kits/coder/skills/database-design/SKILL.md +255 -0
  58. package/kits/coder/skills/database-design/assets/.gitkeep +1 -0
  59. package/kits/coder/skills/database-design/references/deep-dive.md +21 -0
  60. package/kits/coder/skills/database-design/scripts/schema_validator.py +272 -0
  61. package/kits/coder/skills/database-design/scripts/validate.py +56 -0
  62. package/kits/coder/skills/docker-patterns/SKILL.md +240 -0
  63. package/kits/coder/skills/documentation-templates/SKILL.md +441 -0
  64. package/kits/coder/skills/e2e-testing/SKILL.md +457 -0
  65. package/kits/coder/skills/flutter-patterns/SKILL.md +330 -0
  66. package/kits/coder/skills/frontend-design/SKILL.md +127 -0
  67. package/kits/coder/skills/github-actions/SKILL.md +349 -0
  68. package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +466 -0
  69. package/kits/coder/skills/graphql-patterns/SKILL.md +558 -0
  70. package/kits/coder/skills/i18n-localization/SKILL.md +345 -0
  71. package/kits/coder/skills/i18n-localization/scripts/i18n_checker.py +267 -0
  72. package/kits/coder/skills/kubernetes-patterns/SKILL.md +357 -0
  73. package/kits/coder/skills/mermaid-diagrams/SKILL.md +351 -0
  74. package/kits/coder/skills/mobile-design/SKILL.md +305 -0
  75. package/kits/coder/skills/monitoring-observability/SKILL.md +458 -0
  76. package/kits/coder/skills/multi-tenancy/SKILL.md +317 -0
  77. package/kits/coder/skills/multi-tenancy/assets/.gitkeep +1 -0
  78. package/kits/coder/skills/multi-tenancy/references/deep-dive.md +21 -0
  79. package/kits/coder/skills/multi-tenancy/scripts/validate.py +56 -0
  80. package/kits/coder/skills/nodejs-best-practices/SKILL.md +220 -0
  81. package/kits/coder/skills/performance-profiling/SKILL.md +333 -0
  82. package/kits/coder/skills/performance-profiling/assets/.gitkeep +1 -0
  83. package/kits/coder/skills/performance-profiling/references/deep-dive.md +21 -0
  84. package/kits/coder/skills/performance-profiling/scripts/validate.py +56 -0
  85. package/kits/coder/skills/plan-writing/SKILL.md +360 -0
  86. package/kits/coder/skills/plan-writing/assets/.gitkeep +1 -0
  87. package/kits/coder/skills/plan-writing/references/deep-dive.md +21 -0
  88. package/kits/coder/skills/plan-writing/scripts/validate.py +56 -0
  89. package/kits/coder/skills/postgres-patterns/SKILL.md +361 -0
  90. package/kits/coder/skills/prompt-engineering/SKILL.md +277 -0
  91. package/kits/coder/skills/queue-patterns/SKILL.md +359 -0
  92. package/kits/coder/skills/queue-patterns/assets/.gitkeep +1 -0
  93. package/kits/coder/skills/queue-patterns/references/deep-dive.md +21 -0
  94. package/kits/coder/skills/queue-patterns/scripts/validate.py +56 -0
  95. package/kits/coder/skills/react-native-patterns/SKILL.md +393 -0
  96. package/kits/coder/skills/react-patterns/SKILL.md +319 -0
  97. package/kits/coder/skills/realtime-patterns/SKILL.md +506 -0
  98. package/kits/coder/skills/realtime-patterns/assets/.gitkeep +1 -0
  99. package/kits/coder/skills/realtime-patterns/references/deep-dive.md +21 -0
  100. package/kits/coder/skills/realtime-patterns/scripts/validate.py +56 -0
  101. package/kits/coder/skills/redis-patterns/SKILL.md +484 -0
  102. package/kits/coder/skills/security-fundamentals/SKILL.md +363 -0
  103. package/kits/coder/skills/security-fundamentals/assets/.gitkeep +1 -0
  104. package/kits/coder/skills/security-fundamentals/references/deep-dive.md +21 -0
  105. package/kits/coder/skills/security-fundamentals/scripts/security_scan.py +326 -0
  106. package/kits/coder/skills/security-fundamentals/scripts/validate.py +56 -0
  107. package/kits/coder/skills/seo-patterns/SKILL.md +262 -0
  108. package/kits/coder/skills/seo-patterns/scripts/seo_checker.py +211 -0
  109. package/kits/coder/skills/systematic-debugging/SKILL.md +478 -0
  110. package/kits/coder/skills/systematic-debugging/assets/.gitkeep +1 -0
  111. package/kits/coder/skills/systematic-debugging/references/deep-dive.md +21 -0
  112. package/kits/coder/skills/systematic-debugging/scripts/validate.py +56 -0
  113. package/kits/coder/skills/tailwind-patterns/SKILL.md +395 -0
  114. package/kits/coder/skills/terraform-patterns/SKILL.md +470 -0
  115. package/kits/coder/skills/testing-patterns/SKILL.md +285 -0
  116. package/kits/coder/skills/testing-patterns/assets/.gitkeep +1 -0
  117. package/kits/coder/skills/testing-patterns/references/deep-dive.md +21 -0
  118. package/kits/coder/skills/testing-patterns/scripts/test_runner.py +219 -0
  119. package/kits/coder/skills/testing-patterns/scripts/validate.py +56 -0
  120. package/kits/coder/skills/typescript-patterns/SKILL.md +417 -0
  121. package/kits/coder/skills/ui-ux-pro-max/SKILL.md +364 -0
  122. package/kits/coder/skills/ui-ux-pro-max/data/charts.csv +26 -0
  123. package/kits/coder/skills/ui-ux-pro-max/data/colors.csv +97 -0
  124. package/kits/coder/skills/ui-ux-pro-max/data/icons.csv +101 -0
  125. package/kits/coder/skills/ui-ux-pro-max/data/landing.csv +31 -0
  126. package/kits/coder/skills/ui-ux-pro-max/data/products.csv +97 -0
  127. package/kits/coder/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  128. package/kits/coder/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  129. package/kits/coder/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  130. package/kits/coder/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  131. package/kits/coder/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  132. package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  133. package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  134. package/kits/coder/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  135. package/kits/coder/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  136. package/kits/coder/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  137. package/kits/coder/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  138. package/kits/coder/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  139. package/kits/coder/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  140. package/kits/coder/skills/ui-ux-pro-max/data/styles.csv +59 -0
  141. package/kits/coder/skills/ui-ux-pro-max/data/typography.csv +58 -0
  142. package/kits/coder/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  143. package/kits/coder/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  144. package/kits/coder/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  145. package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  146. package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
  147. package/kits/coder/skills/ui-ux-pro-max/scripts/core.py +257 -0
  148. package/kits/coder/skills/ui-ux-pro-max/scripts/design_system.py +488 -0
  149. package/kits/coder/skills/ui-ux-pro-max/scripts/search.py +76 -0
  150. package/kits/coder/workflows/.gitkeep +20 -0
  151. package/kits/coder/workflows/create.md +152 -0
  152. package/kits/coder/workflows/debug.md +223 -0
  153. package/kits/coder/workflows/deploy.md +283 -0
  154. package/kits/coder/workflows/orchestrate.md +243 -0
  155. package/kits/coder/workflows/plan.md +134 -0
  156. package/kits/coder/workflows/test.md +237 -0
  157. package/kits/coder/workflows/ui-ux-pro-max.md +109 -0
  158. package/package.json +49 -0
@@ -0,0 +1,333 @@
1
+ ---
2
+ name: performance-profiling
3
+ description: Performance profiling principles and decision-making. Use when diagnosing slow code, optimizing response times, analyzing Core Web Vitals, or establishing performance budgets. Covers measurement, analysis, and optimization techniques.
4
+ allowed-tools: Read, Edit, Glob, Grep, Bash
5
+ ---
6
+
7
+ # Performance Profiling - Measure First, Optimize Second
8
+
9
+ > **Philosophy:** Never optimize without data. Gut feelings about performance are usually wrong.
10
+
11
+ ---
12
+
13
+ ## šŸŽÆ Core Principle: Data-Driven Optimization
14
+
15
+ ```
16
+ āŒ WRONG: "This looks slow, let me refactor it to be faster"
17
+ āœ… CORRECT: "I measured this takes 850ms, my target is 200ms, profiling shows 70% in DB query"
18
+ ```
19
+
20
+ **Performance Optimization Workflow:**
21
+
22
+ ```
23
+ 1. BASELINE → Measure current state
24
+ 2. PROFILE → Find the bottleneck
25
+ 3. ANALYZE → Understand root cause
26
+ 4. OPTIMIZE → Fix the specific issue
27
+ 5. VALIDATE → Verify improvement
28
+ 6. MONITOR → Prevent regression
29
+ ```
30
+
31
+ ---
32
+
33
+ ## šŸ“Š What to Measure
34
+
35
+ ### Web Performance: Core Web Vitals
36
+
37
+ | Metric | What It Measures | Good | Needs Work | Poor |
38
+ | ----------------------------------- | ---------------- | ------- | ---------- | ------- |
39
+ | **LCP** (Largest Contentful Paint) | Loading | ≤ 2.5s | 2.5-4.0s | > 4.0s |
40
+ | **INP** (Interaction to Next Paint) | Responsiveness | ≤ 200ms | 200-500ms | > 500ms |
41
+ | **CLS** (Cumulative Layout Shift) | Visual Stability | ≤ 0.1 | 0.1-0.25 | > 0.25 |
42
+
43
+ ### Backend Performance
44
+
45
+ | Metric | Target | Critical |
46
+ | ----------------------- | ------- | -------- |
47
+ | API Response Time (p50) | < 100ms | > 500ms |
48
+ | API Response Time (p95) | < 300ms | > 1s |
49
+ | API Response Time (p99) | < 1s | > 3s |
50
+ | Database Query | < 50ms | > 200ms |
51
+ | Background Job | < 30s | > 5min |
52
+ | Memory Usage | < 80% | > 95% |
53
+ | CPU Usage | < 70% | > 90% |
54
+
55
+ ### Decision: Which Metric to Prioritize?
56
+
57
+ ```
58
+ User-facing latency?
59
+ ā”œā”€ā”€ Yes → Focus on p95/p99 latency first
60
+ └── No (batch job) → Focus on throughput and resource usage
61
+
62
+ High traffic volume?
63
+ ā”œā”€ā”€ Yes → Optimize p50 for most impact
64
+ └── No → Optimize p99 to catch edge cases
65
+
66
+ User perceives slowness?
67
+ ā”œā”€ā”€ Yes → Measure Time to Interactive (TTI)
68
+ └── No → Check if perceived speed is the real issue
69
+ ```
70
+
71
+ ---
72
+
73
+ ## šŸ” Profiling Decision Tree
74
+
75
+ ### Frontend Performance
76
+
77
+ ```
78
+ Page loads slowly?
79
+ ā”œā”€ā”€ Check LCP element
80
+ │ ā”œā”€ā”€ Large image? → Compress, use WebP, lazy load
81
+ │ ā”œā”€ā”€ Web font? → Preload, use font-display: swap
82
+ │ └── Server slow? → Check TTFB (Time to First Byte)
83
+ │
84
+ ā”œā”€ā”€ Check blocking resources
85
+ │ ā”œā”€ā”€ Large JS bundle? → Code split, tree shake
86
+ │ ā”œā”€ā”€ Render-blocking CSS? → Inline critical CSS
87
+ │ └── Third-party scripts? → Defer, async load
88
+ │
89
+ └── Check waterfalls in DevTools Network tab
90
+ ```
91
+
92
+ ### Backend Performance
93
+
94
+ ```
95
+ API is slow?
96
+ ā”œā”€ā”€ Where is time spent?
97
+ │ ā”œā”€ā”€ Database query → Check query plan, add indexes
98
+ │ ā”œā”€ā”€ External API → Add caching, circuit breaker
99
+ │ ā”œā”€ā”€ CPU processing → Profile code, optimize algorithm
100
+ │ └── Memory allocation → Check for leaks, reduce allocations
101
+ │
102
+ ā”œā”€ā”€ Is it consistent or intermittent?
103
+ │ ā”œā”€ā”€ Consistent → Systemic issue (algorithm, query)
104
+ │ └── Intermittent → Check for lock contention, GC pauses
105
+ │
106
+ └── Does it scale?
107
+ ā”œā”€ā”€ No → O(n²) algorithm? N+1 queries?
108
+ └── Yes → Infrastructure bottleneck?
109
+ ```
110
+
111
+ ---
112
+
113
+ ## šŸ› ļø Profiling Tools
114
+
115
+ ### Frontend
116
+
117
+ | Tool | Purpose | When to Use |
118
+ | --------------------------- | ------------------------- | ------------------------------------ |
119
+ | Chrome DevTools Performance | Recording-based profiling | Investigating specific interactions |
120
+ | Lighthouse | Automated audits | Quick health check |
121
+ | WebPageTest | Real-world testing | Testing from different locations |
122
+ | PageSpeed Insights | Field + Lab data | SEO + real user metrics |
123
+ | Chrome UX Report | Real user data | Understanding actual user experience |
124
+
125
+ ### Backend (Node.js)
126
+
127
+ | Tool | Purpose | When to Use |
128
+ | ---------------------- | ----------------------- | -------------------------- |
129
+ | `clinic.js` | Comprehensive profiling | First investigation |
130
+ | `node --prof` | V8 CPU profiler | Deep CPU analysis |
131
+ | `--inspect` + DevTools | Interactive debugging | Memory leaks, async issues |
132
+ | `0x` | Flame graphs | Visualizing CPU time |
133
+ | `autocannon` / `k6` | Load testing | Stress testing endpoints |
134
+
135
+ ### Database
136
+
137
+ | Tool | Purpose | When to Use |
138
+ | -------------------- | -------------------- | ------------------------- |
139
+ | `EXPLAIN ANALYZE` | Query execution plan | Slow query investigation |
140
+ | `pg_stat_statements` | Query statistics | Finding slow queries |
141
+ | MongoDB Profiler | Operation profiling | Slow operation detection |
142
+ | Redis `SLOWLOG` | Slow command log | Identifying slow commands |
143
+
144
+ ---
145
+
146
+ ## ⚔ Common Bottlenecks & Solutions
147
+
148
+ ### N+1 Queries
149
+
150
+ **Detection:**
151
+
152
+ ```
153
+ 10 users requested → 1 query for users + 10 queries for profiles
154
+ Pattern: Query count scales with data size
155
+ ```
156
+
157
+ **Solution:**
158
+
159
+ ```typescript
160
+ // āŒ N+1 Problem
161
+ const users = await User.findAll();
162
+ for (const user of users) {
163
+ user.profile = await Profile.findOne({ userId: user.id });
164
+ }
165
+
166
+ // āœ… Eager Loading
167
+ const users = await User.findAll({
168
+ include: [{ model: Profile }],
169
+ });
170
+
171
+ // āœ… Batching
172
+ const users = await User.findAll();
173
+ const profiles = await Profile.findAll({
174
+ where: { userId: users.map((u) => u.id) },
175
+ });
176
+ ```
177
+
178
+ ### Missing Database Indexes
179
+
180
+ **Detection:**
181
+
182
+ ```sql
183
+ EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = 123;
184
+ -- Look for: Seq Scan (bad) vs Index Scan (good)
185
+ ```
186
+
187
+ **Solution:**
188
+
189
+ ```sql
190
+ -- Add index on frequently filtered columns
191
+ CREATE INDEX idx_orders_user_id ON orders(user_id);
192
+
193
+ -- Composite index for common query patterns
194
+ CREATE INDEX idx_orders_user_status ON orders(user_id, status);
195
+ ```
196
+
197
+ ### Large Bundle Size
198
+
199
+ **Detection:**
200
+
201
+ ```bash
202
+ # Analyze bundle composition
203
+ npx webpack-bundle-analyzer dist/stats.json
204
+ ```
205
+
206
+ **Solutions:**
207
+ | Problem | Solution |
208
+ | ------- | -------- |
209
+ | Large library | Use lighter alternative (date-fns vs moment) |
210
+ | Unused exports | Enable tree shaking |
211
+ | One big bundle | Code split by route |
212
+ | Duplicate dependencies | Dedupe in package manager |
213
+
214
+ ### Memory Leaks
215
+
216
+ **Detection:**
217
+
218
+ - Memory usage increases over time
219
+ - Heap dumps show growing object counts
220
+ - OutOfMemory errors in production
221
+
222
+ **Common Causes:**
223
+ | Cause | Solution |
224
+ | ----- | -------- |
225
+ | Event listeners not removed | Cleanup in useEffect/componentWillUnmount |
226
+ | Growing global arrays/maps | Use WeakMap/WeakSet or bounded caches |
227
+ | Closures holding references | Break reference chains |
228
+ | Uncleared timers | clearTimeout/clearInterval |
229
+
230
+ ---
231
+
232
+ ## šŸ“ˆ Optimization Patterns
233
+
234
+ ### Caching Strategy
235
+
236
+ | Data Type | Cache Location | TTL Strategy |
237
+ | ---------------- | -------------- | ----------------------------- |
238
+ | Static assets | CDN | Long (1 year) + cache busting |
239
+ | API responses | Redis | Short (5-60 min) |
240
+ | Computed values | In-memory | Based on computation cost |
241
+ | Database queries | Query cache | Invalidate on write |
242
+ | User sessions | Redis | Based on session requirements |
243
+
244
+ ### Lazy Loading
245
+
246
+ ```typescript
247
+ // āœ… Lazy load components
248
+ const HeavyComponent = lazy(() => import('./HeavyComponent'));
249
+
250
+ // āœ… Lazy load images
251
+ <img loading="lazy" src="below-fold.jpg" />
252
+
253
+ // āœ… Lazy load data
254
+ const data = useSWR(isVisible ? '/api/data' : null);
255
+ ```
256
+
257
+ ### Debouncing & Throttling
258
+
259
+ | Technique | Use Case | Example |
260
+ | --------- | ------------------------- | ------------------------- |
261
+ | Debounce | Wait until activity stops | Search input autocomplete |
262
+ | Throttle | Limit frequency | Scroll handlers, resize |
263
+
264
+ ```typescript
265
+ // Debounce: Execute after 300ms of no calls
266
+ const debouncedSearch = debounce(search, 300);
267
+
268
+ // Throttle: Execute at most once per 100ms
269
+ const throttledScroll = throttle(handleScroll, 100);
270
+ ```
271
+
272
+ ---
273
+
274
+ ## 🚨 Anti-Patterns
275
+
276
+ | āŒ Don't | āœ… Do |
277
+ | --------------------------------- | ------------------------------------------ |
278
+ | Optimize without measuring | Profile first, then optimize |
279
+ | Premature optimization | Focus on correctness, then performance |
280
+ | Optimize cold paths | Focus on hot paths (frequently executed) |
281
+ | Micro-optimize trivial code | Target the biggest bottleneck |
282
+ | Cache everything | Cache strategically, consider invalidation |
283
+ | Load everything upfront | Lazy load non-critical resources |
284
+ | Block main thread with heavy work | Use web workers, async processing |
285
+ | Ignore p99 latency | p99 affects real users, not just averages |
286
+
287
+ ---
288
+
289
+ ## šŸ“‹ Performance Budget Template
290
+
291
+ ```markdown
292
+ ## Performance Budget: [Project Name]
293
+
294
+ ### Core Web Vitals
295
+
296
+ - LCP: < 2.5s
297
+ - INP: < 200ms
298
+ - CLS: < 0.1
299
+
300
+ ### Resource Budgets
301
+
302
+ - Total page weight: < 500KB (compressed)
303
+ - JavaScript: < 200KB (compressed)
304
+ - CSS: < 50KB (compressed)
305
+ - Images: < 200KB total (above the fold)
306
+
307
+ ### API Performance
308
+
309
+ - p50 latency: < 100ms
310
+ - p95 latency: < 300ms
311
+ - p99 latency: < 1s
312
+
313
+ ### Monitoring
314
+
315
+ - Alert if LCP > 3s for > 5% of users
316
+ - Alert if error rate > 1%
317
+ - Alert if API p95 > 500ms
318
+ ```
319
+
320
+ ---
321
+
322
+ ## šŸ”— Related Skills
323
+
324
+ | Need | Skill |
325
+ | --------------------- | ---------------------- |
326
+ | Frontend optimization | `react-best-practices` |
327
+ | Database optimization | `database-design` |
328
+ | Testing performance | `testing-patterns` |
329
+ | Clean efficient code | `clean-code` |
330
+
331
+ ---
332
+
333
+ > **Remember:** The fastest code is the code that doesn't run. Eliminate unnecessary work before micro-optimizing.
@@ -0,0 +1 @@
1
+ # Assets directory - add templates, images, etc.
@@ -0,0 +1,21 @@
1
+ # Reference Documentation for Performance Profiling
2
+
3
+ [TODO: Add detailed reference content here]
4
+
5
+ ## Overview
6
+
7
+ [Detailed explanation of concepts]
8
+
9
+ ## Deep Dive Topics
10
+
11
+ ### Topic 1
12
+
13
+ [Content]
14
+
15
+ ### Topic 2
16
+
17
+ [Content]
18
+
19
+ ## Examples
20
+
21
+ [Real-world examples]
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example validator for performance-profiling
4
+
5
+ Usage:
6
+ python validate.py <project_path>
7
+ """
8
+
9
+ import sys
10
+ from pathlib import Path
11
+
12
+
13
+ def validate(project_path: str) -> dict:
14
+ """Main validation logic"""
15
+ results = {
16
+ 'errors': [],
17
+ 'warnings': [],
18
+ 'passed': []
19
+ }
20
+
21
+ # TODO: Add validation logic
22
+ results['passed'].append('Placeholder validation passed')
23
+
24
+ return results
25
+
26
+
27
+ def print_results(results: dict):
28
+ """Pretty print results"""
29
+ print("\nšŸ” Validation Results\n")
30
+
31
+ if results['errors']:
32
+ print(f"āŒ Errors ({len(results['errors'])})")
33
+ for error in results['errors']:
34
+ print(f" - {error}")
35
+
36
+ if results['warnings']:
37
+ print(f"\nāš ļø Warnings ({len(results['warnings'])})")
38
+ for warning in results['warnings']:
39
+ print(f" - {warning}")
40
+
41
+ if results['passed']:
42
+ print(f"\nāœ… Passed ({len(results['passed'])})")
43
+ for passed in results['passed']:
44
+ print(f" - {passed}")
45
+
46
+
47
+ if __name__ == "__main__":
48
+ if len(sys.argv) < 2:
49
+ print("Usage: python validate.py <project_path>")
50
+ sys.exit(1)
51
+
52
+ project_path = sys.argv[1]
53
+ results = validate(project_path)
54
+ print_results(results)
55
+
56
+ sys.exit(1 if results['errors'] else 0)