@mikulgohil/ai-kit 1.4.0 → 1.5.1
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/dist/index.js +795 -266
- package/dist/index.js.map +1 -1
- package/package.json +9 -4
- package/templates/claude-md/static-site.md +32 -0
- package/templates/cursorrules/static-site.md +22 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikulgohil/ai-kit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "AI-assisted development setup kit. Auto-detects your tech stack and generates tailored CLAUDE.md, .cursorrules, hooks, agents, context modes, slash commands, and developer guides.",
|
|
3
|
+
"version": "1.5.1",
|
|
4
|
+
"description": "AI-assisted development setup kit. Auto-detects your tech stack and generates tailored CLAUDE.md, .cursorrules, hooks, agents, context modes, slash commands, design token rules, component registries, and developer guides.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ai-kit": "./dist/index.js"
|
|
@@ -41,11 +41,16 @@
|
|
|
41
41
|
"i18n",
|
|
42
42
|
"hooks",
|
|
43
43
|
"agents",
|
|
44
|
-
"security-audit"
|
|
44
|
+
"security-audit",
|
|
45
|
+
"design-tokens",
|
|
46
|
+
"component-registry",
|
|
47
|
+
"static-site",
|
|
48
|
+
"aiignore",
|
|
49
|
+
"figma-to-code"
|
|
45
50
|
],
|
|
46
51
|
"author": "Mikul Gohil",
|
|
47
52
|
"license": "MIT",
|
|
48
|
-
"homepage": "https://
|
|
53
|
+
"homepage": "https://ai-kit-docs-beta.vercel.app/docs",
|
|
49
54
|
"repository": {
|
|
50
55
|
"type": "git",
|
|
51
56
|
"url": "https://github.com/mikulgohil/ai-kit.git"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Static Site / SSG Rules
|
|
2
|
+
|
|
3
|
+
## Output Mode
|
|
4
|
+
- This project uses static generation — pages are pre-rendered at build time
|
|
5
|
+
- Avoid server-only features that break static export: `cookies()`, `headers()`, dynamic `fetch()` without cache
|
|
6
|
+
- Use `generateStaticParams()` for dynamic routes so all pages are pre-rendered
|
|
7
|
+
- Prefer `next/image` with `sizes` and `priority` props for above-the-fold images
|
|
8
|
+
|
|
9
|
+
## Data Fetching
|
|
10
|
+
- All data must be available at build time — no runtime server calls
|
|
11
|
+
- Use `getStaticProps` (Pages Router) or async Server Components with static data (App Router)
|
|
12
|
+
- For ISR pages, set `revalidate` explicitly — never leave it undefined
|
|
13
|
+
- External API calls must be cached or use `{ next: { revalidate: N } }`
|
|
14
|
+
|
|
15
|
+
## Performance
|
|
16
|
+
- Every page should target 95+ Lighthouse score — static sites have no excuse for poor performance
|
|
17
|
+
- Minimize client-side JavaScript — prefer Server Components and HTML over interactive widgets
|
|
18
|
+
- Use `loading="lazy"` on images below the fold
|
|
19
|
+
- Avoid `useEffect` for data that can be fetched at build time
|
|
20
|
+
- Inline critical CSS when possible
|
|
21
|
+
|
|
22
|
+
## Component Patterns
|
|
23
|
+
- Default to Server Components — only add `'use client'` when interactivity is required
|
|
24
|
+
- Keep client bundles small — split interactive parts into separate client components
|
|
25
|
+
- Avoid importing large libraries in client components (e.g., `lodash`, `moment`)
|
|
26
|
+
- Use `Suspense` boundaries around dynamic content sections
|
|
27
|
+
|
|
28
|
+
## Build & Deploy
|
|
29
|
+
- Run `{{packageManager}} run build` to verify static export succeeds before committing
|
|
30
|
+
- Check that `out/` or `.next/` contains all expected HTML files
|
|
31
|
+
- Broken links = build failures in production — validate internal links
|
|
32
|
+
- Images and assets should be optimized before committing (use `next/image` or a CDN)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Static Site / SSG Rules
|
|
2
|
+
|
|
3
|
+
## Output Mode
|
|
4
|
+
- This project uses static generation — pages are pre-rendered at build time
|
|
5
|
+
- Avoid server-only features that break static export: `cookies()`, `headers()`, dynamic `fetch()` without cache
|
|
6
|
+
- Use `generateStaticParams()` for dynamic routes so all pages are pre-rendered
|
|
7
|
+
- Prefer `next/image` with `sizes` and `priority` props for above-the-fold images
|
|
8
|
+
|
|
9
|
+
## Data Fetching
|
|
10
|
+
- All data must be available at build time — no runtime server calls
|
|
11
|
+
- Use `getStaticProps` (Pages Router) or async Server Components with static data (App Router)
|
|
12
|
+
- For ISR pages, set `revalidate` explicitly — never leave it undefined
|
|
13
|
+
|
|
14
|
+
## Performance
|
|
15
|
+
- Every page should target 95+ Lighthouse score
|
|
16
|
+
- Minimize client-side JavaScript — prefer Server Components
|
|
17
|
+
- Avoid `useEffect` for data that can be fetched at build time
|
|
18
|
+
|
|
19
|
+
## Component Patterns
|
|
20
|
+
- Default to Server Components — only add `'use client'` when interactivity is required
|
|
21
|
+
- Keep client bundles small — split interactive parts into separate client components
|
|
22
|
+
- Use `Suspense` boundaries around dynamic content sections
|