@mikulgohil/ai-kit 1.0.1 → 1.2.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/README.md +85 -12
- package/agents/build-resolver.md +54 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/doc-updater.md +46 -0
- package/agents/e2e-runner.md +64 -0
- package/agents/planner.md +56 -0
- package/agents/refactor-cleaner.md +58 -0
- package/agents/security-reviewer.md +67 -0
- package/agents/sitecore-specialist.md +65 -0
- package/commands/bundle-check.md +118 -0
- package/commands/changelog.md +103 -0
- package/commands/checkpoint.md +78 -0
- package/commands/harness-audit.md +73 -0
- package/commands/i18n-check.md +138 -0
- package/commands/orchestrate.md +67 -0
- package/commands/perf-audit.md +131 -0
- package/commands/quality-gate.md +82 -0
- package/commands/release.md +90 -0
- package/commands/resume-session.md +40 -0
- package/commands/save-session.md +65 -0
- package/commands/schema-gen.md +132 -0
- package/commands/storybook-gen.md +91 -0
- package/contexts/dev.md +35 -0
- package/contexts/research.md +56 -0
- package/contexts/review.md +49 -0
- package/dist/index.js +1532 -118
- package/dist/index.js.map +1 -1
- package/guides/getting-started.md +74 -21
- package/guides/hooks-and-agents.md +124 -0
- package/package.json +15 -4
- package/templates/claude-md/base.md +4 -2
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
`ai-kit init` scanned your project and generated AI configuration files tailored to your tech stack. Here's what was created:
|
|
6
6
|
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|
|
7
|
+
| File / Directory | Purpose |
|
|
8
|
+
|-----------------|---------|
|
|
9
9
|
| `CLAUDE.md` | Rules for Claude Code — tells the AI about your project |
|
|
10
10
|
| `.cursorrules` | Rules for Cursor — same purpose, Cursor format |
|
|
11
|
-
| `.claude/
|
|
11
|
+
| `.claude/skills/` | Skills — pre-built workflows for common tasks |
|
|
12
|
+
| `.claude/agents/` | Agents — specialized AI assistants for delegation |
|
|
13
|
+
| `.claude/contexts/` | Context modes — dev, review, and research modes |
|
|
14
|
+
| `.claude/settings.local.json` | Hooks — automated checks that run as you code |
|
|
12
15
|
| `ai-kit/guides/` | Guides — tips and playbooks for using AI effectively |
|
|
13
16
|
| `docs/` | Doc templates — for tracking decisions and mistakes |
|
|
14
17
|
| `ai-kit.config.json` | Config — what AI Kit detected and generated |
|
|
@@ -16,7 +19,7 @@
|
|
|
16
19
|
## First Thing to Do
|
|
17
20
|
|
|
18
21
|
### If you use Claude Code:
|
|
19
|
-
Run the `/prompt-help` command. It's an interactive prompt builder that asks you all the right questions before generating a perfect prompt.
|
|
22
|
+
Run the `/prompt-help` command. It's an interactive prompt builder that asks you all the right questions before generating a perfect prompt.
|
|
20
23
|
|
|
21
24
|
```
|
|
22
25
|
/prompt-help
|
|
@@ -25,18 +28,67 @@ Run the `/prompt-help` command. It's an interactive prompt builder that asks you
|
|
|
25
28
|
### If you use Cursor:
|
|
26
29
|
Open any file and use Cmd+K or the chat panel. The `.cursorrules` file is automatically loaded and gives Cursor context about your project.
|
|
27
30
|
|
|
28
|
-
## Available
|
|
31
|
+
## Available Skills (Claude Code)
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
### Getting Started
|
|
34
|
+
| Skill | What it does |
|
|
35
|
+
|-------|-------------|
|
|
32
36
|
| `/prompt-help` | Interactive prompt builder — **start here** |
|
|
33
|
-
| `/
|
|
34
|
-
| `/
|
|
37
|
+
| `/understand` | Explain code in detail |
|
|
38
|
+
| `/token-tips` | Token usage optimization |
|
|
39
|
+
|
|
40
|
+
### Building
|
|
41
|
+
| Skill | What it does |
|
|
42
|
+
|-------|-------------|
|
|
35
43
|
| `/new-component` | Scaffold a new component |
|
|
36
44
|
| `/new-page` | Create a new page/route |
|
|
37
|
-
| `/
|
|
45
|
+
| `/api-route` | Scaffold an API route |
|
|
46
|
+
| `/figma-to-code` | Implement Figma designs |
|
|
47
|
+
|
|
48
|
+
### Quality & Review
|
|
49
|
+
| Skill | What it does |
|
|
50
|
+
|-------|-------------|
|
|
51
|
+
| `/review` | Deep code review |
|
|
52
|
+
| `/fix-bug` | Guided bug fix workflow |
|
|
38
53
|
| `/test` | Generate tests |
|
|
39
|
-
| `/
|
|
54
|
+
| `/quality-gate` | Run ALL quality checks at once |
|
|
55
|
+
| `/security-check` | Security vulnerability scan |
|
|
56
|
+
| `/accessibility-audit` | WCAG 2.1 AA audit |
|
|
57
|
+
|
|
58
|
+
### Session & Learning (NEW in v1.2.0)
|
|
59
|
+
| Skill | What it does |
|
|
60
|
+
|-------|-------------|
|
|
61
|
+
| `/save-session` | Save current session for later resumption |
|
|
62
|
+
| `/resume-session` | Pick up where you left off |
|
|
63
|
+
| `/checkpoint` | Snapshot all quality check results |
|
|
64
|
+
| `/orchestrate` | Coordinate multiple agents on complex tasks |
|
|
65
|
+
| `/harness-audit` | Check AI configuration health |
|
|
66
|
+
|
|
67
|
+
## Hooks (Automated Checks)
|
|
68
|
+
|
|
69
|
+
Hooks run automatically as you code — no action needed. Based on your selected profile:
|
|
70
|
+
|
|
71
|
+
- **Auto-format**: files are formatted on save (Prettier or Biome)
|
|
72
|
+
- **Type-check**: TypeScript errors caught after every edit
|
|
73
|
+
- **Console.log warning**: catches debug statements before commit
|
|
74
|
+
- **Git push safety**: reminder to review before pushing
|
|
75
|
+
|
|
76
|
+
See `ai-kit/guides/hooks-and-agents.md` for details on profiles and customization.
|
|
77
|
+
|
|
78
|
+
## Agents
|
|
79
|
+
|
|
80
|
+
Specialized AI assistants live in `.claude/agents/` and can be delegated to:
|
|
81
|
+
|
|
82
|
+
| Agent | Specialization |
|
|
83
|
+
|-------|---------------|
|
|
84
|
+
| `planner` | Implementation planning |
|
|
85
|
+
| `code-reviewer` | Quality review |
|
|
86
|
+
| `security-reviewer` | Security audit |
|
|
87
|
+
| `build-resolver` | Fix build errors |
|
|
88
|
+
| `e2e-runner` | Playwright E2E tests |
|
|
89
|
+
| `doc-updater` | Documentation sync |
|
|
90
|
+
| `refactor-cleaner` | Dead code cleanup |
|
|
91
|
+
| `sitecore-specialist` | Sitecore XM Cloud patterns |
|
|
40
92
|
|
|
41
93
|
## Tips
|
|
42
94
|
|
|
@@ -45,17 +97,18 @@ Open any file and use Cmd+K or the chat panel. The `.cursorrules` file is automa
|
|
|
45
97
|
3. **Don't start from scratch** — ask the AI to read existing code first
|
|
46
98
|
4. **One task per conversation** — keep conversations focused
|
|
47
99
|
5. **Review AI output** — always read what it generates before accepting
|
|
100
|
+
6. **Use `/checkpoint`** before and after major changes to track quality
|
|
101
|
+
7. **Use `/save-session`** before ending a long session
|
|
48
102
|
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
When you add new packages or change your project structure:
|
|
52
|
-
```bash
|
|
53
|
-
npx @mikulgohil/ai-kit update
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Removing
|
|
103
|
+
## CLI Commands
|
|
57
104
|
|
|
58
|
-
To remove all AI Kit generated files:
|
|
59
105
|
```bash
|
|
60
|
-
npx @mikulgohil/ai-kit
|
|
106
|
+
npx @mikulgohil/ai-kit update # Re-scan and update configs
|
|
107
|
+
npx @mikulgohil/ai-kit audit # Security & config health check
|
|
108
|
+
npx @mikulgohil/ai-kit doctor # Diagnose setup issues
|
|
109
|
+
npx @mikulgohil/ai-kit diff # Preview what would change on update
|
|
110
|
+
npx @mikulgohil/ai-kit stats # Project complexity metrics
|
|
111
|
+
npx @mikulgohil/ai-kit tokens # Token usage and cost estimates
|
|
112
|
+
npx @mikulgohil/ai-kit export # Export to Windsurf, Aider, Cline
|
|
113
|
+
npx @mikulgohil/ai-kit reset # Remove all generated files
|
|
61
114
|
```
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Hooks, Agents & Context Modes
|
|
2
|
+
|
|
3
|
+
AI Kit v1.2.0 introduces automated hooks, specialized agents, and context modes to supercharge your AI-assisted development workflow.
|
|
4
|
+
|
|
5
|
+
## Hooks
|
|
6
|
+
|
|
7
|
+
Hooks are automated checks that run as you code — no manual invocation needed.
|
|
8
|
+
|
|
9
|
+
### How They Work
|
|
10
|
+
|
|
11
|
+
Hooks are configured in `.claude/settings.local.json` and fire on specific events:
|
|
12
|
+
|
|
13
|
+
| Event | When It Fires |
|
|
14
|
+
|-------|--------------|
|
|
15
|
+
| **PreToolUse** | Before a tool runs (e.g., before `git push`) |
|
|
16
|
+
| **PostToolUse** | After a file is edited or written |
|
|
17
|
+
| **Stop** | After each AI response completes |
|
|
18
|
+
|
|
19
|
+
### Hook Profiles
|
|
20
|
+
|
|
21
|
+
AI Kit generates hooks based on your selected profile:
|
|
22
|
+
|
|
23
|
+
| Profile | What Runs |
|
|
24
|
+
|---------|-----------|
|
|
25
|
+
| **Minimal** | Auto-format + git push safety warning |
|
|
26
|
+
| **Standard** | Minimal + TypeScript type-check + console.log warnings |
|
|
27
|
+
| **Strict** | Standard + ESLint check + stop-time console.log audit |
|
|
28
|
+
|
|
29
|
+
### Changing Your Profile
|
|
30
|
+
|
|
31
|
+
Re-run `ai-kit init` and select a different hook profile, or edit `.claude/settings.local.json` directly.
|
|
32
|
+
|
|
33
|
+
### Disabling a Hook
|
|
34
|
+
|
|
35
|
+
Remove or comment out the hook entry in `.claude/settings.local.json`. The file is gitignored by default, so your changes are local.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Agents
|
|
40
|
+
|
|
41
|
+
Agents are specialized AI assistants that can be delegated to for specific tasks. They live in `.claude/agents/`.
|
|
42
|
+
|
|
43
|
+
### Available Agents
|
|
44
|
+
|
|
45
|
+
| Agent | What It Does |
|
|
46
|
+
|-------|-------------|
|
|
47
|
+
| **planner** | Breaks down features into implementation plans |
|
|
48
|
+
| **code-reviewer** | Deep code review for quality, patterns, and security |
|
|
49
|
+
| **security-reviewer** | Focused security audit (XSS, CSRF, OWASP Top 10) |
|
|
50
|
+
| **build-resolver** | Diagnoses and fixes build/type errors |
|
|
51
|
+
| **e2e-runner** | Generates and runs Playwright E2E tests |
|
|
52
|
+
| **doc-updater** | Syncs documentation with code changes |
|
|
53
|
+
| **refactor-cleaner** | Finds and removes dead code |
|
|
54
|
+
| **sitecore-specialist** | Sitecore XM Cloud patterns and debugging |
|
|
55
|
+
|
|
56
|
+
### How to Use Agents
|
|
57
|
+
|
|
58
|
+
In Claude Code, agents are automatically available for delegation. You can also invoke them directly:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
@planner Plan the implementation for adding dark mode support
|
|
62
|
+
@code-reviewer Review the changes in src/components/Header.tsx
|
|
63
|
+
@e2e-runner Write E2E tests for the checkout flow
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Conditional Agents
|
|
67
|
+
|
|
68
|
+
Some agents are only generated when their tools are detected:
|
|
69
|
+
- **e2e-runner** — only if Playwright is installed
|
|
70
|
+
- **sitecore-specialist** — only if Sitecore XM Cloud is detected
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Context Modes
|
|
75
|
+
|
|
76
|
+
Context modes change how the AI approaches your work. They live in `.claude/contexts/`.
|
|
77
|
+
|
|
78
|
+
### Available Modes
|
|
79
|
+
|
|
80
|
+
| Mode | Best For |
|
|
81
|
+
|------|----------|
|
|
82
|
+
| **dev** | Building features — focus on implementation |
|
|
83
|
+
| **review** | Reviewing code — focus on quality and security |
|
|
84
|
+
| **research** | Exploring code — focus on understanding and documentation |
|
|
85
|
+
|
|
86
|
+
### How to Use
|
|
87
|
+
|
|
88
|
+
Reference the context in your prompt:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Using review context, check the authentication flow in src/lib/auth.ts
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Session Management
|
|
97
|
+
|
|
98
|
+
New skills help you persist context across sessions:
|
|
99
|
+
|
|
100
|
+
| Skill | What It Does |
|
|
101
|
+
|-------|-------------|
|
|
102
|
+
| `/save-session` | Save current session state and decisions |
|
|
103
|
+
| `/resume-session` | Restore context from a previous session |
|
|
104
|
+
| `/checkpoint` | Run all quality checks and record results |
|
|
105
|
+
|
|
106
|
+
### Quality & Orchestration
|
|
107
|
+
|
|
108
|
+
| Skill | What It Does |
|
|
109
|
+
|-------|-------------|
|
|
110
|
+
| `/quality-gate` | Run all checks: types, lint, format, tests, a11y, security |
|
|
111
|
+
| `/orchestrate` | Coordinate multiple agents for complex tasks |
|
|
112
|
+
| `/harness-audit` | Check AI configuration health |
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Security Audit
|
|
117
|
+
|
|
118
|
+
Run `ai-kit audit` to check your AI agent setup for:
|
|
119
|
+
|
|
120
|
+
- Secrets accidentally committed in CLAUDE.md or settings
|
|
121
|
+
- Missing hooks or misconfigured agents
|
|
122
|
+
- .env files not gitignored
|
|
123
|
+
- MCP server security
|
|
124
|
+
- Overall configuration health score (A-F grade)
|
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, slash commands, and developer guides.",
|
|
3
|
+
"version": "1.2.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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ai-kit": "./dist/index.js"
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"templates",
|
|
12
12
|
"commands",
|
|
13
13
|
"guides",
|
|
14
|
-
"docs-scaffolds"
|
|
14
|
+
"docs-scaffolds",
|
|
15
|
+
"agents",
|
|
16
|
+
"contexts"
|
|
15
17
|
],
|
|
16
18
|
"scripts": {
|
|
17
19
|
"build": "tsup",
|
|
@@ -26,11 +28,20 @@
|
|
|
26
28
|
"ai",
|
|
27
29
|
"claude-code",
|
|
28
30
|
"cursor",
|
|
31
|
+
"windsurf",
|
|
32
|
+
"aider",
|
|
33
|
+
"cline",
|
|
29
34
|
"developer-tools",
|
|
30
35
|
"cli",
|
|
31
36
|
"nextjs",
|
|
32
37
|
"tailwind",
|
|
33
|
-
"sitecore"
|
|
38
|
+
"sitecore",
|
|
39
|
+
"docker",
|
|
40
|
+
"storybook",
|
|
41
|
+
"i18n",
|
|
42
|
+
"hooks",
|
|
43
|
+
"agents",
|
|
44
|
+
"security-audit"
|
|
34
45
|
],
|
|
35
46
|
"author": "Mikul Gohil",
|
|
36
47
|
"license": "MIT",
|
|
@@ -131,8 +131,10 @@ These standards are enforced across all projects to ensure consistency.
|
|
|
131
131
|
- Document significant changes in `docs/` if the directory exists
|
|
132
132
|
- When modifying a component, update its doc file's change log
|
|
133
133
|
|
|
134
|
-
## Commands
|
|
135
|
-
Available
|
|
134
|
+
## Skills & Commands
|
|
135
|
+
Available as auto-discovered skills (`.claude/skills/`, `.cursor/skills/`) and legacy commands (`.claude/commands/`).
|
|
136
|
+
|
|
137
|
+
AI will auto-discover and apply these when your task matches. You can also invoke them manually with `/skill-name`.
|
|
136
138
|
|
|
137
139
|
**Getting Started**
|
|
138
140
|
- `/prompt-help` — Interactive prompt builder (start here if unsure how to ask)
|