ateschh-kit 1.0.0 → 1.2.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/.claude/settings.local.json +4 -1
- package/CHANGELOG.md +15 -0
- package/CLAUDE.md +16 -16
- package/package.json +1 -2
- package/skills/build/SKILL.md +642 -0
- package/skills/cloudflare-workers-expert/SKILL.md +89 -0
- package/skills/docker-expert/SKILL.md +413 -0
- package/skills/electron-development/SKILL.md +856 -0
- package/skills/expo-api-routes/SKILL.md +368 -0
- package/skills/expo-deployment/SKILL.md +73 -0
- package/skills/fastapi-pro/SKILL.md +190 -0
- package/skills/flutter-expert/SKILL.md +197 -0
- package/skills/llm-app-patterns/SKILL.md +763 -0
- package/skills/nextjs-app-router-patterns/SKILL.md +36 -0
- package/skills/nextjs-best-practices/SKILL.md +208 -0
- package/skills/nodejs-backend-patterns/SKILL.md +38 -0
- package/skills/postgres-best-practices/SKILL.md +59 -0
- package/skills/prisma-expert/SKILL.md +361 -0
- package/skills/prompt-engineering/SKILL.md +177 -0
- package/skills/rag-implementation/SKILL.md +196 -0
- package/skills/react-best-practices/SKILL.md +127 -0
- package/skills/react-native-architecture/SKILL.md +36 -0
- package/skills/shadcn/SKILL.md +250 -0
- package/skills/supabase-automation/SKILL.md +240 -0
- package/skills/tailwind-design-system/SKILL.md +36 -0
- package/skills/typescript-expert/SKILL.md +426 -0
- package/skills/vercel-deployment/SKILL.md +80 -0
- /package/{workflows → .claude/commands}/_TEMPLATE.md +0 -0
- /package/{workflows → .claude/commands}/brainstorm.md +0 -0
- /package/{workflows → .claude/commands}/build.md +0 -0
- /package/{workflows → .claude/commands}/deploy.md +0 -0
- /package/{workflows → .claude/commands}/design.md +0 -0
- /package/{workflows → .claude/commands}/finish.md +0 -0
- /package/{workflows → .claude/commands}/map-codebase.md +0 -0
- /package/{workflows → .claude/commands}/new-project.md +0 -0
- /package/{workflows → .claude/commands}/next.md +0 -0
- /package/{workflows → .claude/commands}/quick.md +0 -0
- /package/{workflows → .claude/commands}/requirements.md +0 -0
- /package/{workflows → .claude/commands}/resume.md +0 -0
- /package/{workflows → .claude/commands}/save.md +0 -0
- /package/{workflows → .claude/commands}/settings.md +0 -0
- /package/{workflows → .claude/commands}/status.md +0 -0
- /package/{workflows → .claude/commands}/test.md +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-engineering
|
|
3
|
+
description: "Expert guide on prompt engineering patterns, best practices, and optimization techniques. Use when user wants to improve prompts, learn prompting strategies, or debug agent behavior."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Prompt Engineering Patterns
|
|
10
|
+
|
|
11
|
+
Advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.
|
|
12
|
+
|
|
13
|
+
## Core Capabilities
|
|
14
|
+
|
|
15
|
+
### 1. Few-Shot Learning
|
|
16
|
+
|
|
17
|
+
Teach the model by showing examples instead of explaining rules. Include 2-5 input-output pairs that demonstrate the desired behavior. Use when you need consistent formatting, specific reasoning patterns, or handling of edge cases. More examples improve accuracy but consume tokens—balance based on task complexity.
|
|
18
|
+
|
|
19
|
+
**Example:**
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
Extract key information from support tickets:
|
|
23
|
+
|
|
24
|
+
Input: "My login doesn't work and I keep getting error 403"
|
|
25
|
+
Output: {"issue": "authentication", "error_code": "403", "priority": "high"}
|
|
26
|
+
|
|
27
|
+
Input: "Feature request: add dark mode to settings"
|
|
28
|
+
Output: {"issue": "feature_request", "error_code": null, "priority": "low"}
|
|
29
|
+
|
|
30
|
+
Now process: "Can't upload files larger than 10MB, getting timeout"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Chain-of-Thought Prompting
|
|
34
|
+
|
|
35
|
+
Request step-by-step reasoning before the final answer. Add "Let's think step by step" (zero-shot) or include example reasoning traces (few-shot). Use for complex problems requiring multi-step logic, mathematical reasoning, or when you need to verify the model's thought process. Improves accuracy on analytical tasks by 30-50%.
|
|
36
|
+
|
|
37
|
+
**Example:**
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
Analyze this bug report and determine root cause.
|
|
41
|
+
|
|
42
|
+
Think step by step:
|
|
43
|
+
|
|
44
|
+
1. What is the expected behavior?
|
|
45
|
+
2. What is the actual behavior?
|
|
46
|
+
3. What changed recently that could cause this?
|
|
47
|
+
4. What components are involved?
|
|
48
|
+
5. What is the most likely root cause?
|
|
49
|
+
|
|
50
|
+
Bug: "Users can't save drafts after the cache update deployed yesterday"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Prompt Optimization
|
|
54
|
+
|
|
55
|
+
Systematically improve prompts through testing and refinement. Start simple, measure performance (accuracy, consistency, token usage), then iterate. Test on diverse inputs including edge cases. Use A/B testing to compare variations. Critical for production prompts where consistency and cost matter.
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
Version 1 (Simple): "Summarize this article"
|
|
61
|
+
→ Result: Inconsistent length, misses key points
|
|
62
|
+
|
|
63
|
+
Version 2 (Add constraints): "Summarize in 3 bullet points"
|
|
64
|
+
→ Result: Better structure, but still misses nuance
|
|
65
|
+
|
|
66
|
+
Version 3 (Add reasoning): "Identify the 3 main findings, then summarize each"
|
|
67
|
+
→ Result: Consistent, accurate, captures key information
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 4. Template Systems
|
|
71
|
+
|
|
72
|
+
Build reusable prompt structures with variables, conditional sections, and modular components. Use for multi-turn conversations, role-based interactions, or when the same pattern applies to different inputs. Reduces duplication and ensures consistency across similar tasks.
|
|
73
|
+
|
|
74
|
+
**Example:**
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# Reusable code review template
|
|
78
|
+
template = """
|
|
79
|
+
Review this {language} code for {focus_area}.
|
|
80
|
+
|
|
81
|
+
Code:
|
|
82
|
+
{code_block}
|
|
83
|
+
|
|
84
|
+
Provide feedback on:
|
|
85
|
+
{checklist}
|
|
86
|
+
"""
|
|
87
|
+
|
|
88
|
+
# Usage
|
|
89
|
+
prompt = template.format(
|
|
90
|
+
language="Python",
|
|
91
|
+
focus_area="security vulnerabilities",
|
|
92
|
+
code_block=user_code,
|
|
93
|
+
checklist="1. SQL injection\n2. XSS risks\n3. Authentication"
|
|
94
|
+
)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 5. System Prompt Design
|
|
98
|
+
|
|
99
|
+
Set global behavior and constraints that persist across the conversation. Define the model's role, expertise level, output format, and safety guidelines. Use system prompts for stable instructions that shouldn't change turn-to-turn, freeing up user message tokens for variable content.
|
|
100
|
+
|
|
101
|
+
**Example:**
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
System: You are a senior backend engineer specializing in API design.
|
|
105
|
+
|
|
106
|
+
Rules:
|
|
107
|
+
|
|
108
|
+
- Always consider scalability and performance
|
|
109
|
+
- Suggest RESTful patterns by default
|
|
110
|
+
- Flag security concerns immediately
|
|
111
|
+
- Provide code examples in Python
|
|
112
|
+
- Use early return pattern
|
|
113
|
+
|
|
114
|
+
Format responses as:
|
|
115
|
+
|
|
116
|
+
1. Analysis
|
|
117
|
+
2. Recommendation
|
|
118
|
+
3. Code example
|
|
119
|
+
4. Trade-offs
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Key Patterns
|
|
123
|
+
|
|
124
|
+
### Progressive Disclosure
|
|
125
|
+
|
|
126
|
+
Start with simple prompts, add complexity only when needed:
|
|
127
|
+
|
|
128
|
+
1. **Level 1**: Direct instruction
|
|
129
|
+
|
|
130
|
+
- "Summarize this article"
|
|
131
|
+
|
|
132
|
+
2. **Level 2**: Add constraints
|
|
133
|
+
|
|
134
|
+
- "Summarize this article in 3 bullet points, focusing on key findings"
|
|
135
|
+
|
|
136
|
+
3. **Level 3**: Add reasoning
|
|
137
|
+
|
|
138
|
+
- "Read this article, identify the main findings, then summarize in 3 bullet points"
|
|
139
|
+
|
|
140
|
+
4. **Level 4**: Add examples
|
|
141
|
+
- Include 2-3 example summaries with input-output pairs
|
|
142
|
+
|
|
143
|
+
### Instruction Hierarchy
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
[System Context] → [Task Instruction] → [Examples] → [Input Data] → [Output Format]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Error Recovery
|
|
150
|
+
|
|
151
|
+
Build prompts that gracefully handle failures:
|
|
152
|
+
|
|
153
|
+
- Include fallback instructions
|
|
154
|
+
- Request confidence scores
|
|
155
|
+
- Ask for alternative interpretations when uncertain
|
|
156
|
+
- Specify how to indicate missing information
|
|
157
|
+
|
|
158
|
+
## Best Practices
|
|
159
|
+
|
|
160
|
+
1. **Be Specific**: Vague prompts produce inconsistent results
|
|
161
|
+
2. **Show, Don't Tell**: Examples are more effective than descriptions
|
|
162
|
+
3. **Test Extensively**: Evaluate on diverse, representative inputs
|
|
163
|
+
4. **Iterate Rapidly**: Small changes can have large impacts
|
|
164
|
+
5. **Monitor Performance**: Track metrics in production
|
|
165
|
+
6. **Version Control**: Treat prompts as code with proper versioning
|
|
166
|
+
7. **Document Intent**: Explain why prompts are structured as they are
|
|
167
|
+
|
|
168
|
+
## Common Pitfalls
|
|
169
|
+
|
|
170
|
+
- **Over-engineering**: Starting with complex prompts before trying simple ones
|
|
171
|
+
- **Example pollution**: Using examples that don't match the target task
|
|
172
|
+
- **Context overflow**: Exceeding token limits with excessive examples
|
|
173
|
+
- **Ambiguous instructions**: Leaving room for multiple interpretations
|
|
174
|
+
- **Ignoring edge cases**: Not testing on unusual or boundary inputs
|
|
175
|
+
|
|
176
|
+
## When to Use
|
|
177
|
+
This skill is applicable to execute the workflow or actions described in the overview.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rag-implementation
|
|
3
|
+
description: "RAG (Retrieval-Augmented Generation) implementation workflow covering embedding selection, vector database setup, chunking strategies, and retrieval optimization."
|
|
4
|
+
category: granular-workflow-bundle
|
|
5
|
+
risk: safe
|
|
6
|
+
source: personal
|
|
7
|
+
date_added: "2026-02-27"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# RAG Implementation Workflow
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Specialized workflow for implementing RAG (Retrieval-Augmented Generation) systems including embedding model selection, vector database setup, chunking strategies, retrieval optimization, and evaluation.
|
|
15
|
+
|
|
16
|
+
## When to Use This Workflow
|
|
17
|
+
|
|
18
|
+
Use this workflow when:
|
|
19
|
+
- Building RAG-powered applications
|
|
20
|
+
- Implementing semantic search
|
|
21
|
+
- Creating knowledge-grounded AI
|
|
22
|
+
- Setting up document Q&A systems
|
|
23
|
+
- Optimizing retrieval quality
|
|
24
|
+
|
|
25
|
+
## Workflow Phases
|
|
26
|
+
|
|
27
|
+
### Phase 1: Requirements Analysis
|
|
28
|
+
|
|
29
|
+
#### Skills to Invoke
|
|
30
|
+
- `ai-product` - AI product design
|
|
31
|
+
- `rag-engineer` - RAG engineering
|
|
32
|
+
|
|
33
|
+
#### Actions
|
|
34
|
+
1. Define use case
|
|
35
|
+
2. Identify data sources
|
|
36
|
+
3. Set accuracy requirements
|
|
37
|
+
4. Determine latency targets
|
|
38
|
+
5. Plan evaluation metrics
|
|
39
|
+
|
|
40
|
+
#### Copy-Paste Prompts
|
|
41
|
+
```
|
|
42
|
+
Use @ai-product to define RAG application requirements
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Phase 2: Embedding Selection
|
|
46
|
+
|
|
47
|
+
#### Skills to Invoke
|
|
48
|
+
- `embedding-strategies` - Embedding selection
|
|
49
|
+
- `rag-engineer` - RAG patterns
|
|
50
|
+
|
|
51
|
+
#### Actions
|
|
52
|
+
1. Evaluate embedding models
|
|
53
|
+
2. Test domain relevance
|
|
54
|
+
3. Measure embedding quality
|
|
55
|
+
4. Consider cost/latency
|
|
56
|
+
5. Select model
|
|
57
|
+
|
|
58
|
+
#### Copy-Paste Prompts
|
|
59
|
+
```
|
|
60
|
+
Use @embedding-strategies to select optimal embedding model
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Phase 3: Vector Database Setup
|
|
64
|
+
|
|
65
|
+
#### Skills to Invoke
|
|
66
|
+
- `vector-database-engineer` - Vector DB
|
|
67
|
+
- `similarity-search-patterns` - Similarity search
|
|
68
|
+
|
|
69
|
+
#### Actions
|
|
70
|
+
1. Choose vector database
|
|
71
|
+
2. Design schema
|
|
72
|
+
3. Configure indexes
|
|
73
|
+
4. Set up connection
|
|
74
|
+
5. Test queries
|
|
75
|
+
|
|
76
|
+
#### Copy-Paste Prompts
|
|
77
|
+
```
|
|
78
|
+
Use @vector-database-engineer to set up vector database
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Phase 4: Chunking Strategy
|
|
82
|
+
|
|
83
|
+
#### Skills to Invoke
|
|
84
|
+
- `rag-engineer` - Chunking strategies
|
|
85
|
+
- `rag-implementation` - RAG implementation
|
|
86
|
+
|
|
87
|
+
#### Actions
|
|
88
|
+
1. Choose chunk size
|
|
89
|
+
2. Implement chunking
|
|
90
|
+
3. Add overlap handling
|
|
91
|
+
4. Create metadata
|
|
92
|
+
5. Test retrieval quality
|
|
93
|
+
|
|
94
|
+
#### Copy-Paste Prompts
|
|
95
|
+
```
|
|
96
|
+
Use @rag-engineer to implement chunking strategy
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Phase 5: Retrieval Implementation
|
|
100
|
+
|
|
101
|
+
#### Skills to Invoke
|
|
102
|
+
- `similarity-search-patterns` - Similarity search
|
|
103
|
+
- `hybrid-search-implementation` - Hybrid search
|
|
104
|
+
|
|
105
|
+
#### Actions
|
|
106
|
+
1. Implement vector search
|
|
107
|
+
2. Add keyword search
|
|
108
|
+
3. Configure hybrid search
|
|
109
|
+
4. Set up reranking
|
|
110
|
+
5. Optimize latency
|
|
111
|
+
|
|
112
|
+
#### Copy-Paste Prompts
|
|
113
|
+
```
|
|
114
|
+
Use @similarity-search-patterns to implement retrieval
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Use @hybrid-search-implementation to add hybrid search
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Phase 6: LLM Integration
|
|
122
|
+
|
|
123
|
+
#### Skills to Invoke
|
|
124
|
+
- `llm-application-dev-ai-assistant` - LLM integration
|
|
125
|
+
- `llm-application-dev-prompt-optimize` - Prompt optimization
|
|
126
|
+
|
|
127
|
+
#### Actions
|
|
128
|
+
1. Select LLM provider
|
|
129
|
+
2. Design prompt template
|
|
130
|
+
3. Implement context injection
|
|
131
|
+
4. Add citation handling
|
|
132
|
+
5. Test generation quality
|
|
133
|
+
|
|
134
|
+
#### Copy-Paste Prompts
|
|
135
|
+
```
|
|
136
|
+
Use @llm-application-dev-ai-assistant to integrate LLM
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Phase 7: Caching
|
|
140
|
+
|
|
141
|
+
#### Skills to Invoke
|
|
142
|
+
- `prompt-caching` - Prompt caching
|
|
143
|
+
- `rag-engineer` - RAG optimization
|
|
144
|
+
|
|
145
|
+
#### Actions
|
|
146
|
+
1. Implement response caching
|
|
147
|
+
2. Set up embedding cache
|
|
148
|
+
3. Configure TTL
|
|
149
|
+
4. Add cache invalidation
|
|
150
|
+
5. Monitor hit rates
|
|
151
|
+
|
|
152
|
+
#### Copy-Paste Prompts
|
|
153
|
+
```
|
|
154
|
+
Use @prompt-caching to implement RAG caching
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Phase 8: Evaluation
|
|
158
|
+
|
|
159
|
+
#### Skills to Invoke
|
|
160
|
+
- `llm-evaluation` - LLM evaluation
|
|
161
|
+
- `evaluation` - AI evaluation
|
|
162
|
+
|
|
163
|
+
#### Actions
|
|
164
|
+
1. Define evaluation metrics
|
|
165
|
+
2. Create test dataset
|
|
166
|
+
3. Measure retrieval accuracy
|
|
167
|
+
4. Evaluate generation quality
|
|
168
|
+
5. Iterate on improvements
|
|
169
|
+
|
|
170
|
+
#### Copy-Paste Prompts
|
|
171
|
+
```
|
|
172
|
+
Use @llm-evaluation to evaluate RAG system
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## RAG Architecture
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
User Query -> Embedding -> Vector Search -> Retrieved Docs -> LLM -> Response
|
|
179
|
+
| | | |
|
|
180
|
+
Model Vector DB Chunk Store Prompt + Context
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Quality Gates
|
|
184
|
+
|
|
185
|
+
- [ ] Embedding model selected
|
|
186
|
+
- [ ] Vector DB configured
|
|
187
|
+
- [ ] Chunking implemented
|
|
188
|
+
- [ ] Retrieval working
|
|
189
|
+
- [ ] LLM integrated
|
|
190
|
+
- [ ] Evaluation passing
|
|
191
|
+
|
|
192
|
+
## Related Workflow Bundles
|
|
193
|
+
|
|
194
|
+
- `ai-ml` - AI/ML development
|
|
195
|
+
- `ai-agent-development` - AI agents
|
|
196
|
+
- `database` - Vector databases
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-best-practices
|
|
3
|
+
description: "React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance pat..."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Vercel React Best Practices
|
|
10
|
+
|
|
11
|
+
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
|
|
12
|
+
|
|
13
|
+
## When to Apply
|
|
14
|
+
|
|
15
|
+
Reference these guidelines when:
|
|
16
|
+
- Writing new React components or Next.js pages
|
|
17
|
+
- Implementing data fetching (client or server-side)
|
|
18
|
+
- Reviewing code for performance issues
|
|
19
|
+
- Refactoring existing React/Next.js code
|
|
20
|
+
- Optimizing bundle size or load times
|
|
21
|
+
|
|
22
|
+
## Rule Categories by Priority
|
|
23
|
+
|
|
24
|
+
| Priority | Category | Impact | Prefix |
|
|
25
|
+
|----------|----------|--------|--------|
|
|
26
|
+
| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
|
|
27
|
+
| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
|
|
28
|
+
| 3 | Server-Side Performance | HIGH | `server-` |
|
|
29
|
+
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
|
|
30
|
+
| 5 | Re-render Optimization | MEDIUM | `rerender-` |
|
|
31
|
+
| 6 | Rendering Performance | MEDIUM | `rendering-` |
|
|
32
|
+
| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
|
|
33
|
+
| 8 | Advanced Patterns | LOW | `advanced-` |
|
|
34
|
+
|
|
35
|
+
## Quick Reference
|
|
36
|
+
|
|
37
|
+
### 1. Eliminating Waterfalls (CRITICAL)
|
|
38
|
+
|
|
39
|
+
- `async-defer-await` - Move await into branches where actually used
|
|
40
|
+
- `async-parallel` - Use Promise.all() for independent operations
|
|
41
|
+
- `async-dependencies` - Use better-all for partial dependencies
|
|
42
|
+
- `async-api-routes` - Start promises early, await late in API routes
|
|
43
|
+
- `async-suspense-boundaries` - Use Suspense to stream content
|
|
44
|
+
|
|
45
|
+
### 2. Bundle Size Optimization (CRITICAL)
|
|
46
|
+
|
|
47
|
+
- `bundle-barrel-imports` - Import directly, avoid barrel files
|
|
48
|
+
- `bundle-dynamic-imports` - Use next/dynamic for heavy components
|
|
49
|
+
- `bundle-defer-third-party` - Load analytics/logging after hydration
|
|
50
|
+
- `bundle-conditional` - Load modules only when feature is activated
|
|
51
|
+
- `bundle-preload` - Preload on hover/focus for perceived speed
|
|
52
|
+
|
|
53
|
+
### 3. Server-Side Performance (HIGH)
|
|
54
|
+
|
|
55
|
+
- `server-cache-react` - Use React.cache() for per-request deduplication
|
|
56
|
+
- `server-cache-lru` - Use LRU cache for cross-request caching
|
|
57
|
+
- `server-serialization` - Minimize data passed to client components
|
|
58
|
+
- `server-parallel-fetching` - Restructure components to parallelize fetches
|
|
59
|
+
- `server-after-nonblocking` - Use after() for non-blocking operations
|
|
60
|
+
|
|
61
|
+
### 4. Client-Side Data Fetching (MEDIUM-HIGH)
|
|
62
|
+
|
|
63
|
+
- `client-swr-dedup` - Use SWR for automatic request deduplication
|
|
64
|
+
- `client-event-listeners` - Deduplicate global event listeners
|
|
65
|
+
|
|
66
|
+
### 5. Re-render Optimization (MEDIUM)
|
|
67
|
+
|
|
68
|
+
- `rerender-defer-reads` - Don't subscribe to state only used in callbacks
|
|
69
|
+
- `rerender-memo` - Extract expensive work into memoized components
|
|
70
|
+
- `rerender-dependencies` - Use primitive dependencies in effects
|
|
71
|
+
- `rerender-derived-state` - Subscribe to derived booleans, not raw values
|
|
72
|
+
- `rerender-functional-setstate` - Use functional setState for stable callbacks
|
|
73
|
+
- `rerender-lazy-state-init` - Pass function to useState for expensive values
|
|
74
|
+
- `rerender-transitions` - Use startTransition for non-urgent updates
|
|
75
|
+
|
|
76
|
+
### 6. Rendering Performance (MEDIUM)
|
|
77
|
+
|
|
78
|
+
- `rendering-animate-svg-wrapper` - Animate div wrapper, not SVG element
|
|
79
|
+
- `rendering-content-visibility` - Use content-visibility for long lists
|
|
80
|
+
- `rendering-hoist-jsx` - Extract static JSX outside components
|
|
81
|
+
- `rendering-svg-precision` - Reduce SVG coordinate precision
|
|
82
|
+
- `rendering-hydration-no-flicker` - Use inline script for client-only data
|
|
83
|
+
- `rendering-activity` - Use Activity component for show/hide
|
|
84
|
+
- `rendering-conditional-render` - Use ternary, not && for conditionals
|
|
85
|
+
|
|
86
|
+
### 7. JavaScript Performance (LOW-MEDIUM)
|
|
87
|
+
|
|
88
|
+
- `js-batch-dom-css` - Group CSS changes via classes or cssText
|
|
89
|
+
- `js-index-maps` - Build Map for repeated lookups
|
|
90
|
+
- `js-cache-property-access` - Cache object properties in loops
|
|
91
|
+
- `js-cache-function-results` - Cache function results in module-level Map
|
|
92
|
+
- `js-cache-storage` - Cache localStorage/sessionStorage reads
|
|
93
|
+
- `js-combine-iterations` - Combine multiple filter/map into one loop
|
|
94
|
+
- `js-length-check-first` - Check array length before expensive comparison
|
|
95
|
+
- `js-early-exit` - Return early from functions
|
|
96
|
+
- `js-hoist-regexp` - Hoist RegExp creation outside loops
|
|
97
|
+
- `js-min-max-loop` - Use loop for min/max instead of sort
|
|
98
|
+
- `js-set-map-lookups` - Use Set/Map for O(1) lookups
|
|
99
|
+
- `js-tosorted-immutable` - Use toSorted() for immutability
|
|
100
|
+
|
|
101
|
+
### 8. Advanced Patterns (LOW)
|
|
102
|
+
|
|
103
|
+
- `advanced-event-handler-refs` - Store event handlers in refs
|
|
104
|
+
- `advanced-use-latest` - useLatest for stable callback refs
|
|
105
|
+
|
|
106
|
+
## How to Use
|
|
107
|
+
|
|
108
|
+
Read individual rule files for detailed explanations and code examples:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
rules/async-parallel.md
|
|
112
|
+
rules/bundle-barrel-imports.md
|
|
113
|
+
rules/_sections.md
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Each rule file contains:
|
|
117
|
+
- Brief explanation of why it matters
|
|
118
|
+
- Incorrect code example with explanation
|
|
119
|
+
- Correct code example with explanation
|
|
120
|
+
- Additional context and references
|
|
121
|
+
|
|
122
|
+
## Full Compiled Document
|
|
123
|
+
|
|
124
|
+
For the complete guide with all rules expanded: `AGENTS.md`
|
|
125
|
+
|
|
126
|
+
## When to Use
|
|
127
|
+
This skill is applicable to execute the workflow or actions described in the overview.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-native-architecture
|
|
3
|
+
description: "Build production React Native apps with Expo, navigation, native modules, offline sync, and cross-platform patterns. Use when developing mobile apps, implementing native integrations, or architecti..."
|
|
4
|
+
risk: unknown
|
|
5
|
+
source: community
|
|
6
|
+
date_added: "2026-02-27"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# React Native Architecture
|
|
10
|
+
|
|
11
|
+
Production-ready patterns for React Native development with Expo, including navigation, state management, native modules, and offline-first architecture.
|
|
12
|
+
|
|
13
|
+
## Use this skill when
|
|
14
|
+
|
|
15
|
+
- Starting a new React Native or Expo project
|
|
16
|
+
- Implementing complex navigation patterns
|
|
17
|
+
- Integrating native modules and platform APIs
|
|
18
|
+
- Building offline-first mobile applications
|
|
19
|
+
- Optimizing React Native performance
|
|
20
|
+
- Setting up CI/CD for mobile releases
|
|
21
|
+
|
|
22
|
+
## Do not use this skill when
|
|
23
|
+
|
|
24
|
+
- The task is unrelated to react native architecture
|
|
25
|
+
- You need a different domain or tool outside this scope
|
|
26
|
+
|
|
27
|
+
## Instructions
|
|
28
|
+
|
|
29
|
+
- Clarify goals, constraints, and required inputs.
|
|
30
|
+
- Apply relevant best practices and validate outcomes.
|
|
31
|
+
- Provide actionable steps and verification.
|
|
32
|
+
- If detailed examples are required, open `resources/implementation-playbook.md`.
|
|
33
|
+
|
|
34
|
+
## Resources
|
|
35
|
+
|
|
36
|
+
- `resources/implementation-playbook.md` for detailed patterns and examples.
|