@skilly-hand/skilly-hand 0.25.3 → 0.26.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/catalog/README.md +4 -3
  3. package/catalog/catalog-index.json +1 -0
  4. package/catalog/skills/angular-guidelines/SKILL.md +44 -8
  5. package/catalog/skills/angular-guidelines/agents/angular-tester.md +13 -3
  6. package/catalog/skills/angular-guidelines/agents/component-creator.md +13 -0
  7. package/catalog/skills/angular-guidelines/agents/performance-reviewer.md +62 -0
  8. package/catalog/skills/angular-guidelines/manifest.json +9 -7
  9. package/catalog/skills/frontend-design/SKILL.md +20 -11
  10. package/catalog/skills/frontend-design/agents/critique.md +190 -0
  11. package/catalog/skills/frontend-design/agents/motion-designer.md +18 -1
  12. package/catalog/skills/frontend-design/manifest.json +17 -8
  13. package/catalog/skills/gsap-animation/SKILL.md +149 -0
  14. package/catalog/skills/gsap-animation/manifest.json +30 -0
  15. package/catalog/skills/gsap-animation/references/core-patterns.md +61 -0
  16. package/catalog/skills/gsap-animation/references/official-source-map.md +31 -0
  17. package/catalog/skills/gsap-animation/references/performance-accessibility.md +61 -0
  18. package/catalog/skills/gsap-animation/references/plugin-selection.md +42 -0
  19. package/catalog/skills/gsap-animation/references/react-patterns.md +59 -0
  20. package/catalog/skills/gsap-animation/references/scrolltrigger-patterns.md +61 -0
  21. package/catalog/skills/react-guidelines/SKILL.md +32 -7
  22. package/catalog/skills/react-guidelines/agents/component-creator.md +12 -0
  23. package/catalog/skills/react-guidelines/agents/performance-reviewer.md +55 -0
  24. package/catalog/skills/react-guidelines/agents/react-tester.md +11 -0
  25. package/catalog/skills/react-guidelines/manifest.json +9 -7
  26. package/package.json +1 -1
  27. package/packages/catalog/package.json +1 -1
  28. package/packages/cli/package.json +1 -1
  29. package/packages/core/package.json +1 -1
  30. package/packages/core/src/index.js +25 -2
  31. package/packages/detectors/package.json +1 -1
  32. package/packages/detectors/src/index.js +9 -0
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: "react-guidelines"
3
- description: "Guide React code generation and review using latest stable React verification and modern framework best practices."
3
+ description: "Guide React and Next.js code generation, review, and performance tuning using latest stable React verification and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing React code artifacts in React projects."
4
4
  skillMetadata:
5
5
  author: "skilly-hand"
6
- last-edit: "2026-04-04"
6
+ last-edit: "2026-05-01"
7
7
  license: "Apache-2.0"
8
- version: "1.0.0"
9
- changelog: "Added new react-guidelines skill with component and testing sub-agent routing; improves React-specific generation and review consistency with latest-stable preflight checks; affects portable catalog skill discovery and React workflow guidance"
10
- auto-invoke: "Generating, reviewing, or refactoring React code artifacts in React projects"
8
+ version: "1.1.0"
9
+ changelog: "Added curated Vercel-style React and Next.js performance review guidance with a dedicated performance-reviewer mode; improves async, bundle, server, client data, and rendering optimization coverage; affects react-guidelines routing, review checklists, and catalog discovery"
10
+ auto-invoke: "Generating, reviewing, refactoring, or optimizing React code artifacts in React projects"
11
11
  allowed-tools:
12
12
  - "Read"
13
13
  - "Edit"
@@ -29,6 +29,7 @@ Use this skill when:
29
29
  - You are generating React components, hooks, or supporting modules.
30
30
  - You are refactoring existing React code to current framework patterns.
31
31
  - You are reviewing React code quality and framework-alignment in a React workspace.
32
+ - You are optimizing React or Next.js behavior around async work, bundle size, data fetching, server/client boundaries, or rendering cost.
32
33
 
33
34
  Do not use this skill for:
