bps-kit 1.0.2 → 1.0.4

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 (85) hide show
  1. package/bin/cli.js +4 -4
  2. package/package.json +1 -1
  3. package/templates/{.agents → agents-template}/rules/GEMINI.md +5 -5
  4. package/templates/skills_extra/nodejs-best-practices/SKILL.md +8 -2
  5. package/templates/skills_normal/api-patterns/SKILL.md +7 -2
  6. package/templates/skills_normal/app-builder/SKILL.md +8 -3
  7. package/templates/skills_normal/app-builder/tech-stack.md +2 -2
  8. package/templates/skills_normal/app-builder/templates/SKILL.md +7 -2
  9. package/templates/skills_normal/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
  10. package/templates/skills_normal/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
  11. package/templates/skills_normal/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
  12. package/templates/skills_normal/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
  13. package/templates/skills_normal/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
  14. package/templates/skills_normal/behavioral-modes/SKILL.md +7 -2
  15. package/templates/skills_normal/brainstorming/SKILL.md +173 -104
  16. package/templates/skills_normal/clean-code/SKILL.md +90 -197
  17. package/templates/skills_normal/database-design/SKILL.md +7 -2
  18. package/templates/skills_normal/frontend-design/LICENSE.txt +177 -0
  19. package/templates/skills_normal/frontend-design/SKILL.md +172 -313
  20. package/templates/skills_normal/lint-and-validate/SKILL.md +7 -2
  21. package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +2 -14
  22. package/templates/skills_normal/performance-profiling/SKILL.md +7 -2
  23. package/templates/skills_normal/plan-writing/SKILL.md +4 -2
  24. package/templates/skills_normal/seo-fundamentals/SKILL.md +125 -79
  25. package/templates/skills_normal/systematic-debugging/CREATION-LOG.md +119 -0
  26. package/templates/skills_normal/systematic-debugging/SKILL.md +275 -85
  27. package/templates/skills_normal/systematic-debugging/condition-based-waiting-example.ts +158 -0
  28. package/templates/skills_normal/systematic-debugging/condition-based-waiting.md +115 -0
  29. package/templates/skills_normal/systematic-debugging/defense-in-depth.md +122 -0
  30. package/templates/skills_normal/systematic-debugging/find-polluter.sh +63 -0
  31. package/templates/skills_normal/systematic-debugging/root-cause-tracing.md +169 -0
  32. package/templates/skills_normal/systematic-debugging/test-academic.md +14 -0
  33. package/templates/skills_normal/systematic-debugging/test-pressure-1.md +58 -0
  34. package/templates/skills_normal/systematic-debugging/test-pressure-2.md +68 -0
  35. package/templates/skills_normal/systematic-debugging/test-pressure-3.md +69 -0
  36. package/templates/skills_normal/tailwind-patterns/SKILL.md +8 -2
  37. package/templates/skills_normal/testing-patterns/SKILL.md +212 -125
  38. package/templates/skills_normal/vulnerability-scanner/SKILL.md +7 -2
  39. package/templates/.agents/agents/backend-specialist.md +0 -263
  40. package/templates/.agents/agents/code-archaeologist.md +0 -106
  41. package/templates/.agents/agents/database-architect.md +0 -226
  42. package/templates/.agents/agents/debugger.md +0 -225
  43. package/templates/.agents/agents/devops-engineer.md +0 -242
  44. package/templates/.agents/agents/documentation-writer.md +0 -104
  45. package/templates/.agents/agents/explorer-agent.md +0 -73
  46. package/templates/.agents/agents/frontend-specialist.md +0 -593
  47. package/templates/.agents/agents/game-developer.md +0 -162
  48. package/templates/.agents/agents/mobile-developer.md +0 -377
  49. package/templates/.agents/agents/orchestrator.md +0 -416
  50. package/templates/.agents/agents/penetration-tester.md +0 -188
  51. package/templates/.agents/agents/performance-optimizer.md +0 -187
  52. package/templates/.agents/agents/product-manager.md +0 -112
  53. package/templates/.agents/agents/product-owner.md +0 -95
  54. package/templates/.agents/agents/project-planner.md +0 -406
  55. package/templates/.agents/agents/qa-automation-engineer.md +0 -103
  56. package/templates/.agents/agents/security-auditor.md +0 -170
  57. package/templates/.agents/agents/seo-specialist.md +0 -111
  58. package/templates/.agents/agents/test-engineer.md +0 -158
  59. package/templates/.agents/scripts/auto_preview.py +0 -148
  60. package/templates/.agents/scripts/checklist.py +0 -217
  61. package/templates/.agents/scripts/session_manager.py +0 -120
  62. package/templates/.agents/scripts/verify_all.py +0 -327
  63. package/templates/.agents/workflows/brainstorm.md +0 -113
  64. package/templates/.agents/workflows/create.md +0 -59
  65. package/templates/.agents/workflows/debug.md +0 -103
  66. package/templates/.agents/workflows/deploy.md +0 -176
  67. package/templates/.agents/workflows/enhance.md +0 -63
  68. package/templates/.agents/workflows/orchestrate.md +0 -237
  69. package/templates/.agents/workflows/plan.md +0 -89
  70. package/templates/.agents/workflows/preview.md +0 -81
  71. package/templates/.agents/workflows/status.md +0 -86
  72. package/templates/.agents/workflows/test.md +0 -144
  73. package/templates/.agents/workflows/ui-ux-pro-max.md +0 -296
  74. package/templates/skills_normal/brainstorming/dynamic-questioning.md +0 -350
  75. package/templates/skills_normal/frontend-design/animation-guide.md +0 -331
  76. package/templates/skills_normal/frontend-design/color-system.md +0 -311
  77. package/templates/skills_normal/frontend-design/decision-trees.md +0 -418
  78. package/templates/skills_normal/frontend-design/motion-graphics.md +0 -306
  79. package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +0 -183
  80. package/templates/skills_normal/frontend-design/scripts/ux_audit.py +0 -722
  81. package/templates/skills_normal/frontend-design/typography-system.md +0 -345
  82. package/templates/skills_normal/frontend-design/ux-psychology.md +0 -1116
  83. package/templates/skills_normal/frontend-design/visual-effects.md +0 -383
  84. package/templates/skills_normal/testing-patterns/scripts/test_runner.py +0 -219
  85. /package/templates/{.agents → agents-template}/workflows/setup-brain.md +0 -0
