@nguyenphp/antigravity-marketing 1.0.19 → 1.0.20

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 (106) hide show
  1. package/README.md +5 -61
  2. package/package.json +1 -1
  3. package/templates/.agent/agents/backend-specialist.md +0 -263
  4. package/templates/.agent/agents/database-architect.md +0 -226
  5. package/templates/.agent/agents/debugger.md +0 -225
  6. package/templates/.agent/agents/devops-engineer.md +0 -242
  7. package/templates/.agent/agents/frontend-specialist.md +0 -527
  8. package/templates/.agent/agents/game-developer.md +0 -162
  9. package/templates/.agent/agents/mobile-developer.md +0 -377
  10. package/templates/.agent/agents/penetration-tester.md +0 -188
  11. package/templates/.agent/agents/security-auditor.md +0 -170
  12. package/templates/.agent/agents/test-engineer.md +0 -158
  13. package/templates/.agent/skills/api-patterns/SKILL.md +0 -81
  14. package/templates/.agent/skills/api-patterns/api-style.md +0 -42
  15. package/templates/.agent/skills/api-patterns/auth.md +0 -24
  16. package/templates/.agent/skills/api-patterns/documentation.md +0 -26
  17. package/templates/.agent/skills/api-patterns/graphql.md +0 -41
  18. package/templates/.agent/skills/api-patterns/rate-limiting.md +0 -31
  19. package/templates/.agent/skills/api-patterns/response.md +0 -37
  20. package/templates/.agent/skills/api-patterns/rest.md +0 -40
  21. package/templates/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  22. package/templates/.agent/skills/api-patterns/security-testing.md +0 -122
  23. package/templates/.agent/skills/api-patterns/trpc.md +0 -41
  24. package/templates/.agent/skills/api-patterns/versioning.md +0 -22
  25. package/templates/.agent/skills/app-builder/SKILL.md +0 -75
  26. package/templates/.agent/skills/app-builder/agent-coordination.md +0 -71
  27. package/templates/.agent/skills/app-builder/feature-building.md +0 -53
  28. package/templates/.agent/skills/app-builder/project-detection.md +0 -34
  29. package/templates/.agent/skills/app-builder/scaffolding.md +0 -118
  30. package/templates/.agent/skills/app-builder/tech-stack.md +0 -40
  31. package/templates/.agent/skills/app-builder/templates/SKILL.md +0 -39
  32. package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  33. package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  34. package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  35. package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  36. package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  37. package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  38. package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  39. package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  40. package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  41. package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  42. package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  43. package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  44. package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  45. package/templates/.agent/skills/architecture/SKILL.md +0 -55
  46. package/templates/.agent/skills/architecture/context-discovery.md +0 -43
  47. package/templates/.agent/skills/architecture/examples.md +0 -94
  48. package/templates/.agent/skills/architecture/pattern-selection.md +0 -68
  49. package/templates/.agent/skills/architecture/patterns-reference.md +0 -50
  50. package/templates/.agent/skills/architecture/trade-off-analysis.md +0 -77
  51. package/templates/.agent/skills/bash-linux/SKILL.md +0 -199
  52. package/templates/.agent/skills/behavioral-modes/SKILL.md +0 -242
  53. package/templates/.agent/skills/clean-code/SKILL.md +0 -201
  54. package/templates/.agent/skills/code-review-checklist/SKILL.md +0 -109
  55. package/templates/.agent/skills/database-design/SKILL.md +0 -52
  56. package/templates/.agent/skills/database-design/database-selection.md +0 -43
  57. package/templates/.agent/skills/database-design/indexing.md +0 -39
  58. package/templates/.agent/skills/database-design/migrations.md +0 -48
  59. package/templates/.agent/skills/database-design/optimization.md +0 -36
  60. package/templates/.agent/skills/database-design/orm-selection.md +0 -30
  61. package/templates/.agent/skills/database-design/schema-design.md +0 -56
  62. package/templates/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  63. package/templates/.agent/skills/deployment-procedures/SKILL.md +0 -241
  64. package/templates/.agent/skills/docker-expert/SKILL.md +0 -409
  65. package/templates/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  66. package/templates/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  67. package/templates/.agent/skills/game-development/SKILL.md +0 -167
  68. package/templates/.agent/skills/game-development/game-art/SKILL.md +0 -185
  69. package/templates/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  70. package/templates/.agent/skills/game-development/game-design/SKILL.md +0 -129
  71. package/templates/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  72. package/templates/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  73. package/templates/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  74. package/templates/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  75. package/templates/.agent/skills/game-development/web-games/SKILL.md +0 -150
  76. package/templates/.agent/skills/lint-and-validate/SKILL.md +0 -45
  77. package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  78. package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  79. package/templates/.agent/skills/mcp-builder/SKILL.md +0 -176
  80. package/templates/.agent/skills/nestjs-expert/SKILL.md +0 -552
  81. package/templates/.agent/skills/nextjs-best-practices/SKILL.md +0 -203
  82. package/templates/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  83. package/templates/.agent/skills/parallel-agents/SKILL.md +0 -175
  84. package/templates/.agent/skills/performance-profiling/SKILL.md +0 -143
  85. package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  86. package/templates/.agent/skills/powershell-windows/SKILL.md +0 -167
  87. package/templates/.agent/skills/prisma-expert/SKILL.md +0 -355
  88. package/templates/.agent/skills/python-patterns/SKILL.md +0 -441
  89. package/templates/.agent/skills/react-patterns/SKILL.md +0 -198
  90. package/templates/.agent/skills/red-team-tactics/SKILL.md +0 -199
  91. package/templates/.agent/skills/server-management/SKILL.md +0 -161
  92. package/templates/.agent/skills/systematic-debugging/SKILL.md +0 -109
  93. package/templates/.agent/skills/tdd-workflow/SKILL.md +0 -149
  94. package/templates/.agent/skills/testing-patterns/SKILL.md +0 -178
  95. package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  96. package/templates/.agent/skills/typescript-expert/SKILL.md +0 -429
  97. package/templates/.agent/skills/vue-expert/SKILL.md +0 -374
  98. package/templates/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  99. package/templates/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  100. package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  101. package/templates/.agent/skills/webapp-testing/SKILL.md +0 -187
  102. package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  103. package/templates/.agent/workflows/debug.md +0 -103
  104. package/templates/.agent/workflows/deploy.md +0 -176
  105. package/templates/.agent/workflows/enhance.md +0 -63
  106. package/templates/.agent/workflows/test.md +0 -144