34
35
 
@@ -46,6 +47,7 @@ Choose sub-agents by intent:
46
47
  | --- | --- |
47
48
  | Create, refactor, or review React components | [agents/component-creator.md](agents/component-creator.md) |
48
49
  | Write or review React tests | [agents/react-tester.md](agents/react-tester.md) |
50
+ | Optimize or review React/Next.js performance | [agents/performance-reviewer.md](agents/performance-reviewer.md) |
49
51
 
50
52
  ---
51
53
 
@@ -53,7 +55,8 @@ Choose sub-agents by intent:
53
55
 
54
56
  1. Run latest stable React preflight checks.
55
57
  2. Route to the smallest matching sub-agent by task intent.
56
- 3. Apply the sub-agent checklist before finalizing generated code or review output.
58
+ 3. If the request mentions performance, Next.js, data fetching, server/client boundaries, bundles, or re-renders, include the performance priority checklist.
59
+ 4. Apply the sub-agent checklist before finalizing generated code or review output.
57
60
 
58
61
  ---
59
62
 
@@ -94,6 +97,22 @@ Use these defaults unless project constraints explicitly prevent them:
94
97
  - Keep state minimal and colocated near usage.
95
98
  - For component-specific work, apply [agents/component-creator.md](agents/component-creator.md).
96
99
  - For testing-specific work, apply [agents/react-tester.md](agents/react-tester.md).
100
+ - For performance-specific work, apply [agents/performance-reviewer.md](agents/performance-reviewer.md).
101
+
102
+ ### Pattern 4: Performance Review Priority
103
+
104
+ Use this Vercel-style priority order for React and Next.js performance review. Start with the highest-impact item that applies to the request; do not add complexity for hypothetical bottlenecks.
105
+
106
+ | Priority | Review Focus | Default Action |
107
+ | --- | --- | --- |
108
+ | 1 | Eliminating waterfalls | Start independent promises early, defer awaits until values are needed, and use `Promise.all` for independent async work. |
109
+ | 2 | Bundle size optimization | Avoid problematic barrel imports unless tooling optimizes them, dynamically import heavy or client-only modules, and defer third-party libraries. |
110
+ | 3 | Server-side performance | Authenticate server actions, avoid shared request state, minimize client-component serialization, and use per-request dedupe where applicable. |
111
+ | 4 | Client-side data fetching | Dedupe repeated requests, keep global listeners passive and cleaned up, and keep browser storage minimal and versioned. |
112
+ | 5 | Re-render optimization | Derive state during render, avoid redundant state, keep non-primitive defaults stable, and memoize only when it removes measured churn. |
113
+ | 6 | Rendering performance | Split expensive work, place Suspense boundaries around meaningful async UI, and use transitions/deferred values for user-visible responsiveness. |
114
+ | 7 | JavaScript performance | Keep hot-path work small, avoid repeated parsing or allocation in render paths, and prefer platform APIs over bulky helpers where practical. |
115
+ | 8 | Advanced patterns | Use virtualization, streaming, caching, or compiler-aware patterns only when the project stack and bottleneck justify them. |
97
116
 
98
117
  ---
99
118
 
@@ -113,8 +132,12 @@ Is this a refactor task?
113
132
  NO -> Continue
114
133
 
115
134
  Is this a review task?
116
- YES -> Validate latest-stable alignment + hook/purity checklist
135
+ YES -> Validate latest-stable alignment + hook/purity/performance checklist
117
136
  NO -> Apply the minimal React guidance needed for the request
137
+
138
+ Does the task mention performance, Next.js, data fetching, bundles, RSC, or re-renders?
139
+ YES -> Route through performance-reviewer before finalizing
140
+ NO -> Keep the existing component/test route
118
141
  ```
119
142
 
120
143
  ---
@@ -170,6 +193,7 @@ export function UserPanelClient({ name }: { name: string }) {
170
193
  - Hooks follow call-order rules and purity constraints.
171
194
  - `'use client'`/`'use server'` directives are only used where boundary semantics require them.
172
195
  - Suspense/StrictMode/Profiler guidance is considered when relevant to behavior.
196
+ - Performance work follows the priority order from waterfalls through advanced patterns and avoids speculative optimization.
173
197
 
174
198
  ---
175
199
 
@@ -208,3 +232,4 @@ npm run catalog:check
208
232
  - StrictMode: https://react.dev/reference/react/StrictMode
209
233
  - Fragment: https://react.dev/reference/react/Fragment
210
234
  - Profiler: https://react.dev/reference/react/Profiler
235
+ - Vercel Labs React best practices skill: https://github.com/vercel-labs/agent-skills/tree/main/skills/react-best-practices
@@ -28,6 +28,17 @@ Do not use this sub-agent for:
28
28
 
29
29
  ---
30
30
 
31
+ ## Performance Checklist
32
+
33
+ - Do not define child components inside render; move them to module scope unless they truly need closure state.
34
+ - Do not store redundant derived state; derive from props/state during render.
35
+ - Avoid unnecessary Effects for synchronous derivation or event handling.
36
+ - Keep default non-primitive props stable by defining fallback arrays/objects/functions at module scope.
37
+ - Use Suspense, transitions, deferred values, and memoization only when they improve a real user-visible or measured bottleneck.
38
+ - In Next.js, keep client components narrow and pass only serializable data across server/client boundaries.
39
+
40
+ ---
41
+
31
42
  ## Template Snippets
32
43
 
33
44
  ### Minimal Pure Function Component
@@ -86,3 +97,4 @@ export function ProfileSection() {
86
97
  - Composition is preferred over inheritance or over-abstraction.
87
98
  - Client/server boundary directives are correctly scoped.
88
99
  - Accessibility semantics are present for interactive controls.
100
+ - Component shape avoids preventable re-renders, redundant state, and unstable default values.
@@ -0,0 +1,55 @@
1
+ # React Performance Reviewer
2
+
3
+ ## When to Use
4
+
5
+ Use this sub-agent when:
6
+
7
+ - Reviewing or improving React or Next.js performance.
8
+ - Working on async data fetching, Suspense, streaming, server actions, RSC boundaries, bundle size, or client/server splits.
9
+ - Investigating avoidable re-renders, slow interactions, heavy imports, or expensive render-time JavaScript.
10
+
11
+ Do not use this sub-agent for:
12
+
13
+ - Pure test-only tasks without performance behavior.
14
+ - Non-React frontend performance work.
15
+ - Speculative rewrites where no user-visible or measured bottleneck exists.
16
+
17
+ ---
18
+
19
+ ## Priority Checklist
20
+
21
+ Work from highest impact to lowest. Stop once the request is solved; do not add unrelated optimizations.
22
+
23
+ | Priority | Focus | Checks |
24
+ | --- | --- | --- |
25
+ | 1 | Eliminating waterfalls | Start independent async work before awaiting dependencies; use `Promise.all` for independent requests; fetch at the highest useful boundary. |
26
+ | 2 | Bundle size optimization | Avoid unoptimized barrel imports; dynamically import heavy/client-only code; defer analytics, editors, charts, maps, and other third-party libraries. |
27
+ | 3 | Server-side performance | Authenticate server actions; avoid module-level mutable request state; minimize serialized props sent to client components; dedupe per request where supported. |
28
+ | 4 | Client-side data fetching | Dedupe repeated requests; cancel or ignore stale async work; clean up global listeners; keep passive listeners passive; keep browser storage minimal and versioned. |
29
+ | 5 | Re-render optimization | Remove redundant derived state; avoid nested component definitions; stabilize non-primitive defaults; use `memo`, `useMemo`, and `useCallback` only for proven churn. |
30
+ | 6 | Rendering performance | Split expensive UI; use Suspense boundaries with meaningful fallbacks; use transitions or deferred values for responsiveness during expensive updates. |
31
+ | 7 | JavaScript performance | Move expensive parsing/allocation out of render hot paths; prefer smaller platform APIs over bulky helpers; avoid repeated work in loops and render paths. |
32
+ | 8 | Advanced patterns | Add virtualization, streaming, caching layers, compiler-aware patterns, or worker offloading only when the project stack and bottleneck justify them. |
33
+
34
+ ---
35
+
36
+ ## Next.js Guardrails
37
+
38
+ - Keep server components as the default for data-heavy UI; add `'use client'` only for interactivity or browser-only APIs.
39
+ - Treat server actions as public endpoints: validate input, authenticate/authorize, and avoid leaking server-only data to client props.
40
+ - Keep request-specific state inside the request scope; do not store user/session/request data in shared module variables.
41
+ - Pass compact, serializable props from server to client components.
42
+ - Prefer framework-supported request caching and dedupe over ad hoc global caches.
43
+
44
+ ---
45
+
46
+ ## Review Output
47
+
48
+ When reviewing performance, report:
49
+
50
+ 1. Highest-impact issue first, tied to the priority checklist.
51
+ 2. Concrete code-level recommendation using existing project patterns.
52
+ 3. Expected user-visible or measurable benefit.
53
+ 4. Verification path: profiler trace, bundle analyzer, network waterfall, targeted test, or existing project command.
54
+
55
+ If no meaningful performance issue is found, say so and avoid inventing speculative work.
@@ -33,6 +33,16 @@ Do not use this sub-agent for:
33
33
 
34
34
  ---
35
35
 
36
+ ## Performance-Sensitive Test Patterns
37
+
38
+ - Assert user-visible async states instead of timing or scheduler internals.
39
+ - Cover Suspense fallback and resolved UI when the component owns a meaningful async boundary.
40
+ - Test deduped fetch or request behavior only when the project already exposes a stable cache/dedupe contract.
41
+ - For transitions and deferred values, assert responsiveness and final visible output, not React implementation details.
42
+ - Avoid tests that lock in incidental render counts unless render count is the public performance contract.
43
+
44
+ ---
45
+
36
46
  ## Command Matrix
37
47
 
38
48
  | Scenario | Preferred Command | Fallback |
@@ -108,4 +118,5 @@ it("shows fallback before async content resolves", () => {
108
118
  - `act`-safe patterns are preserved for stateful and async updates.
109
119
  - Assertions validate user-visible behavior and contracts.
110
120
  - Suspense/transition scenarios are tested where relevant.
121
+ - Performance-sensitive tests avoid scheduler internals and incidental render-count assertions.
111
122
  - Mocks are limited to necessary boundaries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "react-guidelines",
3
3
  "title": "React Guidelines",
4
- "description": "Guide React code generation and review using latest stable React verification and modern framework best practices.",
4
+ "description": "Guide React and Next.js code generation, review, and performance tuning using latest stable React verification and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing React code artifacts in React projects.",
5
5
  "portable": true,
6
6
  "tags": ["react", "frontend", "workflow", "best-practices"],
7
7
  "detectors": ["react"],
@@ -10,14 +10,15 @@
10
10
  "agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
11
11
  "skillMetadata": {
12
12
  "author": "skilly-hand",
13
- "last-edit": "2026-04-04",
13
+ "last-edit": "2026-05-01",
14
14
  "license": "Apache-2.0",
15
- "version": "1.0.0",
16
- "changelog": "Added new react-guidelines skill with component and testing sub-agent routing; improves React-specific generation and review consistency with latest-stable preflight checks; affects portable catalog skill discovery and React workflow guidance",
17
- "auto-invoke": "Generating, reviewing, or refactoring React code artifacts in React projects",
15
+ "version": "1.1.0",
16
+ "changelog": "Added curated Vercel-style React and Next.js performance review guidance with a dedicated performance-reviewer mode; improves async, bundle, server, client data, and rendering optimization coverage; affects react-guidelines routing, review checklists, and catalog discovery",
17
+ "auto-invoke": "Generating, reviewing, refactoring, or optimizing React code artifacts in React projects",
18
18
  "allowed-modes": [
19
19
  "component-creator",
20
- "react-tester"
20
+ "react-tester",
21
+ "performance-reviewer"
21
22
  ],
22
23
  "allowed-tools": [
23
24
  "Read",
@@ -35,7 +36,8 @@
35
36
  "files": [
36
37
  { "path": "SKILL.md", "kind": "instruction" },
37
38
  { "path": "agents/component-creator.md", "kind": "instruction" },
38
- { "path": "agents/react-tester.md", "kind": "instruction" }
39
+ { "path": "agents/react-tester.md", "kind": "instruction" },
40
+ { "path": "agents/performance-reviewer.md", "kind": "instruction" }
39
41
  ],
40
42
  "dependencies": []
41
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/skilly-hand",
3
- "version": "0.25.3",
3
+ "version": "0.26.1",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/catalog",
3
- "version": "0.25.3",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/cli",
3
- "version": "0.25.3",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/core",
3
- "version": "0.25.3",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -269,6 +269,26 @@ function parseSkillIds(input) {
269
269
  return uniq((input || []).flatMap((value) => String(value).split(",")).map((value) => value.trim()).filter(Boolean));
270
270
  }
271
271
 
272
+ function expandSkillDependencies({ catalog, skillIds }) {
273
+ const byId = new Map(catalog.filter((skill) => skill.portable).map((skill) => [skill.id, skill]));
274
+ const expanded = new Set(skillIds);
275
+ const pending = [...skillIds];
276
+
277
+ while (pending.length > 0) {
278
+ const skillId = pending.pop();
279
+ const skill = byId.get(skillId);
280
+ if (!skill || !Array.isArray(skill.dependencies)) continue;
281
+
282
+ for (const dependencyId of skill.dependencies) {
283
+ if (!byId.has(dependencyId) || expanded.has(dependencyId)) continue;
284
+ expanded.add(dependencyId);
285
+ pending.push(dependencyId);
286
+ }
287
+ }
288
+
289
+ return expanded;
290
+ }
291
+
272
292
  export function resolveSkillSelectionByIds({ catalog, selectedSkillIds = [] }) {
273
293
  const ids = parseSkillIds(selectedSkillIds);
274
294
  const portableById = new Map(
@@ -293,7 +313,9 @@ export function resolveSkillSelectionByIds({ catalog, selectedSkillIds = [] }) {
293
313
  throw new Error(invalid.join("; "));
294
314
  }
295
315
 
296
- return ids.map((id) => portableById.get(id)).sort((a, b) => a.id.localeCompare(b.id));
316
+ const expanded = expandSkillDependencies({ catalog, skillIds: ids });
317
+
318
+ return [...expanded].map((id) => portableById.get(id)).sort((a, b) => a.id.localeCompare(b.id));
297
319
  }
298
320
 
299
321
  export function resolveSkillSelection({ catalog, detections, includeTags = [], excludeTags = [] }) {
@@ -306,7 +328,8 @@ export function resolveSkillSelection({ catalog, detections, includeTags = [], e
306
328
  }
307
329
  }
308
330
 
309
- let selected = catalog.filter((skill) => requested.has(skill.id) && skill.portable);
331
+ const expanded = expandSkillDependencies({ catalog, skillIds: [...requested] });
332
+ let selected = catalog.filter((skill) => expanded.has(skill.id) && skill.portable);
310
333
 
311
334
  if (includeTags.length > 0) {
312
335
  selected = selected.filter((skill) => includeTags.every((tag) => skill.tags.includes(tag)));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/detectors",
3
- "version": "0.25.3",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -187,6 +187,15 @@ export async function detectProject(cwd) {
187
187
  });
188
188
  }
189
189
 
190
+ if ("gsap" in deps || "@gsap/react" in deps) {
191
+ addDetection(results, {
192
+ technology: "gsap",
193
+ confidence: 0.95,
194
+ reasons: ['Dependency "gsap" or "@gsap/react" found in package.json'],
195
+ recommendedSkillIds: ["gsap-animation"]
196
+ });
197
+ }
198
+
190
199
  return results.sort((a, b) => b.confidence - a.confidence || a.technology.localeCompare(b.technology));
191
200
  }
192
201