@skilly-hand/skilly-hand 0.25.3 → 0.26.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/CHANGELOG.md CHANGED
@@ -16,6 +16,21 @@ All notable changes to this project are documented in this file.
16
16
  ### Removed
17
17
  - _None._
18
18
 
19
+ ## [0.26.0] - 2026-05-01
20
+ [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.26.0)
21
+
22
+ ### Added
23
+ - Added dedicated performance-reviewer modes for the Angular and React guideline skills.
24
+
25
+ ### Changed
26
+ - Expanded Angular and React guideline routing, review checklists, and catalog descriptions for performance optimization workflows.
27
+
28
+ ### Fixed
29
+ - _None._
30
+
31
+ ### Removed
32
+ - _None._
33
+
19
34
  ## [0.25.3] - 2026-05-01
20
35
  [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.25.3)
21
36
 
package/catalog/README.md CHANGED
@@ -6,13 +6,13 @@ Published portable skills consumed by the `skilly-hand` CLI.
6
6
  | ----- | ----------- | ---- | ------------ |
7
7
  | `accessibility-audit` | Audit web accessibility against W3C WCAG 2.2 Level AA using framework-agnostic checks, remediation patterns, and portable command-line scanning. | frontend, accessibility, workflow, quality | all |
8
8
  | `agents-root-orchestrator` | Author root AGENTS.md as a Where/What/When orchestrator that routes tasks and skill invocation clearly. | core, workflow, orchestration | all |
9
- | `angular-guidelines` | Guide Angular code generation and review using latest stable Angular verification and modern framework best practices. | angular, frontend, workflow, best-practices | all |
9
+ | `angular-guidelines` | Guide Angular code generation, review, and performance tuning using latest stable Angular verification, official Angular skill guidance, and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects. | angular, frontend, workflow, best-practices | all |
10
10
  | `figma-mcp-0to1` | Guide users from Figma MCP installation and authentication through first canvas creation, with function-level tool coverage and operational recovery patterns. | figma, mcp, workflow, design | all |
11
11
  | `frontend-design` | Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases. | frontend, design, workflow, ui, motion, greenfield | all |
12
12
  | `output-optimizer` | Optimize output token consumption through compact interpreter modes with controlled expansion when complexity, ambiguity, or risk requires more detail. Trigger: minimizing response verbosity while preserving clarity and correctness. | core, workflow, efficiency, communication | all |
13
13
  | `project-security` | Scan project configuration and release surfaces for leak and security risks, and enforce security gates on commit, push, and publish workflows across GitHub, GitLab, npm, pnpm, yarn, and generic CI. Trigger: validating repository security posture, preventing secret leaks, or hardening delivery pipelines. | security, workflow, quality, core | all |
14
14
  | `project-teacher` | Scan the active project and teach any concept, code path, or decision using verified information, interactive questions, and simple explanations. Trigger: user asks to explain, understand, clarify, or learn about anything in the project or codebase. | core, workflow, education | all |
15
- | `react-guidelines` | Guide React code generation and review using latest stable React verification and modern framework best practices. | react, frontend, workflow, best-practices | all |
15
+ | `react-guidelines` | 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. | react, frontend, workflow, best-practices | all |
16
16
  | `review-rangers` | Review code, decisions, and artifacts through a multi-perspective committee and a domain expert safety guard, then synthesize a structured verdict. | core, workflow, review, quality | all |
17
17
  | `roaster` | Challenge plans with constructive roast-style critique that exposes weak assumptions, missing angles, shallow sequencing, and unclear success criteria. Trigger: when the user proposes, requests, or evaluates a plan of any kind. | core, workflow, planning, quality | all |
18
18
  | `skill-creator` | Create and standardize AI skills with reusable structure, metadata rules, and templates. | core, workflow, authoring | all |
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: "angular-guidelines"
3
- description: "Guide Angular code generation and review using latest stable Angular verification and modern framework best practices."
3
+ description: "Guide Angular code generation, review, and performance tuning using latest stable Angular verification, official Angular skill guidance, and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects."
4
4
  skillMetadata:
5
5
  author: "skilly-hand"
6
- last-edit: "2026-04-03"
6
+ last-edit: "2026-05-01"
7
7
  license: "Apache-2.0"
8
- version: "1.1.1"
9
- changelog: "Added allowed-modes metadata to declare angular-guidelines sub-agent routing targets; improves discoverability of component-creator and angular-tester delegation modes; affects angular-guidelines manifest metadata"
10
- auto-invoke: "Generating, reviewing, or refactoring Angular code artifacts in Angular projects"
8
+ version: "1.2.0"
9
+ changelog: "Added curated official Angular skill and performance guidance with a dedicated performance-reviewer mode; improves SSR, hydration, reactivity, testing, and runtime optimization coverage; affects angular-guidelines routing, review checklists, and catalog discovery"
10
+ auto-invoke: "Generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects"
11
11
  allowed-tools:
12
12
  - "Read"
13
13
  - "Edit"
@@ -29,6 +29,7 @@ Use this skill when:
29
29
  - You are generating Angular components, directives, pipes, services, or supporting files.
30
30
  - You are refactoring existing Angular code to current framework patterns.
31
31
  - You are reviewing Angular code quality and framework-alignment in an Angular workspace.
32
+ - You are optimizing Angular performance, SSR/hydration, reactivity/data flow, forms, routing, accessibility, or CLI-aligned generation.
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 Angular components | [agents/component-creator.md](agents/component-creator.md) |
48
49
  | Write or review Angular tests | [agents/angular-tester.md](agents/angular-tester.md) |