@@ -1,93 +1,54 @@
1
1
  ---
2
2
  name: nextjs-static
3
- description: Modern template for Next.js 16, React 19 & Tailwind v4. Optimized for Landing pages and Portfolios.
3
+ description: Next.js static site template principles. Landing pages, portfolios, marketing.
4
4
  ---
5
5
 
6
- # Next.js Static Site Template (Modern Edition)
6
+ # Next.js Static Site Template
7
7
 
8
8
  ## Tech Stack
9
9
 
10
- | Component | Technology | Notes |
11
- |-----------|------------|-------|
12
- | Framework | Next.js 16+ | App Router, Turbopack, Static Exports |
13
- | Core | React 19 | Server Components, New Hooks, Compiler |
14
- | Language | TypeScript | Strict Mode |
15
- | Styling | Tailwind CSS v4 | CSS-first configuration (No js config), Oxide Engine |
16
- | Animations | Framer Motion | Layout animations & gestures |
17
- | Icons | Lucide React | Lightweight SVG icons |
18
- | SEO | Metadata API | Native Next.js API (Replaces next-seo) |
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | Next.js 14 (Static Export) |
13
+ | Language | TypeScript |
14
+ | Styling | Tailwind CSS |
15
+ | Animations | Framer Motion |
16
+ | Icons | Lucide React |
17
+ | SEO | Next SEO |
19
18
 
20
19
  ---
21
20
 
22
21
  ## Directory Structure
23
22
 
24
- Streamlined structure thanks to Tailwind v4 (theme configuration lives inside CSS).
25
-
26
23
  ```
27
24
  project-name/
28
25
  ├── src/
29
26
  │ ├── app/
30
- │ │ ├── layout.tsx # Contains root SEO Metadata
31
- │ │ ├── page.tsx # Landing Page
32
- │ │ ├── globals.css # Import Tailwind v4 & @theme config
33
- │ │ ├── not-found.tsx # Custom 404 page
34
- │ │ └── (routes)/ # Route groups (about, contact...)
27
+ │ │ ├── layout.tsx
28
+ │ │ ├── page.tsx # Landing
29
+ │ │ ├── about/
30
+ │ │ ├── contact/
31
+ │ │ └── blog/
35
32
  │ ├── components/
36
33
  │ │ ├── layout/ # Header, Footer
37
- │ │ ├── sections/ # Hero, Features, Pricing, CTA
38
- │ │ └── ui/ # Atomic components (Button, Card)
34
+ │ │ ├── sections/ # Hero, Features, CTA
35
+ │ │ └── ui/
39
36
  │ └── lib/
40
- │ └── utils.ts # Helper functions (cn, formatters)
41
- ├── content/ # Markdown/MDX content
42
- ├── public/ # Static assets (images, fonts)
43
- ├── next.config.ts # Next.js Config (TypeScript)
44
- └── package.json
37
+ ├── content/ # Markdown content
38
+ ├── public/
39
+ └── next.config.js
45
40
  ```
46
41
 
47
42
  ---
48
43
 
49
44
  ## Static Export Config
50
45
 
51
- Using `next.config.ts` instead of `.js` for better type safety.
52
-
53
- ```typescript
54
- // next.config.ts
55
- import type { NextConfig } from "next";
56
-
57
- const nextConfig: NextConfig = {
58
- output: 'export', // Required for Static Hosting (S3, GitHub Pages)
59
- images: {
60
- unoptimized: true // Required if not using Node.js server image optimization
61
- },
62
- trailingSlash: true, // Recommended for SEO and fixing 404s on some hosts
63
- reactStrictMode: true,
64
- };
65
-
66
- export default nextConfig;
67
- ```
68
-
69
- ---
70
-
71
- ## SEO Implementation (Metadata API)
72
-
73
- Deprecated next-seo. Configure directly in layout.tsx or page.tsx.
74
-
75
- ```typescript
76
- // src/app/layout.tsx
77
- import type { Metadata } from 'next';
78
-
79
- export const metadata: Metadata = {
80
- title: {
81
- template: '%s | Product Name',
82
- default: 'Home - Product Name',
83
- },
84
- description: 'SEO optimized description for the landing page.',
85
- openGraph: {
86
- type: 'website',
87
- locale: 'en_US',
88
- url: 'https://mysite.com',
89
- siteName: 'My Brand',
90
- },
46
+ ```javascript
47
+ // next.config.js
48
+ const nextConfig = {
49
+ output: 'export',
50
+ images: { unoptimized: true },
51
+ trailingSlash: true,
91
52
  };
92
53
  ```
93
54
 
@@ -95,75 +56,51 @@ export const metadata: Metadata = {
95
56
 
96
57
  ## Landing Page Sections
97
58
 
98
- | Section | Purpose | Suggested Component |
99
- |---------|---------|---------------------|
100
- | Hero | First impression, H1 & Main CTA | `<HeroSection />` |
101
- | Features | Product benefits (Grid/Bento layout) | `<FeaturesGrid />` |
102
- | Social Proof | Partner logos, User numbers | `<LogoCloud />` |
103
- | Testimonials | Customer reviews | `<TestimonialCarousel />` |
104
- | Pricing | Service plans | `<PricingCards />` |
105
- | FAQ | Questions & Answers (Good for SEO) | `<Accordion />` |
106
- | CTA | Final conversion | `<CallToAction />` |
59
+ | Section | Purpose |
60
+ |---------|---------|
61
+ | Hero | Main headline, CTA |
62
+ | Features | Product benefits |
63
+ | Testimonials | Social proof |
64
+ | Pricing | Plans |
65
+ | CTA | Final conversion |
107
66
 
108
67
  ---
109
68
 
110
- ## Animation Patterns (Framer Motion)
69
+ ## Animation Patterns
111
70
 
112
- | Pattern | Usage | Implementation |
113
- |---------|-------|----------------|
114
- | Fade Up | Headlines, paragraphs | `initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }}` |
115
- | Stagger | Lists of Features/Cards | Use variants with `staggerChildren` |
116
- | Parallax | Background images or floating elements | `useScroll` & `useTransform` |
117
- | Micro-interactions | Hover buttons, click effects | `whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}` |
71
+ | Pattern | Use |
72
+ |---------|-----|
73
+ | Fade up | Content entry |
74
+ | Stagger | List items |
75
+ | Scroll reveal | On viewport |
76
+ | Hover | Interactive feedback |
118
77
 
119
78
  ---
120
79
 
121
80
  ## Setup Steps
122
81
 
123
- 1. Initialize Project:
124
- ```bash
125
- npx create-next-app@latest my-site --typescript --tailwind --eslint
126
- # Select 'Yes' for App Router
127
- # Select 'No' for 'Would you like to customize the default import alias?'
128
- ```
129
-
130
- 2. Install Auxiliary Libraries:
131
- ```bash
132
- npm install framer-motion lucide-react clsx tailwind-merge
133
- # clsx and tailwind-merge help handle dynamic classes better
134
- ```
135
-
136
- 3. Configure Tailwind v4 (in `src/app/globals.css`):
137
- ```css
138
- @import "tailwindcss";
139
-
140
- @theme {
141
- --color-primary: #3b82f6;
142
- --font-sans: 'Inter', sans-serif;
143
- }
144
- ```
145
-
146
- 4. Development:
147
- ```bash
148
- npm run dev --turbopack
149
- ```
82
+ 1. `npx create-next-app {{name}} --typescript --tailwind --app`
83
+ 2. Install: `npm install framer-motion lucide-react next-seo`
84
+ 3. Configure static export
85
+ 4. Create sections
86
+ 5. `npm run dev`
150
87
 
151
88
  ---
152
89
 
153
90
  ## Deployment
154
91
 
155
- | Platform | Method | Important Notes |
156
- |----------|--------|-----------------|
157
- | Vercel | Git Push | Auto-detects Next.js. Best for performance. |
158
- | GitHub Pages | GitHub Actions | Need to set `basePath` in `next.config.ts` if not using a custom domain. |
159
- | AWS S3 / CloudFront | Upload out folder | Ensure Error Document is configured to `404.html`. |
160
- | Netlify | Git Push | Set build command to `npm run build`. |
92
+ | Platform | Method |
93
+ |----------|--------|
94
+ | Vercel | Auto |
95
+ | Netlify | Auto |
96
+ | GitHub Pages | gh-pages branch |
97
+ | Any host | Upload `out` folder |
161
98
 
162
99
  ---
163
100
 
164
- ## Best Practices (Modern)
101
+ ## Best Practices
165
102
 
166
- - **React Server Components (RSC)**: Default all components to Server Components. Only add `'use client'` when you need state (`useState`) or event listeners (`onClick`).
167
- - **Image Optimization**: Use the `<Image />` component but remember `unoptimized: true` for static export or use an external image CDN (Cloudinary/Imgix).
168
- - **Font Optimization**: Use `next/font` (Google Fonts) to automatically host fonts and prevent layout shift.
169
- - **Responsive**: Mobile-first design using Tailwind prefixes like `sm:`, `md:`, `lg:`.
103
+ - Static export for maximum performance
104
+ - Framer Motion for premium animations
105
+ - Responsive mobile-first design
106
+ - SEO metadata on every page
@@ -1,65 +1,66 @@
1
1
  ---
2
2
  name: nuxt-app
3
- description: Nuxt 4 full-stack template. Vue 3 (Vapor), Pinia, Tailwind v4, Prisma.
3
+ description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.
4
4
  ---
5
5
 
6
- # Nuxt 4 Full-Stack Template (2026 Edition)
7
-
8
- Mẫu template Full-Stack hiện đại cho Nuxt 4, tối ưu hóa hiệu suất với Vue Vapor Mode và Tailwind v4.
6
+ # Nuxt 3 Full-Stack Template
9
7
 
10
8
  ## Tech Stack
11
9
 
12
- | Component | Technology | Version / Notes |
13
- |-----------|------------|-----------------|
14
- | Framework | Nuxt | v4.0+ (App Directory structure) |
15
- | UI Engine | Vue | v3.6+ (Vapor Mode enabled) |
16
- | Language | TypeScript | v5+ (Strict Mode) |
17
- | State | Pinia | v3+ (Store syntax) |
18
- | Database | PostgreSQL | Prisma ORM |
19
- | Styling | Tailwind CSS | v4.0 (Vite Plugin, Zero-config) |
20
- | UI Lib | Nuxt UI | v3 (Tailwind v4 native) |
21
- | Validation | Zod | Schema validation |
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | Nuxt 3 |
13
+ | Language | TypeScript |
14
+ | UI | Vue 3 (Composition API) |
15
+ | State | Pinia |
16
+ | Database | PostgreSQL + Prisma |
17
+ | Styling | Tailwind CSS |
18
+ | Validation | Zod |
22
19
 
23
20
  ---
24
21
 
25
- ## Directory Structure (Nuxt 4 Standard)
26
-
27
- Sử dụng cấu trúc `app/` để giữ thư mục gốc gọn gàng.
22
+ ## Directory Structure
28
23
 
29
24
  ```
30
25
  project-name/
31
- ├── app/ # Application Source
32
- │ ├── assets/
33
- │ │ └── css/
34
- │ │ └── main.css # Tailwind v4 imports
35
- │ ├── components/ # Auto-imported components
36
- │ ├── composables/ # Auto-imported logic
37
- │ ├── layouts/
38
- │ ├── pages/ # File-based routing
39
- │ ├── app.vue # Root component
40
- │ └── router.options.ts
41
- ├── server/ # Nitro Server Engine
42
- │ ├── api/ # API Routes (e.g. /api/users)
43
- │ ├── routes/ # Server Routes
44
- │ └── utils/ # Server-only helpers (Prisma)
45
26
  ├── prisma/
46
27
  │ └── schema.prisma
47
- ├── public/
48
- ├── nuxt.config.ts # Main Config
28
+ ├── server/
29
+ ├── api/
30
+ │ │ └── [resource]/
31
+ │ │ └── index.ts
32
+ │ └── utils/
33
+ │ └── db.ts # Prisma client
34
+ ├── composables/
35
+ │ └── useAuth.ts
36
+ ├── stores/
37
+ │ └── user.ts # Pinia store
38
+ ├── components/
39
+ │ └── ui/
40
+ ├── pages/
41
+ │ ├── index.vue
42
+ │ └── [...slug].vue
43
+ ├── layouts/
44
+ │ └── default.vue
45
+ ├── assets/
46
+ │ └── css/
47
+ │ └── main.css
48
+ ├── .env.example
49
+ ├── nuxt.config.ts
49
50
  └── package.json
50
51
  ```
51
52
 
52
53
  ---
53
54
 
54
- ## Key Concepts (2026)
55
+ ## Key Concepts
55
56
 
56
- | Concept | Description | Future Update |
57
- |---------|-------------|---------------|
58
- | **App Directory** | `app/` | Tách biệt mã nguồn ứng dụng và file cấu hình root. |
59
- | **Vapor Mode** | Opt-in performance | Render không cần Virtual DOM (như SolidJS). Bật trong `nuxt.config`. |
60
- | **Server Functions** | RPC-style calls | Gọi hàm server trực tiếp từ client (thay thế dần API routes thủ công). |
61
- | **Tailwind v4** | CSS-first | Cấu hình theme trực tiếp trong CSS, không cần `tailwind.config.js`. |
62
- | **Nuxt Islands** | Server Components | Render component cô lập trên server (`<NuxtIsland name="..." />`). |
57
+ | Concept | Description |
58
+ |---------|-------------|
59
+ | Auto-imports | Components, composables, utils |
60
+ | File-based routing | pages/ routes |
61
+ | Server Routes | server/api/ API endpoints |
62
+ | Composables | Reusable reactive logic |
63
+ | Pinia | State management |
63
64
 
64
65
  ---
65
66
 
@@ -67,68 +68,34 @@ project-name/
67
68
 
68
69
  | Variable | Purpose |
69
70
  |----------|---------|
70
- | DATABASE_URL | Prisma connection string (PostgreSQL) |
71
- | NUXT_PUBLIC_APP_URL | Canonical URL |
72
- | NUXT_SESSION_PASSWORD | Session encryption key |
71
+ | DATABASE_URL | Prisma connection |
72
+ | NUXT_PUBLIC_APP_URL | Public URL |
73
73
 
74
74
  ---
75
75
 
76
76
  ## Setup Steps
77
77
 
78
- 1. Initialize Project:
79
- ```bash
80
- npx nuxi@latest init my-app
81
- # Select "Nuxt 4 structure" if prompted
82
- ```
83
-
84
- 2. Install Core Deps:
85
- ```bash
86
- npm install @pinia/nuxt @prisma/client zod
87
- npm install -D prisma
88
- ```
89
-
90
- 3. Setup Tailwind v4:
91
- Install the Vite plugin (new standard):
92
- ```bash
93
- npm install tailwindcss @tailwindcss/vite
94
- ```
95
-
96
- Add to `nuxt.config.ts`:
78
+ 1. `npx nuxi@latest init {{name}}`
79
+ 2. `cd {{name}}`
80
+ 3. `npm install @pinia/nuxt @prisma/client prisma zod`
81
+ 4. `npm install -D @nuxtjs/tailwindcss`
82
+ 5. Add modules to `nuxt.config.ts`:
97
83
  ```ts
98
- import tailwindcss from '@tailwindcss/vite'
99
- export default defineNuxtConfig({
100
- vite: {
101
- plugins: [tailwindcss()]
102
- },
103
- css: ['~/assets/css/main.css']
104
- })
105
- ```
106
-
107
- 4. Configure CSS:
108
- In `app/assets/css/main.css`:
109
- ```css
110
- @import "tailwindcss";
111
- @theme {
112
- --color-primary: oklch(0.6 0.15 150);
113
- }
114
- ```
115
-
116
- 5. Run Development:
117
- ```bash
118
- npm run dev
119
- # Runs with Turbo/Vite
84
+ modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']
120
85
  ```
86
+ 6. `npx prisma init`
87
+ 7. Configure schema
88
+ 8. `npx prisma db push`
89
+ 9. `npm run dev`
121
90
 
122
91
  ---
123
92
 
124
93
  ## Best Practices
125
94
 
126
- - **Vapor Mode**: Kích hoạt cho các component nặng về render:
127
- ```ts
128
- <script setup lang="ts" vapor>
129
- // Component này sẽ compile sang chế độ Vapor (No VDOM)
130
- </script>
131
- ```
132
- - **Data Fetching**: Sử dụng `useFetch` với `server: false` cho các tác vụ client-only, hoặc dùng Server Functions để type-safety tốt hơn.
133
- - **State**: Dùng `defineStore` (Pinia) cho global state, `useState` của Nuxt cho state đơn giản chia sẻ giữa Server/Client.
134
- - **Type Safety**: Tự động tạo type cho API routes (`$fetch` typed automatically).
95
+ - Use `<script setup>` for components
96
+ - Composables for reusable logic
97
+ - Pinia stores in `stores/` folder
98
+ - Server routes for API logic
99
+ - Auto-import for clean code
100
+ - TypeScript for type safety
101
+ - See `@[skills/vue-expert]` for Vue patterns
@@ -3,117 +3,91 @@ name: react-native-app
3
3
  description: React Native mobile app template principles. Expo, TypeScript, navigation.
4
4
  ---
5
5
 
6
- # React Native App Template (2026 Edition)
7
-
8
- Modern mobile app template, optimized for New Architecture and React 19.
6
+ # React Native App Template
9
7
 
10
8
  ## Tech Stack
11
9
 
12
- | Component | Technology | Version / Notes |
13
- |-----------|------------|-----------------|
14
- | Core | React Native + Expo | SDK 52+ (New Architecture Enabled) |
15
- | Language | TypeScript | v5+ (Strict Mode) |
16
- | UI Logic | React | v19 (React Compiler, auto-memoization) |
17
- | Navigation | Expo Router | v4+ (File-based, Universal Links) |
18
- | Styling | NativeWind | v4.0 (Tailwind v4, CSS-first config) |
19
- | State | Zustand + React Query | v5+ (Async State Management) |
20
- | Storage | Expo SecureStore | Encrypted local storage |
10
+ | Component | Technology |
11
+ |-----------|------------|
12
+ | Framework | React Native + Expo |
13
+ | Language | TypeScript |
14
+ | Navigation | Expo Router |
15
+ | State | Zustand + React Query |
16
+ | Styling | NativeWind |
17
+ | Testing | Jest + RNTL |
21
18
 
22
19
  ---
23
20
 
24
21
  ## Directory Structure
25
22
 
26
- Standardized structure for Expo Router and NativeWind v4.
27
-
28
23
  ```
29
24
  project-name/
30
- ├── app/ # Expo Router (File-based routing)
31
- │ ├── _layout.tsx # Root Layout (Stack/Tabs config)
32
- │ ├── index.tsx # Main Screen
33
- │ ├── (tabs)/ # Route Group for Tab Bar
34
- │ ├── _layout.tsx
35
- │ │ ├── home.tsx
36
- │ │ └── profile.tsx
37
- │ ├── +not-found.tsx # 404 Page
38
- │ └── [id].tsx # Dynamic Route (Typed)
25
+ ├── app/ # Expo Router (file-based)
26
+ │ ├── _layout.tsx # Root layout
27
+ │ ├── index.tsx # Home
28
+ │ ├── (tabs)/ # Tab navigation
29
+ └── [id].tsx # Dynamic route
39
30
  ├── components/
40
- │ ├── ui/ # Primitive Components (Button, Text)
41
- │ └── features/ # Complex Components
42
- ├── hooks/ # Custom Hooks
31
+ │ ├── ui/ # Reusable
32
+ │ └── features/
33
+ ├── hooks/
43
34
  ├── lib/
44
- │ ├── api.ts # Axios/Fetch client
45
- │ └── storage.ts # SecureStore wrapper
46
- ├── store/ # Zustand stores
47
- ├── constants/ # Colors, Theme config
48
- ├── assets/ # Fonts, Images
49
- ├── global.css # Entry point for NativeWind v4
50
- ├── tailwind.config.ts # Tailwind Config (if custom theme needed)
51
- ├── babel.config.js # NativeWind Babel Plugin
52
- └── app.json # Expo Config
35
+ │ ├── api.ts
36
+ │ └── storage.ts
37
+ ├── store/
38
+ ├── constants/
39
+ └── app.json
53
40
  ```
54
41
 
55
42
  ---
56
43
 
57
- ## Navigation Patterns (Expo Router)
44
+ ## Navigation Patterns
58
45
 
59
- | Pattern | Description | Implement |
60
- |---------|-------------|-----------|
61
- | Stack | Hierarchical navigation (Push/Pop) | `<Stack />` in `_layout.tsx` |
62
- | Tabs | Bottom navigation bar | `<Tabs />` in `(tabs)/_layout.tsx` |
63
- | Drawer | Side slide-out menu | `expo-router/drawer` |
64
- | Modals | Overlay screens | `presentation: 'modal'` in Stack screen |
46
+ | Pattern | Use |
47
+ |---------|-----|
48
+ | Stack | Page hierarchy |
49
+ | Tabs | Bottom navigation |
50
+ | Drawer | Side menu |
51
+ | Modal | Overlay screens |
65
52
 
66
53
  ---
67
54
 
68
- ## Key Packages & Purpose
55
+ ## State Management
69
56
 
70
- | Package | Purpose |
71
- |---------|---------|
72
- | expo-router | File-based routing (Next.js like) |
73
- | nativewind | Use Tailwind CSS classes in React Native |
74
- | react-native-reanimated | Smooth animations (runs on UI thread) |
75
- | @tanstack/react-query | Server state management, caching, pre-fetching |
76
- | zustand | Global state management (lighter than Redux) |
77
- | expo-image | Optimized image rendering for performance |
57
+ | Type | Tool |
58
+ |------|------|
59
+ | Local | Zustand |
60
+ | Server | React Query |
61
+ | Forms | React Hook Form |
62
+ | Storage | Expo SecureStore |
78
63
 
79
64
  ---
80
65
 
81
- ## Setup Steps (2026 Standard)
66
+ ## Key Packages
82
67
 
83
- 1. Initialize Project:
84
- ```bash
85
- npx create-expo-app@latest my-app --template default
86
- cd my-app
87
- ```
88
-
89
- 2. Install Core Dependencies:
90
- ```bash
91
- npx expo install expo-router react-native-safe-area-context react-native-screens expo-link expo-constants expo-status-bar
92
- ```
68
+ | Package | Purpose |
69
+ |---------|---------|
70
+ | expo-router | File-based routing |
71
+ | zustand | Local state |
72
+ | @tanstack/react-query | Server state |
73
+ | nativewind | Tailwind styling |
74
+ | expo-secure-store | Secure storage |
93
75
 
94
- 3. Install NativeWind v4:
95
- ```bash
96
- npm install nativewind tailwindcss react-native-reanimated
97
- ```
76
+ ---
98
77
 
99
- 4. Configure NativeWind (Babel & CSS):
100
- - Add plugin to `babel.config.js`: `plugins: ["nativewind/babel"]`.
101
- - Create `global.css` with: `@import "tailwindcss";`.
102
- - Import `global.css` in `app/_layout.tsx`.
78
+ ## Setup Steps
103
79
 
104
- 5. Run Project:
105
- ```bash
106
- npx expo start -c
107
- # Press 'i' for iOS simulator or 'a' for Android emulator
108
- ```
80
+ 1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`
81
+ 2. `npx expo install expo-router react-native-safe-area-context`
82
+ 3. Install state: `npm install zustand @tanstack/react-query`
83
+ 4. `npx expo start`
109
84
 
