@codihaus/claude-skills 1.6.19 → 1.6.21

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/bin/cli.js CHANGED
@@ -23,6 +23,7 @@ program
23
23
  .option('--all', 'Install all skills (default)', true)
24
24
  .option('--no-deps', 'Skip dependency checking')
25
25
  .option('--no-hooks', 'Skip hooks setup')
26
+ .option('-k, --knowledge <path>', 'Path to custom knowledge base to install')
26
27
  .option('-y, --yes', 'Skip confirmation prompts')
27
28
  .action(init);
28
29
 
@@ -28,7 +28,7 @@ Each stack follows this structure:
28
28
 
29
29
  ```
30
30
  stacks/{stack-name}/
31
- ├── _index.md # Main knowledge file
31
+ ├── _index.md # Main knowledge file (always read first)
32
32
  │ ├── Overview # What it is, when to use
33
33
  │ ├── Best Practices # Patterns to follow
34
34
  │ ├── Anti-Patterns # What to avoid
@@ -37,17 +37,43 @@ stacks/{stack-name}/
37
37
  │ ├── For /dev-review # Review checklists
38
38
  │ └── Integration # How it works with other stacks
39
39
 
40
- ├── references/ # Detailed documentation
40
+ ├── references/ # Detailed documentation (load as needed)
41
41
  │ ├── api.md # API reference
42
42
  │ ├── patterns.md # Common patterns
43
43
  │ └── performance.md # Performance optimization
44
44
 
45
- └── assets/ # Code templates
45
+ └── assets/ # Code templates (load as needed)
46
46
  ├── composable.ts # Example composable
47
47
  ├── component.vue # Example component
48
48
  └── config.ts # Example config
49
49
  ```
50
50
 
51
+ ## Loading Knowledge
52
+
53
+ Skills can load knowledge in two ways:
54
+
55
+ ### 1. Quick Reference (Default)
56
+ Load only `_index.md` for overview and skill-specific guidance:
57
+ ```
58
+ Read knowledge/stacks/{stack}/_index.md
59
+ ```
60
+
61
+ ### 2. Deep Dive (When Needed)
62
+ Use `_knowledge.json` to discover and load additional files:
63
+ ```
64
+ 1. Read knowledge/_knowledge.json → Get file list for {stack}
65
+ 2. Read knowledge/stacks/{stack}/_index.md → Main guidance
66
+ 3. Read knowledge/stacks/{stack}/references/patterns.md → Detailed patterns
67
+ 4. Read knowledge/stacks/{stack}/references/performance.md → Performance tips
68
+ ```
69
+
70
+ ### When to Load More Than _index.md
71
+
72
+ - **Specs**: Usually `_index.md` is enough (high-level patterns)
73
+ - **Coding**: Load `references/` when implementing complex features
74
+ - **Review**: Load `references/performance.md` for performance reviews
75
+ - **Architecture**: Load `references/` for deep architectural decisions
76
+
51
77
  ## How Skills Use Stack Knowledge
52
78
 
53
79
  ### /dev-scout
@@ -637,6 +637,31 @@ if (process.env.NODE_ENV !== 'production') {
637
637
  }
638
638
  ```
639
639
 
640
+ ## Advanced RSC & Performance Patterns
641
+
642
+ **See `references/rsc-patterns.md` for comprehensive Next.js optimization guide covering**:
643
+ - Eliminating waterfalls (defer await, dependency parallelization, Promise.all)
644
+ - Server-side performance (LRU caching, serialization, React.cache, after())
645
+ - Bundle optimization (avoid barrel imports, dynamic imports, preloading)
646
+ - Data fetching strategies (auto-deduplication, SWR, caching)
647
+ - Server Actions best practices
648
+
649
+ **Critical patterns**:
650
+ - **Defer await until needed** - Don't block unused code paths
651
+ - **Start promises early** - Enable parallelization in API routes
652
+ - **Component composition** - Move async calls to components for parallel execution
653
+ - **Minimize serialization** - Only pass needed fields across RSC boundary
654
+ - **React.cache()** - Deduplicate DB queries, auth checks, heavy computations
655
+ - **after()** - Schedule non-blocking work (analytics, logging)
656
+ - **Avoid barrel imports** - Use optimizePackageImports or direct imports
657
+ - **LRU caching** - Share data across requests (especially with Fluid Compute)
658
+
659
+ **Impact metrics**:
660
+ - Eliminating waterfalls: 2-10× faster
661
+ - Avoiding barrel imports: 15-70% faster builds
662
+ - LRU caching: Eliminates redundant queries
663
+ - after() for non-blocking: 50-200ms faster responses
664
+
640
665
  ## Resources
641
666
 
642
667
  ### Official Docs
@@ -644,6 +669,11 @@ if (process.env.NODE_ENV !== 'production') {
644
669
  - App Router: https://nextjs.org/docs/app
645
670
  - Learn: https://nextjs.org/learn
646
671
 
672
+ ### Performance & Patterns
673
+ - Vercel Best Practices: https://github.com/vercel/react-best-practices
674
+ - See `references/rsc-patterns.md` - Detailed RSC & optimization guide
675
+ - See `references/performance.md` - Next.js performance optimizations
676
+
647
677
  ### Context7 Queries
648
678
 
649
679
  ```
@@ -651,4 +681,6 @@ Query: "Next.js 15 App Router data fetching"
651
681
  Query: "Next.js Server Actions best practices"
652
682
  Query: "Next.js middleware authentication"
653
683
  Query: "Next.js Server Components patterns"
684
+ Query: "Next.js RSC waterfall elimination"
685
+ Query: "Next.js bundle optimization barrel imports"
654
686
  ```