50
+ | Optimize or review Angular performance, SSR, or hydration | [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 Angular 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, SSR, hydration, routing, data fetching, bundle size, change detection, or zoneless behavior, 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
 
@@ -85,13 +88,34 @@ Use these defaults unless project constraints explicitly prevent them:
85
88
  | Forms | Typed reactive forms |
86
89
  | Rendering strategy | OnPush-friendly patterns and deferred/lazy rendering where appropriate |
87
90
 
88
- ### Pattern 3: Generation and Review Guardrails
91
+ ### Pattern 3: Modern Reactivity Guardrails
92
+
93
+ - Use `computed` for derived state rather than duplicating or propagating state manually.
94
+ - Avoid `effect` for state propagation; reserve it for logging, browser storage sync, non-template DOM work, canvas/chart integrations, or other non-reactive APIs.
95
+ - Use `resource` for async signal-based data when the project Angular version supports it and it fits existing data patterns.
96
+ - Use `linkedSignal` for dependent writable state when the project Angular version supports it.
97
+ - Read signals before `await` inside reactive contexts so dependencies are tracked synchronously.
98
+
99
+ ### Pattern 4: Performance Review Priority
100
+
101
+ Use this official-Angular-aligned priority order for performance review. Measure first when possible, then choose the smallest applicable optimization.
102
+
103
+ | Priority | Review Focus | Default Action |
104
+ | --- | --- | --- |
105
+ | 1 | Measurement | Use Angular DevTools or Chrome DevTools Angular profiling to identify specific load, change detection, or rendering bottlenecks. |
106
+ | 2 | Loading performance | Prefer lazy routes, `@defer` for non-critical/heavy UI, image optimization, and SSR/hydration where they improve Core Web Vitals. |
107
+ | 3 | Runtime performance | Check zoneless change detection support, slow template/lifecycle computations, OnPush-friendly state, and zone pollution from timers or third-party code. |
108
+ | 4 | SSR/hydration correctness | Avoid server/client template divergence, prefer platform-specific providers, keep per-request state out of shared providers, and use factory providers for request-specific values. |
109
+ | 5 | Advanced loading | Use incremental hydration and advanced deferrable-view strategies only when the project version and UX constraints justify them. |
110
+
111
+ ### Pattern 5: Generation and Review Guardrails
89
112
 
90
113
  - Keep generated files focused and minimal for the requested artifact.
91
114
  - Prefer framework-native patterns over custom abstractions unless required by repo conventions.
92
115
  - Call out deprecated patterns in reviewed code and suggest modern Angular replacements.
93
116
  - For component-specific work, apply [agents/component-creator.md](agents/component-creator.md).
94
117
  - For testing-specific work, apply [agents/angular-tester.md](agents/angular-tester.md).
118
+ - For performance-specific work, apply [agents/performance-reviewer.md](agents/performance-reviewer.md).
95
119
 
96
120
  ---
97
121
 
@@ -111,8 +135,12 @@ Is this a refactor task?
111
135
  NO -> Continue
112
136
 
113
137
  Is this a review task?
114
- YES -> Validate latest-stable alignment + best-practice checklist
138
+ YES -> Validate latest-stable alignment + best-practice/performance checklist
115
139
  NO -> Apply the minimal Angular guidance needed for the request
140
+
141
+ Does the task mention performance, SSR, hydration, routing, data fetching, bundles, change detection, or zoneless behavior?
142
+ YES -> Route through performance-reviewer before finalizing
143
+ NO -> Keep the existing component/test route
116
144
  ```
117
145
 
118
146
  ---
@@ -168,6 +196,7 @@ export class ProfileService {
168
196
  - Template control flow uses modern block syntax.
169
197
  - DI and forms follow modern typed Angular practices.
170
198
  - Output avoids deprecated Angular APIs unless needed for compatibility.
199
+ - Performance work follows measurement-first guidance and avoids speculative optimization.
171
200
 
172
201
  ---
173
202
 
@@ -196,3 +225,10 @@ ng update @angular/core @angular/cli
196
225
  - Angular update guide: https://angular.dev/update-guide
197
226
  - Angular blog (official releases): https://blog.angular.dev
198
227
  - Angular GitHub releases: https://github.com/angular/angular/releases
228
+ - Angular Agent Skills: https://angular.dev/ai/agent-skills
229
+ - Official Angular skills repo: https://github.com/angular/skills
230
+ - Angular style guide: https://angular.dev/style-guide
231
+ - Angular performance guide: https://angular.dev/best-practices/performance
232
+ - Angular signals guide: https://angular.dev/guide/signals
233
+ - Angular testing guide: https://angular.dev/guide/testing
234
+ - Angular HTTP testing guide: https://angular.dev/guide/http/testing
@@ -29,8 +29,11 @@ Do not use this sub-agent for:
29
29
  - Test signal and computed behavior directly when possible.
30
30
  - Test signal inputs/outputs using component instance APIs and DOM-triggered events.
31
31
  - Cover async behavior with `fakeAsync`/`tick`/`flush` or `waitForAsync`/`whenStable`.
32
- - For HTTP paths, use `HttpClientTestingModule`/`HttpTestingController` and verify requests.
32
+ - For HTTP paths, use `provideHttpClient()` before `provideHttpClientTesting()`, then verify requests with `HttpTestingController`.
33
+ - Use component DOM tests when template behavior, user interaction, or child integration matters.
34
+ - Use router testing harnesses when navigation, guards, resolvers, or routed components are the behavior under test.
33
35
  - For services, prefer explicit DI setup and clear mocking boundaries.
36
+ - Avoid assertions on incidental implementation details unless they are part of the public contract.
34
37
 
35
38
  ---
36
39
 
@@ -99,12 +102,17 @@ describe("CounterComponent", () => {
99
102
 
100
103
  ```typescript
101
104
  import { TestBed } from "@angular/core/testing";
102
- import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing";
105
+ import { provideHttpClient } from "@angular/common/http";
106
+ import { provideHttpClientTesting, HttpTestingController } from "@angular/common/http/testing";
103
107
 
104
108
  describe("ProfileService", () => {
105
109
  it("requests profile", () => {
106
110
  TestBed.configureTestingModule({
107
- imports: [HttpClientTestingModule]
111
+ providers: [
112
+ ProfileService,
113
+ provideHttpClient(),
114
+ provideHttpClientTesting()
115
+ ]
108
116
  });
109
117
  const service = TestBed.inject(ProfileService);
110
118
  const httpMock = TestBed.inject(HttpTestingController);
@@ -127,4 +135,6 @@ describe("ProfileService", () => {
127
135
  - Standalone Angular artifacts are tested with appropriate TestBed setup.
128
136
  - Signal/input/output behavior is asserted explicitly.
129
137
  - Async and HTTP behavior use deterministic Angular testing utilities.
138
+ - HTTP tests use provider-based setup with `provideHttpClient()` before `provideHttpClientTesting()` for new code.
139
+ - Router behavior uses harness-style tests where the workspace supports them.
130
140
  - Assertions verify user-visible behavior or contract-level outcomes, not incidental internals.
@@ -27,6 +27,18 @@ Do not use this sub-agent for:
27
27
 
28
28
  ---
29
29
 
30
+ ## Style and Reactivity Checklist
31
+
32
+ - Prefer feature-based organization and one primary Angular concept per file.
33
+ - Use `protected` for class members that are only read by the template.
34
+ - Mark Angular-managed properties `readonly`, including `input`, `model`, `output`, and query values.
35
+ - Prefer `[class]` and `[style]` bindings over `ngClass` and `ngStyle`.
36
+ - Move complex template logic into TypeScript, usually as a `computed`.
37
+ - Use `computed` for derived state and avoid `effect` for state propagation.
38
+ - Use `resource` or `linkedSignal` only when the project Angular version supports them and they fit existing data patterns.
39
+
40
+ ---
41
+
30
42
  ## Template Snippets
31
43
 
32
44
  ### Minimal Standalone Component
@@ -122,3 +134,4 @@ export class CardComponent {
122
134
  - Templates use native control flow blocks, not legacy structural directives.
123
135
  - Host interaction includes required ARIA and keyboard semantics for interactive UI.
124
136
  - Change detection and state flow are OnPush-friendly and predictable.
137
+ - Template-only members are `protected`, Angular-managed fields are `readonly`, and complex template logic is moved into `computed` values.
@@ -0,0 +1,62 @@
1
+ # Angular Performance Reviewer
2
+
3
+ ## When to Use
4
+
5
+ Use this sub-agent when:
6
+
7
+ - Reviewing or improving Angular loading, runtime, change detection, or rendering performance.
8
+ - Working on SSR, hydration, incremental hydration, `@defer`, lazy routes, image optimization, or bundle size.
9
+ - Investigating slow interactions, excessive change detection, zone pollution, slow template expressions, or lifecycle bottlenecks.
10
+
11
+ Do not use this sub-agent for:
12
+
13
+ - Pure test-only tasks without performance behavior.
14
+ - Non-Angular 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 signal to lowest. Stop once the request is solved; do not add unrelated optimizations.
22
+
23
+ | Priority | Focus | Checks |
24
+ | --- | --- | --- |
25
+ | 1 | Measurement | Use Angular DevTools or Chrome DevTools Angular profiling to identify load, change detection, rendering, or lifecycle bottlenecks before changing code when practical. |
26
+ | 2 | Loading performance | Prefer lazy routes for route-level splitting, `@defer` for non-critical or heavy UI, image optimization for visual content, and SSR/hydration for content-heavy or SEO-sensitive pages. |
27
+ | 3 | Runtime performance | Check zoneless change detection support, OnPush-friendly state flow, slow template expressions, expensive lifecycle hooks, and zone pollution from timers or third-party libraries. |
28
+ | 4 | SSR/hydration correctness | Keep server and client rendered content consistent, avoid browser-only conditionals in templates, use platform-specific providers, and prevent shared module/provider state from leaking across requests. |
29
+ | 5 | Advanced loading | Use incremental hydration, custom `@defer` triggers, prefetching, or worker offloading only when the project version, bottleneck, and UX constraints justify them. |
30
+
31
+ ---
32
+
33
+ ## SSR and Hydration Guardrails
34
+
35
+ - Avoid rendering different template content on server and client; mismatches can hurt hydration and layout stability.
36
+ - Use `afterNextRender` or platform-specific providers for browser-only initialization instead of template-level platform checks.
37
+ - Use factory providers for request-specific values on the server; avoid shared `useValue` objects for per-request data.
38
+ - Keep `@defer` placeholders accessible and avoid deferring initially visible content unless incremental hydration and layout constraints are handled.
39
+ - Avoid nested `@defer` blocks with identical eager triggers that cause cascading loads.
40
+
41
+ ---
42
+
43
+ ## Reactivity and Change Detection Guardrails
44
+
45
+ - Use signals and `computed` values for local derived state.
46
+ - Avoid `effect` for propagating state changes; reserve it for side effects against non-reactive APIs.
47
+ - Read signals before `await` inside reactive contexts.
48
+ - Prefer OnPush-friendly inputs and immutable data flow in zone-based apps.
49
+ - In zoneless-ready apps, avoid assumptions that depend on ZoneJS side effects.
50
+
51
+ ---
52
+
53
+ ## Review Output
54
+
55
+ When reviewing performance, report:
56
+
57
+ 1. Highest-impact issue first, tied to the priority checklist.
58
+ 2. Concrete code-level recommendation using existing project patterns.
59
+ 3. Expected user-visible or measurable benefit.
60
+ 4. Verification path: Angular DevTools, Chrome DevTools Angular profiling, bundle output, Core Web Vitals, targeted test, or existing project command.
61
+
62
+ If no meaningful performance issue is found, say so and avoid inventing speculative work.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "angular-guidelines",
3
3
  "title": "Angular Guidelines",
4
- "description": "Guide Angular code generation and review using latest stable Angular verification and modern framework best practices.",
4
+ "description": "Guide Angular code generation, review, and performance tuning using latest stable Angular verification, official Angular skill guidance, and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects.",
5
5
  "portable": true,
6
6
  "tags": ["angular", "frontend", "workflow", "best-practices"],
7
7
  "detectors": ["angular"],
@@ -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-03",
13
+ "last-edit": "2026-05-01",
14
14
  "license": "Apache-2.0",
15
- "version": "1.1.1",
16
- "changelog": "Added allowed-modes metadata to declare angular-guidelines sub-agent routing targets; improves discoverability of component-creator and angular-tester delegation modes; affects angular-guidelines manifest metadata",
17
- "auto-invoke": "Generating, reviewing, or refactoring Angular code artifacts in Angular projects",
15
+ "version": "1.2.0",
16
+ "changelog": "Added curated official Angular skill and performance guidance with a dedicated performance-reviewer mode; improves SSR, hydration, reactivity, testing, and runtime optimization coverage; affects angular-guidelines routing, review checklists, and catalog discovery",
17
+ "auto-invoke": "Generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects",
18
18
  "allowed-modes": [
19
19
  "component-creator",
20
- "angular-tester"
20
+ "angular-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/angular-tester.md", "kind": "instruction" }
39
+ { "path": "agents/angular-tester.md", "kind": "instruction" },
40
+ { "path": "agents/performance-reviewer.md", "kind": "instruction" }
39
41
  ],
40
42
  "dependencies": []
41
43
  }
@@ -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.0",
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.0",
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.0",
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.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/detectors",
3
- "version": "0.25.3",
3
+ "version": "0.26.0",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }