omgkit 2.1.1 → 2.3.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.
- package/package.json +1 -1
- package/plugin/skills/databases/mongodb/SKILL.md +81 -28
- package/plugin/skills/databases/prisma/SKILL.md +87 -32
- package/plugin/skills/databases/redis/SKILL.md +80 -27
- package/plugin/skills/devops/aws/SKILL.md +80 -26
- package/plugin/skills/devops/github-actions/SKILL.md +84 -32
- package/plugin/skills/devops/kubernetes/SKILL.md +94 -32
- package/plugin/skills/devops/performance-profiling/SKILL.md +59 -863
- package/plugin/skills/frameworks/django/SKILL.md +158 -24
- package/plugin/skills/frameworks/express/SKILL.md +153 -33
- package/plugin/skills/frameworks/fastapi/SKILL.md +153 -34
- package/plugin/skills/frameworks/laravel/SKILL.md +146 -33
- package/plugin/skills/frameworks/nestjs/SKILL.md +137 -25
- package/plugin/skills/frameworks/rails/SKILL.md +594 -28
- package/plugin/skills/frameworks/react/SKILL.md +94 -962
- package/plugin/skills/frameworks/spring/SKILL.md +528 -35
- package/plugin/skills/frameworks/vue/SKILL.md +147 -25
- package/plugin/skills/frontend/accessibility/SKILL.md +145 -36
- package/plugin/skills/frontend/frontend-design/SKILL.md +114 -29
- package/plugin/skills/frontend/responsive/SKILL.md +131 -28
- package/plugin/skills/frontend/shadcn-ui/SKILL.md +133 -43
- package/plugin/skills/frontend/tailwindcss/SKILL.md +105 -37
- package/plugin/skills/frontend/threejs/SKILL.md +110 -35
- package/plugin/skills/languages/javascript/SKILL.md +195 -34
- package/plugin/skills/methodology/brainstorming/SKILL.md +98 -30
- package/plugin/skills/methodology/defense-in-depth/SKILL.md +83 -37
- package/plugin/skills/methodology/dispatching-parallel-agents/SKILL.md +92 -31
- package/plugin/skills/methodology/executing-plans/SKILL.md +117 -28
- package/plugin/skills/methodology/finishing-development-branch/SKILL.md +111 -32
- package/plugin/skills/methodology/problem-solving/SKILL.md +65 -311
- package/plugin/skills/methodology/receiving-code-review/SKILL.md +76 -27
- package/plugin/skills/methodology/requesting-code-review/SKILL.md +93 -22
- package/plugin/skills/methodology/root-cause-tracing/SKILL.md +75 -40
- package/plugin/skills/methodology/sequential-thinking/SKILL.md +75 -224
- package/plugin/skills/methodology/systematic-debugging/SKILL.md +81 -35
- package/plugin/skills/methodology/test-driven-development/SKILL.md +120 -26
- package/plugin/skills/methodology/testing-anti-patterns/SKILL.md +88 -35
- package/plugin/skills/methodology/token-optimization/SKILL.md +73 -34
- package/plugin/skills/methodology/verification-before-completion/SKILL.md +128 -28
- package/plugin/skills/methodology/writing-plans/SKILL.md +105 -20
- package/plugin/skills/omega/omega-architecture/SKILL.md +178 -40
- package/plugin/skills/omega/omega-coding/SKILL.md +247 -41
- package/plugin/skills/omega/omega-sprint/SKILL.md +208 -46
- package/plugin/skills/omega/omega-testing/SKILL.md +253 -42
- package/plugin/skills/omega/omega-thinking/SKILL.md +263 -51
- package/plugin/skills/security/better-auth/SKILL.md +83 -34
- package/plugin/skills/security/oauth/SKILL.md +118 -35
- package/plugin/skills/security/owasp/SKILL.md +112 -35
- package/plugin/skills/testing/playwright/SKILL.md +141 -38
- package/plugin/skills/testing/pytest/SKILL.md +137 -38
- package/plugin/skills/testing/vitest/SKILL.md +124 -39
- package/plugin/skills/tools/document-processing/SKILL.md +111 -838
- package/plugin/skills/tools/image-processing/SKILL.md +126 -659
- package/plugin/skills/tools/mcp-development/SKILL.md +85 -758
- package/plugin/skills/tools/media-processing/SKILL.md +118 -735
- package/plugin/stdrules/SKILL_STANDARDS.md +490 -0
|
@@ -1,59 +1,134 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Three.js
|
|
2
|
+
name: building-3d-graphics
|
|
3
|
+
description: Claude builds immersive 3D web experiences with Three.js and React Three Fiber. Use when creating WebGL scenes, 3D animations, shaders, or physics simulations.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Building 3D Graphics
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
```javascript
|
|
10
|
-
import * as THREE from 'three';
|
|
8
|
+
## Quick Start
|
|
11
9
|
|
|
12
|
-
const scene = new THREE.Scene();
|
|
13
|
-
const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000);
|
|
14
|
-
const renderer = new THREE.WebGLRenderer();
|
|
15
|
-
|
|
16
|
-
renderer.setSize(width, height);
|
|
17
|
-
document.body.appendChild(renderer.domElement);
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## React Three Fiber
|
|
21
10
|
```tsx
|
|
22
11
|
import { Canvas } from '@react-three/fiber';
|
|
23
|
-
import { OrbitControls } from '@react-three/drei';
|
|
12
|
+
import { OrbitControls, Environment } from '@react-three/drei';
|
|
24
13
|
|
|
25
|
-
function Scene() {
|
|
14
|
+
export function Scene() {
|
|
26
15
|
return (
|
|
27
|
-
<Canvas>
|
|
28
|
-
<ambientLight />
|
|
29
|
-
<
|
|
30
|
-
<mesh>
|
|
31
|
-
<boxGeometry />
|
|
32
|
-
<meshStandardMaterial color="
|
|
16
|
+
<Canvas shadows camera={{ position: [5, 3, 5], fov: 50 }}>
|
|
17
|
+
<ambientLight intensity={0.5} />
|
|
18
|
+
<directionalLight position={[10, 10, 5]} castShadow />
|
|
19
|
+
<mesh castShadow>
|
|
20
|
+
<boxGeometry args={[1, 1, 1]} />
|
|
21
|
+
<meshStandardMaterial color="#4ecdc4" />
|
|
33
22
|
</mesh>
|
|
34
|
-
<OrbitControls />
|
|
23
|
+
<OrbitControls enableDamping />
|
|
24
|
+
<Environment preset="city" />
|
|
35
25
|
</Canvas>
|
|
36
26
|
);
|
|
37
27
|
}
|
|
38
28
|
```
|
|
39
29
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
| Feature | Description | Guide |
|
|
33
|
+
|---------|-------------|-------|
|
|
34
|
+
| Scene Management | Renderer, camera, controls setup with proper disposal | `ref/scene-manager.md` |
|
|
35
|
+
| React Three Fiber | Declarative 3D with React components and hooks | `ref/r3f-patterns.md` |
|
|
36
|
+
| Custom Shaders | GLSL vertex/fragment shaders with uniforms | `ref/shader-materials.md` |
|
|
37
|
+
| Physics | Rapier physics with rigid bodies and colliders | `ref/physics-system.md` |
|
|
38
|
+
| Animation | GSAP and Three.js animation mixer integration | `ref/animation.md` |
|
|
39
|
+
| Performance | LOD, instancing, frustum culling, texture optimization | `ref/optimization.md` |
|
|
40
|
+
|
|
41
|
+
## Common Patterns
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
### Animated Component with Interaction
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
function AnimatedBox({ position }: { position: [number, number, number] }) {
|
|
47
|
+
const meshRef = useRef<THREE.Mesh>(null);
|
|
48
|
+
const [hovered, setHovered] = useState(false);
|
|
46
49
|
|
|
47
50
|
useFrame((state, delta) => {
|
|
48
|
-
if (
|
|
51
|
+
if (meshRef.current) {
|
|
52
|
+
meshRef.current.rotation.y += delta * 0.5;
|
|
53
|
+
const scale = hovered ? 1.2 : 1;
|
|
54
|
+
meshRef.current.scale.lerp(new THREE.Vector3(scale, scale, scale), 0.1);
|
|
55
|
+
}
|
|
49
56
|
});
|
|
50
57
|
|
|
51
|
-
return
|
|
58
|
+
return (
|
|
59
|
+
<mesh
|
|
60
|
+
ref={meshRef}
|
|
61
|
+
position={position}
|
|
62
|
+
onPointerOver={() => setHovered(true)}
|
|
63
|
+
onPointerOut={() => setHovered(false)}
|
|
64
|
+
>
|
|
65
|
+
<boxGeometry args={[1, 1, 1]} />
|
|
66
|
+
<meshStandardMaterial color={hovered ? '#ff6b6b' : '#4ecdc4'} />
|
|
67
|
+
</mesh>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Instanced Mesh for Performance
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
function InstancedBoxes({ count = 1000 }: { count?: number }) {
|
|
76
|
+
const meshRef = useRef<THREE.InstancedMesh>(null);
|
|
77
|
+
const temp = useMemo(() => new THREE.Object3D(), []);
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
for (let i = 0; i < count; i++) {
|
|
81
|
+
temp.position.set(
|
|
82
|
+
(Math.random() - 0.5) * 50,
|
|
83
|
+
(Math.random() - 0.5) * 50,
|
|
84
|
+
(Math.random() - 0.5) * 50
|
|
85
|
+
);
|
|
86
|
+
temp.updateMatrix();
|
|
87
|
+
meshRef.current?.setMatrixAt(i, temp.matrix);
|
|
88
|
+
}
|
|
89
|
+
meshRef.current!.instanceMatrix.needsUpdate = true;
|
|
90
|
+
}, [count, temp]);
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<instancedMesh ref={meshRef} args={[undefined, undefined, count]}>
|
|
94
|
+
<boxGeometry args={[1, 1, 1]} />
|
|
95
|
+
<meshStandardMaterial />
|
|
96
|
+
</instancedMesh>
|
|
97
|
+
);
|
|
52
98
|
}
|
|
53
99
|
```
|
|
54
100
|
|
|
101
|
+
### Custom Shader Material
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
const GradientMaterial = shaderMaterial(
|
|
105
|
+
{ uTime: 0, uColorA: new THREE.Color('#ff6b6b'), uColorB: new THREE.Color('#4ecdc4') },
|
|
106
|
+
// Vertex shader
|
|
107
|
+
`varying vec2 vUv;
|
|
108
|
+
void main() {
|
|
109
|
+
vUv = uv;
|
|
110
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
111
|
+
}`,
|
|
112
|
+
// Fragment shader
|
|
113
|
+
`uniform float uTime;
|
|
114
|
+
uniform vec3 uColorA;
|
|
115
|
+
uniform vec3 uColorB;
|
|
116
|
+
varying vec2 vUv;
|
|
117
|
+
void main() {
|
|
118
|
+
vec3 color = mix(uColorA, uColorB, vUv.y + sin(uTime) * 0.1);
|
|
119
|
+
gl_FragColor = vec4(color, 1.0);
|
|
120
|
+
}`
|
|
121
|
+
);
|
|
122
|
+
extend({ GradientMaterial });
|
|
123
|
+
```
|
|
124
|
+
|
|
55
125
|
## Best Practices
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
126
|
+
|
|
127
|
+
| Do | Avoid |
|
|
128
|
+
|----|-------|
|
|
129
|
+
| Use React Three Fiber for React apps | Creating geometries/materials in render loops |
|
|
130
|
+
| Dispose geometries, materials, textures on unmount | Too many dynamic lights (limit to 3-4) |
|
|
131
|
+
| Use instancing for many identical objects | Skipping frustum culling in large scenes |
|
|
132
|
+
| Implement LOD for complex scenes | Uncompressed high-resolution textures |
|
|
133
|
+
| Cap pixel ratio at 2: `Math.min(window.devicePixelRatio, 2)` | Transparent materials unless necessary |
|
|
134
|
+
| Use compressed textures (KTX2, Basis) | Forgetting to update instanceMatrix after changes |
|
|
@@ -1,62 +1,223 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: JavaScript
|
|
2
|
+
name: Writing JavaScript
|
|
3
|
+
description: Writes modern JavaScript with ES2024+ features, async patterns, and functional programming. Use when building Node.js applications, implementing async workflows, or writing clean maintainable code.
|
|
4
|
+
category: languages
|
|
5
|
+
triggers:
|
|
6
|
+
- javascript
|
|
7
|
+
- js
|
|
8
|
+
- es6
|
|
9
|
+
- es2024
|
|
10
|
+
- ecmascript
|
|
11
|
+
- node
|
|
12
|
+
- nodejs
|
|
13
|
+
- npm
|
|
4
14
|
---
|
|
5
15
|
|
|
6
|
-
# JavaScript
|
|
16
|
+
# Writing JavaScript
|
|
7
17
|
|
|
8
|
-
##
|
|
18
|
+
## Quick Start
|
|
9
19
|
|
|
10
|
-
### Async/Await
|
|
11
20
|
```javascript
|
|
12
|
-
|
|
21
|
+
// Modern destructuring and spread
|
|
22
|
+
const { name, email, role = 'user' } = user;
|
|
23
|
+
const settings = { ...defaults, theme: 'dark' };
|
|
24
|
+
const [first, ...rest] = items;
|
|
25
|
+
|
|
26
|
+
// Optional chaining and nullish coalescing
|
|
27
|
+
const street = user?.address?.street ?? 'Unknown';
|
|
28
|
+
config.timeout ??= 5000;
|
|
29
|
+
|
|
30
|
+
// Async/await with error handling
|
|
31
|
+
async function fetchUser(id) {
|
|
13
32
|
try {
|
|
14
|
-
const response = await fetch(
|
|
15
|
-
|
|
16
|
-
return
|
|
33
|
+
const response = await fetch(`/api/users/${id}`);
|
|
34
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
35
|
+
return await response.json();
|
|
17
36
|
} catch (error) {
|
|
18
|
-
console.error('
|
|
37
|
+
console.error('Failed to fetch:', error);
|
|
19
38
|
throw error;
|
|
20
39
|
}
|
|
21
40
|
}
|
|
41
|
+
|
|
42
|
+
// Functional composition
|
|
43
|
+
const pipe = (...fns) => x => fns.reduce((acc, fn) => fn(acc), x);
|
|
44
|
+
const processData = pipe(filter(isValid), map(transform), reduce(aggregate, []));
|
|
22
45
|
```
|
|
23
46
|
|
|
24
|
-
|
|
47
|
+
## Features
|
|
48
|
+
|
|
49
|
+
| Feature | Description | Guide |
|
|
50
|
+
|---------|-------------|-------|
|
|
51
|
+
| Destructuring | Extract values from objects and arrays | Use `const { a, b } = obj` or `const [x, y] = arr` |
|
|
52
|
+
| Spread Operator | Expand iterables and merge objects | Use `...` for shallow copies and merging |
|
|
53
|
+
| Optional Chaining | Safe property access on nullable values | Use `?.` to avoid "cannot read property" errors |
|
|
54
|
+
| Nullish Coalescing | Default values for null/undefined only | Use `??` instead of `\|\|` for falsy values |
|
|
55
|
+
| Async/Await | Clean asynchronous code flow | Use try/catch for error handling |
|
|
56
|
+
| Promise Methods | Parallel and conditional execution | Use all, allSettled, race, any for concurrency |
|
|
57
|
+
| Array Methods | Functional array transformations | Use map, filter, reduce, find, at, toSorted |
|
|
58
|
+
| Classes | Object-oriented patterns with private fields | Use # prefix for truly private members |
|
|
59
|
+
| Modules | ESM import/export for code organization | Use named exports and barrel files |
|
|
60
|
+
| Iterators | Custom iteration with generators | Use function* and for...of loops |
|
|
61
|
+
|
|
62
|
+
## Common Patterns
|
|
63
|
+
|
|
64
|
+
### Async Patterns with Concurrency Control
|
|
65
|
+
|
|
25
66
|
```javascript
|
|
26
|
-
|
|
27
|
-
const [
|
|
28
|
-
|
|
67
|
+
// Parallel execution
|
|
68
|
+
const [user, posts] = await Promise.all([fetchUser(id), fetchPosts(id)]);
|
|
69
|
+
|
|
70
|
+
// Handle mixed success/failure
|
|
71
|
+
const results = await Promise.allSettled(ids.map(fetchUser));
|
|
72
|
+
const successful = results.filter(r => r.status === 'fulfilled').map(r => r.value);
|
|
73
|
+
const failed = results.filter(r => r.status === 'rejected').map(r => r.reason);
|
|
74
|
+
|
|
75
|
+
// Retry with exponential backoff
|
|
76
|
+
async function withRetry(fn, maxRetries = 3, baseDelay = 1000) {
|
|
77
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
78
|
+
try {
|
|
79
|
+
return await fn();
|
|
80
|
+
} catch (error) {
|
|
81
|
+
if (attempt === maxRetries - 1) throw error;
|
|
82
|
+
await new Promise(r => setTimeout(r, baseDelay * Math.pow(2, attempt)));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Concurrent execution with limit
|
|
88
|
+
async function mapConcurrent(items, fn, limit = 5) {
|
|
89
|
+
const results = [];
|
|
90
|
+
const executing = new Set();
|
|
91
|
+
for (const item of items) {
|
|
92
|
+
const promise = fn(item).then(r => { executing.delete(promise); return r; });
|
|
93
|
+
executing.add(promise);
|
|
94
|
+
results.push(promise);
|
|
95
|
+
if (executing.size >= limit) await Promise.race(executing);
|
|
96
|
+
}
|
|
97
|
+
return Promise.all(results);
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Functional Programming Utilities
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
// Currying
|
|
105
|
+
const curry = fn => function curried(...args) {
|
|
106
|
+
return args.length >= fn.length ? fn(...args) : (...next) => curried(...args, ...next);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// Memoization
|
|
110
|
+
const memoize = fn => {
|
|
111
|
+
const cache = new Map();
|
|
112
|
+
return (...args) => {
|
|
113
|
+
const key = JSON.stringify(args);
|
|
114
|
+
if (!cache.has(key)) cache.set(key, fn(...args));
|
|
115
|
+
return cache.get(key);
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// Immutable updates
|
|
120
|
+
const updateUser = (user, updates) => ({ ...user, ...updates, updatedAt: new Date() });
|
|
121
|
+
const addItem = (arr, item) => [...arr, item];
|
|
122
|
+
const removeAt = (arr, i) => [...arr.slice(0, i), ...arr.slice(i + 1)];
|
|
29
123
|
```
|
|
30
124
|
|
|
31
|
-
###
|
|
125
|
+
### Error Handling with Result Type
|
|
126
|
+
|
|
32
127
|
```javascript
|
|
33
|
-
|
|
34
|
-
|
|
128
|
+
class Result {
|
|
129
|
+
constructor(value, error) { this.value = value; this.error = error; }
|
|
130
|
+
static ok(value) { return new Result(value, null); }
|
|
131
|
+
static err(error) { return new Result(null, error); }
|
|
132
|
+
isOk() { return this.error === null; }
|
|
133
|
+
map(fn) { return this.isOk() ? Result.ok(fn(this.value)) : this; }
|
|
134
|
+
unwrapOr(defaultValue) { return this.isOk() ? this.value : defaultValue; }
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async function safeFetch(url) {
|
|
138
|
+
try {
|
|
139
|
+
const res = await fetch(url);
|
|
140
|
+
if (!res.ok) return Result.err(new Error(`HTTP ${res.status}`));
|
|
141
|
+
return Result.ok(await res.json());
|
|
142
|
+
} catch (e) { return Result.err(e); }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Usage
|
|
146
|
+
const result = await safeFetch('/api/data');
|
|
147
|
+
const data = result.map(d => d.items).unwrapOr([]);
|
|
35
148
|
```
|
|
36
149
|
|
|
37
|
-
###
|
|
150
|
+
### Event Emitter Pattern
|
|
151
|
+
|
|
38
152
|
```javascript
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
153
|
+
class EventEmitter {
|
|
154
|
+
constructor() { this.events = new Map(); }
|
|
155
|
+
|
|
156
|
+
on(event, listener) {
|
|
157
|
+
if (!this.events.has(event)) this.events.set(event, new Set());
|
|
158
|
+
this.events.get(event).add(listener);
|
|
159
|
+
return () => this.off(event, listener);
|
|
160
|
+
}
|
|
42
161
|
|
|
43
|
-
|
|
44
|
-
|
|
162
|
+
off(event, listener) { this.events.get(event)?.delete(listener); }
|
|
163
|
+
|
|
164
|
+
emit(event, ...args) {
|
|
165
|
+
this.events.get(event)?.forEach(listener => listener(...args));
|
|
166
|
+
}
|
|
45
167
|
|
|
46
|
-
|
|
47
|
-
|
|
168
|
+
once(event, listener) {
|
|
169
|
+
const wrapper = (...args) => { listener(...args); this.off(event, wrapper); };
|
|
170
|
+
return this.on(event, wrapper);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
48
173
|
```
|
|
49
174
|
|
|
50
|
-
###
|
|
175
|
+
### Modern Collection Usage
|
|
176
|
+
|
|
51
177
|
```javascript
|
|
52
|
-
|
|
53
|
-
const
|
|
178
|
+
// Map for key-value with any type keys
|
|
179
|
+
const cache = new Map();
|
|
180
|
+
cache.set(userObj, 'data'); // Object as key
|
|
181
|
+
for (const [key, value] of cache) { /* iterate */ }
|
|
182
|
+
|
|
183
|
+
// Set for unique values and operations
|
|
184
|
+
const setA = new Set([1, 2, 3]);
|
|
185
|
+
const setB = new Set([2, 3, 4]);
|
|
186
|
+
const union = new Set([...setA, ...setB]);
|
|
187
|
+
const intersection = new Set([...setA].filter(x => setB.has(x)));
|
|
188
|
+
|
|
189
|
+
// WeakMap for private data without memory leaks
|
|
190
|
+
const privateData = new WeakMap();
|
|
191
|
+
class Secret {
|
|
192
|
+
constructor(value) { privateData.set(this, { value }); }
|
|
193
|
+
getValue() { return privateData.get(this).value; }
|
|
194
|
+
}
|
|
54
195
|
```
|
|
55
196
|
|
|
56
197
|
## Best Practices
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
198
|
+
|
|
199
|
+
| Do | Avoid |
|
|
200
|
+
|----|-------|
|
|
201
|
+
| Use `const` by default, `let` only when needed | Using `var` for variable declarations |
|
|
202
|
+
| Use `===` for strict equality comparisons | Using `==` which allows type coercion |
|
|
203
|
+
| Use async/await over raw promise chains | Deep nesting with .then() callbacks |
|
|
204
|
+
| Use optional chaining for safe property access | Manual null checks at every level |
|
|
205
|
+
| Use destructuring for cleaner parameter extraction | Accessing object properties repeatedly |
|
|
206
|
+
| Use template literals for string interpolation | String concatenation with + |
|
|
207
|
+
| Use arrow functions for callbacks | Using function expressions for simple callbacks |
|
|
208
|
+
| Handle promise rejections explicitly | Ignoring unhandled rejection warnings |
|
|
209
|
+
| Use modules (ESM) for code organization | Polluting the global namespace |
|
|
210
|
+
| Write pure functions when possible | Functions with hidden side effects |
|
|
211
|
+
|
|
212
|
+
## Related Skills
|
|
213
|
+
|
|
214
|
+
- **typescript** - Type-safe JavaScript development
|
|
215
|
+
- **nodejs** - Server-side JavaScript runtime
|
|
216
|
+
- **react** - JavaScript UI framework
|
|
217
|
+
|
|
218
|
+
## References
|
|
219
|
+
|
|
220
|
+
- [MDN JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide)
|
|
221
|
+
- [ECMAScript Specification](https://tc39.es/ecma262/)
|
|
222
|
+
- [JavaScript Info](https://javascript.info/)
|
|
223
|
+
- [Node.js Documentation](https://nodejs.org/docs/)
|
|
@@ -1,34 +1,102 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: brainstorming
|
|
3
|
-
description:
|
|
2
|
+
name: brainstorming-ideas
|
|
3
|
+
description: AI agent generates diverse solutions through structured divergent thinking and systematic exploration frameworks. Use when exploring options, solving problems creatively, or generating alternatives.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Brainstorming
|
|
7
|
-
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
1.
|
|
32
|
-
2.
|
|
33
|
-
3.
|
|
6
|
+
# Brainstorming Ideas
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
1. **Diverge** (20 min) - Generate 20+ ideas with no judgment
|
|
11
|
+
2. **Explore** (10 min) - Combine, connect, flesh out themes
|
|
12
|
+
3. **Converge** (15 min) - Evaluate against criteria, prioritize
|
|
13
|
+
4. **Select** - Pick top 3 with clear rationale
|
|
14
|
+
5. **Document** - Capture all ideas and decisions for future reference
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
| Feature | Description | Guide |
|
|
19
|
+
|---------|-------------|-------|
|
|
20
|
+
| Divergent Phase | Generate many options | Quantity over quality, no judgment |
|
|
21
|
+
| SCAMPER | Systematic modification | Substitute, Combine, Adapt, Modify, Put to use, Eliminate, Reverse |
|
|
22
|
+
| Mind Mapping | Visual connections | Central topic with branching ideas |
|
|
23
|
+
| Reverse Brainstorm | Learn from failure | "How to guarantee failure?" -> prevention |
|
|
24
|
+
| Role Storming | Different perspectives | Junior dev, security expert, user personas |
|
|
25
|
+
| Starbursting | Question-based | Who, What, When, Where, Why, How |
|
|
26
|
+
|
|
27
|
+
## Common Patterns
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# Divergent Phase Rules
|
|
31
|
+
1. Quantity over quality - aim for 20+ ideas
|
|
32
|
+
2. No judgment - all ideas valid
|
|
33
|
+
3. Wild ideas welcome - sparks creativity
|
|
34
|
+
4. Build on others - "Yes, and..."
|
|
35
|
+
5. Time-box - prevent over-analysis
|
|
36
|
+
|
|
37
|
+
# SCAMPER Framework
|
|
38
|
+
S - SUBSTITUTE: Different tech stack? Team structure?
|
|
39
|
+
C - COMBINE: Merge features? Hybrid approaches?
|
|
40
|
+
A - ADAPT: From other industries? Products?
|
|
41
|
+
M - MODIFY/MAGNIFY: Bigger/smaller? Faster/slower?
|
|
42
|
+
P - PUT TO OTHER USES: Different users? Problems?
|
|
43
|
+
E - ELIMINATE: Remove features? Simplify?
|
|
44
|
+
R - REVERSE: Opposite approach? Different order?
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
# Reverse Brainstorm
|
|
49
|
+
Goal: Build reliable API
|
|
50
|
+
Reversed: How to make MOST unreliable API?
|
|
51
|
+
|
|
52
|
+
| Failure Idea | Prevention Strategy |
|
|
53
|
+
|--------------|---------------------|
|
|
54
|
+
| No error handling | Comprehensive try/catch |
|
|
55
|
+
| Single point of failure | Redundancy, load balancing |
|
|
56
|
+
| No monitoring | Prometheus + Grafana |
|
|
57
|
+
| Deploy on Fridays | Change freeze policies |
|
|
58
|
+
|
|
59
|
+
# Prioritization Matrix
|
|
60
|
+
| Idea | Impact | Effort | Score | Priority |
|
|
61
|
+
|------|--------|--------|-------|----------|
|
|
62
|
+
| A | High | Low | 9 | 1st |
|
|
63
|
+
| B | High | High | 6 | 3rd |
|
|
64
|
+
| C | Medium | Low | 7 | 2nd |
|
|
65
|
+
```
|
|
66
|
+
|
|
34
67
|
```
|
|
68
|
+
# Role Storming Perspectives
|
|
69
|
+
TECHNICAL:
|
|
70
|
+
- Junior Dev: "What's confusing?"
|
|
71
|
+
- Security Expert: "What vulnerabilities?"
|
|
72
|
+
- DevOps: "How to deploy/monitor?"
|
|
73
|
+
|
|
74
|
+
USER:
|
|
75
|
+
- Power User: "Advanced features needed?"
|
|
76
|
+
- New User: "Is this intuitive?"
|
|
77
|
+
- Frustrated User: "What's annoying?"
|
|
78
|
+
|
|
79
|
+
EXTERNAL:
|
|
80
|
+
- Competitor: "How would we copy this?"
|
|
81
|
+
- Hacker: "How to exploit this?"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Best Practices
|
|
85
|
+
|
|
86
|
+
| Do | Avoid |
|
|
87
|
+
|----|-------|
|
|
88
|
+
| Set clear time limits per phase | Judging ideas during divergent phase |
|
|
89
|
+
| Capture ALL ideas, even "bad" ones | Letting dominant voices control |
|
|
90
|
+
| Build on others' ideas with "Yes, and..." | Skipping exploration phase |
|
|
91
|
+
| Use visual tools (mind maps, boards) | Converging too early |
|
|
92
|
+
| Vote anonymously to avoid groupthink | Brainstorming without clear goal |
|
|
93
|
+
| Follow up with action items | Abandoning ideas without evaluation |
|
|
94
|
+
| Mix individual and group ideation | Sessions over 60 minutes |
|
|
95
|
+
| Create safety for wild ideas | Forgetting to capture reasoning |
|
|
96
|
+
|
|
97
|
+
## Related Skills
|
|
98
|
+
|
|
99
|
+
- `thinking-sequentially` - Structure exploration
|
|
100
|
+
- `writing-plans` - Turn ideas into plans
|
|
101
|
+
- `solving-problems` - Generate solution hypotheses
|
|
102
|
+
- `dispatching-parallel-agents` - Parallel idea exploration
|