110
85
  ---
111
86
 
112
- ## Best Practices (Updated)
87
+ ## Best Practices
113
88
 
114
- - **New Architecture**: Ensure `newArchEnabled: true` in `app.json` to leverage TurboModules and Fabric Renderer.
115
- - **Typed Routes**: Use Expo Router's "Typed Routes" feature for type-safe routing (e.g., `router.push('/path')`).
116
- - **React 19**: Reduce usage of `useMemo` or `useCallback` thanks to React Compiler (if enabled).
117
- - **Components**: Build UI primitives (Box, Text) with NativeWind className for reusability.
118
- - **Assets**: Use `expo-image` instead of default `<Image />` for better caching and performance.
119
- - **API**: Always wrap API calls with TanStack Query, avoid direct calls in `useEffect`.
89
+ - Expo Router for navigation
90
+ - Zustand for local, React Query for server state
91
+ - NativeWind for consistent styling
92
+ - Expo SecureStore for tokens
93
+ - Test on both iOS and Android
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  name: behavioral-modes
3
- description: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
4
- allowed-tools: Read, Glob, Grep
3
+ description: "AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type."
4
+ risk: unknown
5
+ source: community
6
+ date_added: "2026-02-27"
5
7
  ---
6
8
 
7
9
  # Behavioral Modes - Adaptive AI Operating Modes
@@ -240,3 +242,6 @@ Users can explicitly request a mode:
240
242
  /debug why login fails
241
243
  /review this pull request
242
244
  ```
245
+
246
+ ## When to Use
247
+ This skill is applicable to execute the workflow or actions described in the overview.