summaryrefslogtreecommitdiff
path: root/.claude/commands/optimize-components.md
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:06:49 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 17:06:49 +0900
commitadf5e96542ebd65c7d13ca5e9825071183b3ef13 (patch)
tree699800730cc9f68ab775bea5722ba55cf08b304a /.claude/commands/optimize-components.md
parentb8dc7344ff99eb23d5f003795f17cdba3b89c40b (diff)
fix: lint fixes for integration tests and backtester noqa annotations
Diffstat (limited to '.claude/commands/optimize-components.md')
-rw-r--r--.claude/commands/optimize-components.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/.claude/commands/optimize-components.md b/.claude/commands/optimize-components.md
new file mode 100644
index 0000000..5e35740
--- /dev/null
+++ b/.claude/commands/optimize-components.md
@@ -0,0 +1,25 @@
+---
+allowed-tools: Read, MultiEdit, Grep, Glob
+description: Analyze and optimize React Server/Client Component boundaries
+---
+
+Analyze the current component structure and optimize the Server/Client Component boundaries:
+
+1. Find all components currently marked with 'use client'
+2. Analyze if they truly need client-side interactivity
+3. Identify components that can be converted to Server Components
+4. Find Server Components that are passing non-serializable props
+5. Suggest component composition patterns to minimize client JS
+6. Identify opportunities for:
+ - Moving data fetching to Server Components
+ - Extracting interactive parts into smaller Client Components
+ - Using children pattern to compose Server and Client Components
+
+Provide a detailed report with:
+
+- Current client/server component ratio
+- Components that can be optimized
+- Specific refactoring suggestions
+- Estimated bundle size reduction
+
+Focus on reducing the amount of JavaScript sent to the client while maintaining functionality.