@@ -1,374 +0,0 @@
1
- ---
2
- name: vue-expert
3
- description: Provides Vue 3 expertise including Composition API, reactivity system, component patterns, performance optimization, state management with Pinia, and Nuxt.js integration. Use this skill for Vue component issues, reactivity problems, re-rendering issues, or state management challenges.
4
- ---
5
-
6
- # Vue Expert
7
-
8
- You are an expert in Vue 3 with deep knowledge of Composition API, Options API, reactivity system, component patterns, performance optimization, state management with Pinia, and Nuxt.js Server-Side Rendering.
9
-
10
- ## When Invoked
11
-
12
- ### Step 0: Recommend Specialist and Stop
13
- If the issue is specifically about:
14
- - **Performance profiling and optimization**: Stop and recommend react-performance-expert (concepts apply)
15
- - **CSS-in-JS or styling**: Stop and recommend css-styling-expert
16
- - **Accessibility concerns**: Stop and recommend accessibility-expert
17
- - **Testing Vue components**: Stop and recommend the appropriate testing expert (vitest-expert for unit tests)
18
-
19
- ### Environment Detection
20
- ```bash
21
- # Detect Vue version
22
- npm list vue --depth=0 2>/dev/null | grep vue@ || node -e "console.log(require('./package.json').dependencies?.vue || 'Not found')" 2>/dev/null
23
-
24
- # Check for Vue build tools and framework
25
- if [ -f "nuxt.config.js" ] || [ -f "nuxt.config.ts" ]; then echo "Nuxt.js detected"
26
- elif [ -f "vite.config.js" ] || [ -f "vite.config.ts" ]; then echo "Vite detected"
27
- elif [ -f "vue.config.js" ]; then echo "Vue CLI detected"
28
- elif grep -q "@vue/cli" package.json 2>/dev/null; then echo "Vue CLI detected"
29
- else echo "Unknown build tool"
30
- fi
31
-
32
- # Check for state management
33
- npm list pinia vuex --depth=0 2>/dev/null | grep -E "(pinia|vuex)" || echo "No state management detected"
34
-
35
- # Check for Vue Router
36
- npm list vue-router --depth=0 2>/dev/null | grep vue-router || echo "No router detected"
37
- ```
38
-
39
- ### Apply Strategy
40
- 1. Identify the Vue-specific issue category
41
- 2. Check for common anti-patterns in that category
42
- 3. Apply progressive fixes (minimal → better → complete)
43
- 4. Validate with Vue DevTools and testing
44
-
45
- ## Problem Playbooks
46
-
47
- ### Composition API Issues
48
- **Common Issues:**
49
- - "Cannot access before initialization" - Variable hoisting with setup()
50
- - "Property undefined" - Accessing reactive state incorrectly
51
- - "isRef" confusion - When to use `.value` and when not to
52
- - Missing reactivity - Destructuring reactive objects
53
-
54
- **Diagnosis:**
55
- ```bash
56
- # Check for Composition API usage
57
- grep -r "setup\(\)\|<script setup" --include="*.vue" src/ | head -10
58
-
59
- # Find ref/reactive usage patterns
60
- grep -r "ref\(.*\)\|reactive\(.*\)" --include="*.vue" --include="*.ts" --include="*.js" src/ | head -10
61
-
62
- # Check for destructuring reactivity issues
63
- grep -r "const.*{.*}.*=.*reactive\|const.*{.*}.*=.*toRefs" --include="*.vue" src/
64
-
65
- # Find potential .value issues
66
- grep -r "\.value" --include="*.vue" --include="*.ts" src/ | head -10
67
- ```
68
-
69
- **Prioritized Fixes:**
70
- 1. **Minimal**: Use `.value` correctly for refs, avoid destructuring reactive() directly
71
- 2. **Better**: Use `toRefs()` for destructuring, implement proper computed properties
72
- 3. **Complete**: Create composables for reusable logic, proper TypeScript integration
73
-
74
- **Validation:**
75
- ```bash
76
- npm run lint 2>/dev/null || npx eslint src/ --ext .vue,.ts,.js
77
- npm run type-check 2>/dev/null || npx vue-tsc --noEmit
78
- npm test -- --run 2>/dev/null || echo "No tests configured"
79
- ```
80
-
81
- **Resources:**
82
- - https://vuejs.org/guide/essentials/reactivity-fundamentals.html
83
- - https://vuejs.org/api/composition-api-setup.html
84
- - https://vuejs.org/guide/reusability/composables.html
85
-
86
- ### Reactivity System
87
- **Common Issues:**
88
- - "Property is not reactive" - Adding new properties to reactive objects
89
- - "Watch not triggering" - Deep watching issues, wrong source types
90
- - "Computed not updating" - Stale computed values, side effects in computed
91
- - Array/Object mutation not triggering updates
92
-
93
- **Diagnosis:**
94
- ```bash
95
- # Check for reactive patterns
96
- grep -r "reactive\|ref\|computed\|watch" --include="*.vue" src/ | wc -l
97
-
98
- # Find potential reactivity issues with arrays
99
- grep -r "\.push\|\.pop\|\.splice\|\.sort" --include="*.vue" src/ | head -5
100
-
101
- # Check for watchers
102
- grep -r "watch\(.*\)\|watchEffect" --include="*.vue" src/
103
-
104
- # Find computed with potential side effects
105
- grep -A 3 "computed\(" --include="*.vue" src/ | grep -E "fetch|axios|console|emit" | head -5
106
- ```
107
-
108
- **Prioritized Fixes:**
109
- 1. **Minimal**: Use `reactive()` for objects, ensure deep watching with `{ deep: true }`
110
- 2. **Better**: Use `shallowRef`/`shallowReactive` for large objects, proper watch sources
111
- 3. **Complete**: Implement proper computed chains, use composables for complex reactive logic
112
-
113
- **Validation:**
114
- Use Vue DevTools to inspect reactive state and component updates.
115
-
116
- **Resources:**
117
- - https://vuejs.org/guide/essentials/reactivity-fundamentals.html
118
- - https://vuejs.org/guide/essentials/watchers.html
119
- - https://vuejs.org/guide/essentials/computed.html
120
-
121
- ### Lifecycle & Effects
122
- **Common Issues:**
123
- - Memory leaks from event listeners not cleaned up
124
- - "Cannot access component instance" - Using `this` in Composition API
125
- - Race conditions in async setup
126
- - Effects running at wrong times
127
-
128
- **Diagnosis:**
129
- ```bash
130
- # Find lifecycle hooks
131
- grep -r "onMounted\|onUnmounted\|onBeforeMount\|onUpdated" --include="*.vue" src/
132
-
133
- # Check for event listener cleanup
134
- grep -r "addEventListener\|setInterval\|setTimeout" --include="*.vue" src/ | grep -v "onUnmounted\|removeEventListener\|clearInterval"
135
-
136
- # Find async setup patterns
137
- grep -r "async setup\|await.*setup" --include="*.vue" src/
138
-
139
- # Check for Options API lifecycle
140
- grep -r "mounted\(\)\|created\(\)\|beforeDestroy\|unmounted\(\)" --include="*.vue" src/
141
- ```
142
-
143
- **Prioritized Fixes:**
144
- 1. **Minimal**: Add cleanup in `onUnmounted`, cancel async operations
145
- 2. **Better**: Use `watchEffect` with automatic cleanup, implement proper async patterns
146
- 3. **Complete**: Extract composables with lifecycle management, use Suspense for async
147
-
148
- **Validation:**
149
- ```bash
150
- # Check for memory leaks in tests (if configured)
151
- npm test -- --detectLeaks --run 2>/dev/null || echo "No leak detection configured"
152
- ```
153
-
154
- **Resources:**
155
- - https://vuejs.org/api/composition-api-lifecycle.html
156
- - https://vuejs.org/guide/components/lifecycle.html
157
- - https://vuejs.org/guide/built-ins/suspense.html
158
-
159
- ### State Management (Pinia)
160
- **Common Issues:**
161
- - "Store already exists" - Duplicate store registration
162
- - State not persisting across navigation
163
- - Actions not triggering reactivity
164
- - $patch not working as expected
165
-
166
- **Diagnosis:**
167
- ```bash
168
- # Check for Pinia stores
169
- grep -r "defineStore" --include="*.ts" --include="*.js" src/ | head -10
170
-
171
- # Find store usage patterns
172
- grep -r "useStore\|use.*Store" --include="*.vue" --include="*.ts" src/
173
-
174
- # Check for direct state mutations
175
- grep -r "store\.\w\+\s*=" --include="*.vue" src/ | grep -v "store\.\$\|store\.reset"
176
-
177
- # Find $patch usage
178
- grep -r "\$patch\|\$reset" --include="*.vue" src/
179
- ```
180
-
181
- **Prioritized Fixes:**
182
- 1. **Minimal**: Use `$patch` for batch updates, access stores in setup correctly
183
- 2. **Better**: Implement proper actions for business logic, use getters for derived state
184
- 3. **Complete**: Implement store composition, plugins for persistence, proper TypeScript typing
185
-
186
- **Resources:**
187
- - https://pinia.vuejs.org/core-concepts/
188
- - https://pinia.vuejs.org/core-concepts/state.html
189
- - https://pinia.vuejs.org/core-concepts/actions.html
190
-
191
- ### Component Communication
192
- **Common Issues:**
193
- - Props validation warnings - Type mismatches
194
- - "Avoid mutating prop directly" - Prop mutation
195
- - Events not emitting - Missing defineEmits
196
- - Provide/Inject not working - Wrong context or missing default
197
-
198
- **Diagnosis:**
199
- ```bash
200
- # Check prop definitions
201
- grep -r "defineProps\|props:" --include="*.vue" src/ | head -10
202
-
203
- # Find emit patterns
204
- grep -r "defineEmits\|emit\|$emit" --include="*.vue" src/
205
-
206
- # Check for prop mutations
207
- grep -r "props\.\w\+\s*=" --include="*.vue" src/
208
-
209
- # Find provide/inject usage
210
- grep -r "provide\(.*\)\|inject\(.*\)" --include="*.vue" src/
211
- ```
212
-
213
- **Prioritized Fixes:**
214
- 1. **Minimal**: Use `defineEmits` with proper types, emit events instead of mutating props
215
- 2. **Better**: Implement v-model with `defineModel()`, use props with defaults
216
- 3. **Complete**: Use provide/inject for cross-cutting concerns, implement compound components
217
-
218
- **Resources:**
219
- - https://vuejs.org/guide/components/props.html
220
- - https://vuejs.org/guide/components/events.html
221
- - https://vuejs.org/guide/components/provide-inject.html
222
-
223
- ### SSR/Nuxt Issues
224
- **Common Issues:**
225
- - "Hydration mismatch" - Server/client HTML differences
226
- - "document is not defined" - Browser APIs during SSR
227
- - "Window is not defined" - Client-only code on server
228
- - Data fetching inconsistencies
229
-
230
- **Diagnosis:**
231
- ```bash
232
- # Check for client-only code
233
- grep -r "window\.\|document\.\|localStorage\|sessionStorage" --include="*.vue" --include="*.ts" src/ | head -10
234
-
235
- # Find Nuxt-specific patterns
236
- grep -r "useAsyncData\|useFetch\|useHead" --include="*.vue" src/
237
-
238
- # Check for hydration-sensitive code
239
- grep -r "Date\(\)\|Math\.random\(\)" --include="*.vue" src/
240
-
241
- # Find client-only components
242
- grep -r "<client-only\|<ClientOnly\|nuxtServerInit" --include="*.vue" src/
243
- ```
244
-
245
- **Prioritized Fixes:**
246
- 1. **Minimal**: Wrap client-only code in `<ClientOnly>`, use `onMounted` for browser APIs
247
- 2. **Better**: Use `process.client` checks, implement proper Nuxt data fetching
248
- 3. **Complete**: Implement proper SSR patterns, use `useAsyncData` with proper keys, consistent hydration
249
-
250
- **Resources:**
251
- - https://nuxt.com/docs/guide/concepts/rendering
252
- - https://nuxt.com/docs/api/components/client-only
253
- - https://nuxt.com/docs/api/composables/use-async-data
254
-
255
- ### Template & Rendering
256
- **Common Issues:**
257
- - "v-for requires key" - Missing keys in lists
258
- - "Cannot read properties of null" - Template ref timing
259
- - Performance issues with large lists
260
- - Conditional rendering confusion (v-if vs v-show)
261
-
262
- **Diagnosis:**
263
- ```bash
264
- # Check component size and complexity
265
- find src/ -name "*.vue" | xargs wc -l | sort -rn | head -10
266
-
267
- # Find v-for without keys
268
- grep -r "v-for" --include="*.vue" src/ | grep -v ":key\|v-bind:key" | head -5
269
-
270
- # Check for template refs
271
- grep -r "ref=\"\|:ref=\"\|useTemplateRef" --include="*.vue" src/
272
-
273
- # Find v-if/v-show patterns
274
- grep -r "v-if\|v-show\|v-else" --include="*.vue" src/ | head -10
275
- ```
276
-
277
- **Prioritized Fixes:**
278
- 1. **Minimal**: Add unique keys to v-for, use v-show for frequent toggles
279
- 2. **Better**: Implement proper template refs with null checks, use `shallowRef` for large data
280
- 3. **Complete**: Implement virtual scrolling for large lists, proper component lazy loading
281
-
282
- **Resources:**
283
- - https://vuejs.org/guide/essentials/list.html
284
- - https://vuejs.org/guide/essentials/template-refs.html
285
- - https://vuejs.org/guide/best-practices/performance.html
286
-
287
- ## Runtime Considerations
288
- - **Vue 3 Changes**: Composition API, Teleport, Fragments, multiple v-model bindings
289
- - **Reactivity Caveats**: Vue cannot detect property addition/deletion on reactive objects in some cases
290
- - **Vite HMR**: Fast refresh works best with `<script setup>` syntax
291
- - **TypeScript**: Vue 3 has first-class TypeScript support with proper type inference
292
-
293
- ## Code Review Checklist
294
-
295
- When reviewing Vue code, focus on these framework-specific aspects:
296
-
297
- ### Composition API Compliance
298
- - [ ] `<script setup>` preferred over setup() function
299
- - [ ] Refs properly used with `.value` in script, auto-unwrapped in template
300
- - [ ] `reactive()` not destructured directly (use `toRefs()`)
301
- - [ ] `computed()` used for derived state
302
- - [ ] Composables properly extracted for reusable logic
303
- - [ ] Proper TypeScript typing with `defineProps<>()` and `defineEmits<>()`
304
-
305
- ### Reactivity Patterns
306
- - [ ] Appropriate use of `ref` vs `reactive`
307
- - [ ] `shallowRef`/`shallowReactive` for large objects
308
- - [ ] `watch` has proper source and options
309
- - [ ] `watchEffect` cleanup handled correctly
310
- - [ ] No computed properties with side effects
311
- - [ ] `toRef` used when passing reactive property as prop
312
-
313
- ### State Management (Pinia)
314
- - [ ] Stores organized by domain/feature
315
- - [ ] State mutations through actions (not direct)
316
- - [ ] Getters used for derived state
317
- - [ ] Store composition for shared logic
318
- - [ ] Proper typing for stores
319
- - [ ] No reactive state leaking outside stores
320
-
321
- ### Component Design
322
- - [ ] Single responsibility principle followed
323
- - [ ] Props properly typed and validated
324
- - [ ] Default values correctly defined
325
- - [ ] Events emitted with proper types
326
- - [ ] v-model implemented correctly with defineModel()
327
- - [ ] Slots used for flexible composition
328
-
329
- ### Template Patterns
330
- - [ ] Unique and stable keys for v-for
331
- - [ ] v-if vs v-show used appropriately
332
- - [ ] Template refs accessed after mount
333
- - [ ] No complex logic in templates (use computed)
334
- - [ ] Proper event binding syntax (@click, etc.)
335
- - [ ] Attribute inheritance handled with defineOptions()
336
-
337
- ### Performance Patterns
338
- - [ ] Async components used for code splitting
339
- - [ ] KeepAlive used for cached components
340
- - [ ] Suspense boundaries for async components
341
- - [ ] Large lists virtualized when needed
342
- - [ ] Computed properties cached properly
343
- - [ ] Avoid inline handlers in loops
344
-
345
- ### Common Pitfalls
346
- - [ ] No array index as key for dynamic lists
347
- - [ ] No prop mutation (emit events instead)
348
- - [ ] No reactive destructuring without toRefs
349
- - [ ] No missing provide/inject defaults
350
- - [ ] No forgotten lifecycle cleanup
351
- - [ ] No v-if with v-for on same element
352
-
353
- ## Safety Guidelines
354
- - Never mutate props directly - emit events or use v-model with defineModel()
355
- - Always include cleanup in onUnmounted for subscriptions and timers
356
- - Handle loading and error states explicitly with async components
357
- - Use TypeScript for development-time prop validation
358
- - Implement error boundaries with onErrorCaptured
359
- - Test components in isolation with Vue Test Utils
360
-
361
- ## Anti-Patterns to Avoid
362
- 1. **Reactive Overuse**: Don't make everything reactive - use regular variables for static data
363
- 2. **Watcher Chains**: Avoid complex watcher dependencies - prefer computed properties
364
- 3. **Prop Drilling**: Use provide/inject or Pinia for deeply nested data
365
- 4. **Mixin Usage**: Mixins are legacy - use composables in Vue 3
366
- 5. **Options API Mixing**: Don't mix Options API with Composition API in the same component
367
-
368
- ## Vue 3 Migration Notes
369
- If working with Vue 2 codebases:
370
- - `this` is not available in `<script setup>` - use refs and composables
371
- - Filters are removed - use computed properties or methods
372
- - `$on`, `$off`, `$once` removed - use external library or provide/inject
373
- - `.native` event modifier removed - use `emits` option
374
- - `v-model` prop/event changed from `value`/`input` to `modelValue`/`update:modelValue`
@@ -1,276 +0,0 @@
1
- ---
2
- name: vulnerability-scanner
3
- description: Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.
4
- allowed-tools: Read, Glob, Grep, Bash
5
- ---
6
-
7
- # Vulnerability Scanner
8
-
9
- > Think like an attacker, defend like an expert. 2025 threat landscape awareness.
10
-
11
- ## 🔧 Runtime Scripts
12
-
13
- **Execute for automated validation:**
14
-
15
- | Script | Purpose | Usage |
16
- |--------|---------|-------|
17
- | `scripts/security_scan.py` | Validate security principles applied | `python scripts/security_scan.py <project_path>` |
18
-
19
- ## 📋 Reference Files
20
-
21
- | File | Purpose |
22
- |------|---------|
23
- | [checklists.md](checklists.md) | OWASP Top 10, Auth, API, Data protection checklists |
24
-
25
- ---
26
-
27
- ## 1. Security Expert Mindset
28
-
29
- ### Core Principles
30
-
31
- | Principle | Application |
32
- |-----------|-------------|
33
- | **Assume Breach** | Design as if attacker already inside |
34
- | **Zero Trust** | Never trust, always verify |
35
- | **Defense in Depth** | Multiple layers, no single point |
36
- | **Least Privilege** | Minimum required access only |
37
- | **Fail Secure** | On error, deny access |
38
-
39
- ### Threat Modeling Questions
40
-
41
- Before scanning, ask:
42
- 1. What are we protecting? (Assets)
43
- 2. Who would attack? (Threat actors)
44
- 3. How would they attack? (Attack vectors)
45
- 4. What's the impact? (Business risk)
46
-
47
- ---
48
-
49
- ## 2. OWASP Top 10:2025
50
-
51
- ### Risk Categories
52
-
53
- | Rank | Category | Think About |
54
- |------|----------|-------------|
55
- | **A01** | Broken Access Control | Who can access what? IDOR, SSRF |
56
- | **A02** | Security Misconfiguration | Defaults, headers, exposed services |
57
- | **A03** | Software Supply Chain 🆕 | Dependencies, CI/CD, build integrity |
58
- | **A04** | Cryptographic Failures | Weak crypto, exposed secrets |
59
- | **A05** | Injection | User input → system commands |
60
- | **A06** | Insecure Design | Flawed architecture |
61
- | **A07** | Authentication Failures | Session, credential management |
62
- | **A08** | Integrity Failures | Unsigned updates, tampered data |
63
- | **A09** | Logging & Alerting | Blind spots, no monitoring |
64
- | **A10** | Exceptional Conditions 🆕 | Error handling, fail-open states |
65
-
66
- ### 2025 Key Changes
67
-
68
- ```
69
- 2021 → 2025 Shifts:
70
- ├── SSRF merged into A01 (Access Control)
71
- ├── A02 elevated (Cloud/Container configs)
72
- ├── A03 NEW: Supply Chain (major focus)
73
- ├── A10 NEW: Exceptional Conditions
74
- └── Focus shift: Root causes > Symptoms
75
- ```
76
-
77
- ---
78
-
79
- ## 3. Supply Chain Security (A03)
80
-
81
- ### Attack Surface
82
-
83
- | Vector | Risk | Question to Ask |
84
- |--------|------|-----------------|
85
- | **Dependencies** | Malicious packages | Do we audit new deps? |
86
- | **Lock files** | Integrity attacks | Are they committed? |
87
- | **Build pipeline** | CI/CD compromise | Who can modify? |
88
- | **Registry** | Typosquatting | Verified sources? |
89
-
90
- ### Defense Principles
91
-
92
- - Verify package integrity (checksums)
93
- - Pin versions, audit updates
94
- - Use private registries for critical deps
95
- - Sign and verify artifacts
96
-
97
- ---
98
-
99
- ## 4. Attack Surface Mapping
100
-
101
- ### What to Map
102
-
103
- | Category | Elements |
104
- |----------|----------|
105
- | **Entry Points** | APIs, forms, file uploads |
106
- | **Data Flows** | Input → Process → Output |
107
- | **Trust Boundaries** | Where auth/authz checked |
108
- | **Assets** | Secrets, PII, business data |
109
-
110
- ### Prioritization Matrix
111
-
112
- ```
113
- Risk = Likelihood × Impact
114
-
115
- High Impact + High Likelihood → CRITICAL
116
- High Impact + Low Likelihood → HIGH
117
- Low Impact + High Likelihood → MEDIUM
118
- Low Impact + Low Likelihood → LOW
119
- ```
120
-
121
- ---
122
-
123
- ## 5. Risk Prioritization
124
-
125
- ### CVSS + Context
126
-
127
- | Factor | Weight | Question |
128
- |--------|--------|----------|
129
- | **CVSS Score** | Base severity | How severe is the vuln? |
130
- | **EPSS Score** | Exploit likelihood | Is it being exploited? |
131
- | **Asset Value** | Business context | What's at risk? |
132
- | **Exposure** | Attack surface | Internet-facing? |
133
-
134
- ### Prioritization Decision Tree
135
-
136
- ```
137
- Is it actively exploited (EPSS >0.5)?
138
- ├── YES → CRITICAL: Immediate action
139
- └── NO → Check CVSS
140
- ├── CVSS ≥9.0 → HIGH
141
- ├── CVSS 7.0-8.9 → Consider asset value
142
- └── CVSS <7.0 → Schedule for later
143
- ```
144
-
145
- ---
146
-
147
- ## 6. Exceptional Conditions (A10 - New)
148
-
149
- ### Fail-Open vs Fail-Closed
150
-
151
- | Scenario | Fail-Open (BAD) | Fail-Closed (GOOD) |
152
- |----------|-----------------|---------------------|
153
- | Auth error | Allow access | Deny access |
154
- | Parsing fails | Accept input | Reject input |
155
- | Timeout | Retry forever | Limit + abort |
156
-
157
- ### What to Check
158
-
159
- - Exception handlers that catch-all and ignore
160
- - Missing error handling on security operations
161
- - Race conditions in auth/authz
162
- - Resource exhaustion scenarios
163
-
164
- ---
165
-
166
- ## 7. Scanning Methodology
167
-
168
- ### Phase-Based Approach
169
-
170
- ```
171
- 1. RECONNAISSANCE
172
- └── Understand the target
173
- ├── Technology stack
174
- ├── Entry points
175
- └── Data flows
176
-
177
- 2. DISCOVERY
178
- └── Identify potential issues
179
- ├── Configuration review
180
- ├── Dependency analysis
181
- └── Code pattern search
182
-
183
- 3. ANALYSIS
184
- └── Validate and prioritize
185
- ├── False positive elimination
186
- ├── Risk scoring
187
- └── Attack chain mapping
188
-
189
- 4. REPORTING
190
- └── Actionable findings
191
- ├── Clear reproduction steps
192
- ├── Business impact
193
- └── Remediation guidance
194
- ```
195
-
196
- ---
197
-
198
- ## 8. Code Pattern Analysis
199
-
200
- ### High-Risk Patterns
201
-
202
- | Pattern | Risk | Look For |
203
- |---------|------|----------|
204
- | **String concat in queries** | Injection | `"SELECT * FROM " + user_input` |
205
- | **Dynamic code execution** | RCE | `eval()`, `exec()`, `Function()` |
206
- | **Unsafe deserialization** | RCE | `pickle.loads()`, `unserialize()` |
207
- | **Path manipulation** | Traversal | User input in file paths |
208
- | **Disabled security** | Various | `verify=False`, `--insecure` |
209
-
210
- ### Secret Patterns
211
-
212
- | Type | Indicators |
213
- |------|-----------|
214
- | API Keys | `api_key`, `apikey`, high entropy |
215
- | Tokens | `token`, `bearer`, `jwt` |
216
- | Credentials | `password`, `secret`, `key` |
217
- | Cloud | `AWS_`, `AZURE_`, `GCP_` prefixes |
218
-
219
- ---
220
-
221
- ## 9. Cloud Security Considerations
222
-
223
- ### Shared Responsibility
224
-
225
- | Layer | You Own | Provider Owns |
226
- |-------|---------|---------------|
227
- | Data | ✅ | ❌ |
228
- | Application | ✅ | ❌ |
229
- | OS/Runtime | Depends | Depends |
230
- | Infrastructure | ❌ | ✅ |
231
-
232
- ### Cloud-Specific Checks
233
-
234
- - IAM: Least privilege applied?
235
- - Storage: Public buckets?
236
- - Network: Security groups tightened?
237
- - Secrets: Using secrets manager?
238
-
239
- ---
240
-
241
- ## 10. Anti-Patterns
242
-
243
- | ❌ Don't | ✅ Do |
244
- |----------|-------|
245
- | Scan without understanding | Map attack surface first |
246
- | Alert on every CVE | Prioritize by exploitability + asset |
247
- | Ignore false positives | Maintain verified baseline |
248
- | Fix symptoms only | Address root causes |
249
- | Scan once before deploy | Continuous scanning |
250
- | Trust third-party deps blindly | Verify integrity, audit code |
251
-
252
- ---
253
-
254
- ## 11. Reporting Principles
255
-
256
- ### Finding Structure
257
-
258
- Each finding should answer:
259
- 1. **What?** - Clear vulnerability description
260
- 2. **Where?** - Exact location (file, line, endpoint)
261
- 3. **Why?** - Root cause explanation
262
- 4. **Impact?** - Business consequence
263
- 5. **How to fix?** - Specific remediation
264
-
265
- ### Severity Classification
266
-
267
- | Severity | Criteria |
268
- |----------|----------|
269
- | **Critical** | RCE, auth bypass, mass data exposure |
270
- | **High** | Data exposure, privilege escalation |
271
- | **Medium** | Limited scope, requires conditions |
272
- | **Low** | Informational, best practice |
273
-
274
- ---
275
-
276
- > **Remember:** Vulnerability scanning finds issues. Expert thinking prioritizes what matters. Always ask: "What would an attacker do with this?"