AI Kit: The Open-Source CLI That Makes AI Coding Assistants Actually Useful
Every AI coding assistant starts the same way: completely clueless about your project.
You open Claude Code or Cursor, and the first thing you do is explain your stack. "This is a Next.js 15 project with App Router. We use Tailwind v4. Sitecore XM Cloud is the CMS. TypeScript strict mode is on. We have a Turborepo monorepo with three workspaces." Five minutes later you start coding. Tomorrow you do the exact same thing again.
Multiply that by every developer on the team, every session, every day. The AI tool that was supposed to save time is wasting it.
I built AI Kit to fix this. One command, and the AI knows your project forever.
The Problem Is Bigger Than You Think
When I started tracking where time went with AI coding tools, the numbers were worse than expected.
Re-explaining context was the obvious waste. But the less obvious waste was the AI getting things wrong because it lacked context. It would write Pages Router code when the project uses App Router. It would generate raw CSS when the team uses Tailwind. It would create default exports when the codebase uses named exports. Each wrong suggestion requires a correction cycle — and correction cycles cost more tokens than the original prompt.
Here are 20 problems I kept hitting, across every project and every team:
- AI forgets everything each session
- AI generates wrong framework patterns
- Developers write bad prompts
- Same mistakes happen repeatedly
- Every developer gets different AI behavior
- No quality checks on AI-generated code
- AI generates insecure code
- AI cannot handle multi-file reasoning
- No decision trail
- Onboarding takes too long
- Context gets repeated every conversation
- AI does not improve over time
- Complex tasks need multiple manual AI passes
- Switching AI tools means starting over
- AI creates components without tests, docs, or types
- No visibility into AI usage costs
- AI bloats the repo with unnecessary duplication
- No component-level AI awareness
- Setup is manual and error-prone
- AI hallucinates framework-specific APIs
Every team I talked to had the same list, just in a different order. The problems are systemic, not tool-specific. Claude Code, Cursor, Windsurf — they all start from zero without proper configuration.
What AI Kit Does
AI Kit is a CLI that scans your project once and generates everything the AI needs to be a productive team member. Not a chat wrapper. Not a prompt library. A configuration generator that makes existing tools work properly.
npx @mikulgohil/ai-kit initThat is the entire setup. AI Kit reads your package.json, config files, and directory structure. It detects your framework, router type, CMS, styling tools, TypeScript configuration, monorepo setup, package manager, Figma integration, and design tokens. Then it generates configuration files tailored to your exact stack.
What Gets Generated
Here is everything AI Kit produces from a single scan:
| Output | What It Does |
|---|---|
CLAUDE.md | Project rules for Claude Code — conventions, patterns, stack details |
.cursorrules + .cursor/rules/*.mdc | Equivalent rules for Cursor, scoped per concern |
48 skills in .claude/skills/ + .cursor/skills/ | Auto-discovered structured workflows |
16 specialized agents in .claude/agents/ | Delegated task handlers with domain expertise |
3 context modes in .claude/contexts/ | Dev, review, and research focus modes |
Hooks in .claude/settings.local.json | Automated quality checks running in real-time |
6 developer guides in ai-kit/guides/ | Effective AI usage playbooks |
Documentation scaffolds in docs/ | Structured logging templates for mistakes, decisions, and time |
ai-kit.config.json | Saved configuration with JSON Schema validation |
Every file is plain markdown or JSON. No runtime dependency. No background process. No API calls. The AI loads these files once at session start and forgets they exist — but it follows every rule in them.
Auto Stack Detection
The scanner is the core of AI Kit. It does not ask you what your stack is — it figures it out.
$ npx @mikulgohil/ai-kit init
Scanning project...
✓ Next.js 15 — App Router detected
✓ TypeScript — strict mode enabled
✓ Tailwind CSS v4 — @theme tokens found
✓ Sitecore XM Cloud — Content SDK v2
✓ Turborepo — 3 workspaces
✓ Playwright — test suite detected
✗ Figma — not detectedThe scanner checks for:
| Category | What It Detects |
|---|---|
| Frameworks | Next.js (App Router, Pages Router, Hybrid), React |
| CMS | Sitecore XM Cloud v2, Sitecore XMC v1, Sitecore JSS |
| Styling | Tailwind CSS (v3 + v4), SCSS, CSS Modules, styled-components |
| Language | TypeScript with strict mode detection |
| Monorepos | Turborepo, Nx, Lerna, pnpm workspaces |
| Design | Figma MCP, design tokens (Tailwind config, CSS variables) |
| Tools | Playwright, Storybook, ESLint, Prettier, Biome, Snyk, Knip |
| MCP Servers | Playwright, Figma, GitHub, Context7, Perplexity |
| Package Managers | npm, pnpm, yarn, bun |
Detection is based on package.json dependencies, config file existence, and directory structure — not magic strings or user input. If your project has @sitecore-jss/sitecore-jss-nextjs in dependencies, AI Kit knows it is a Sitecore project and generates Sitecore-specific rules.
48 Skills: Stop Writing Prompts From Scratch
This is where AI Kit changes how teams actually use AI tools. Instead of every developer writing their own prompts for common tasks, AI Kit ships 48 pre-built skills.
Skills are auto-discovered. You do not type a command — the AI reads skill descriptions and applies the right one based on what you are doing.
Example: You say "create a ProductCard component." The AI automatically loads the new-component skill, which:
- Asks 10 structured questions (props, Server/Client, data fetching, responsive needs)
- Reads an existing component to match your project's patterns
- Generates component + types + tests + docs together
- Follows your exact conventions — because it read them in
CLAUDE.md
Here is the full skill library across 8 categories:
| Category | Skills |
|---|---|
| Getting Started | prompt-help, understand |
| Building | new-component, new-page, api-route, error-boundary, extract-hook, figma-to-code, design-tokens, schema-gen, storybook-gen, scaffold-spec |
| Quality | review, pre-pr, test, accessibility-audit, security-check, responsive-check, type-fix, perf-audit, bundle-check, i18n-check, test-gaps |
| Maintenance | fix-bug, refactor, optimize, migrate, dep-check, sitecore-debug, upgrade |
| Workflow | document, commit-msg, env-setup, changelog, release, pr-description, standup, learn-from-pr, release-notes |
| Session | save-session, resume-session, checkpoint |
| Orchestration | orchestrate, quality-gate, harness-audit |
| Requirements | deep-interview, clarify-requirements |
Skills work in both Claude Code and Cursor. Same 48 workflows, both tools.
16 Specialized Agents
When a task requires focused expertise, you delegate to an agent. Each agent has a specific domain, specific tools, and a structured workflow.
| Agent | What It Does |
|---|---|
@planner | Break features into implementation plans with dependencies |
@code-reviewer | Deep quality review — patterns, performance, types |
@security-reviewer | OWASP Top 10, XSS, CSRF, secrets detection |
@build-resolver | Diagnose and fix build errors and type conflicts |
@doc-updater | Keep documentation in sync with code changes |
@refactor-cleaner | Find and remove dead code and unnecessary complexity |
@architect | SSR/SSG/ISR strategy, component hierarchy, data flow |
@tdd-guide | Test-driven development workflow guidance |
@ci-debugger | Analyze CI/CD failures, parse logs, suggest fixes |
@data-scientist | ML pipelines, model evaluation, data analysis |
@performance-profiler | Core Web Vitals, bundle analysis, runtime profiling |
@migration-specialist | Framework upgrades, breaking change detection, codemods |
@dependency-auditor | Vulnerability scanning, license compliance, bundle impact |
@api-designer | REST/GraphQL API design, schema validation |
@e2e-runner | Playwright tests with Page Object Model (conditional) |
@sitecore-specialist | Sitecore XM Cloud patterns (conditional) |
14 agents are generated for every project. Two are conditional — @e2e-runner only appears when Playwright is detected, and @sitecore-specialist only when Sitecore is detected.
The difference between skills and agents: skills are structured workflows you follow, agents are specialists you delegate to. Use /review to review code yourself with AI guidance. Use @code-reviewer to hand off the entire review.
Hooks: Quality That Runs Automatically
Hooks are automated checks that fire as the AI writes code — no manual invocation needed.
Three profiles, chosen during setup:
| Profile | What Runs |
|---|---|
| Minimal | Auto-format + git push safety |
| Standard | + TypeScript type-check + console.log warnings + mistakes auto-capture |
| Strict | + ESLint check + pre-commit AI review + bundle impact warning |
The mistakes auto-capture hook deserves special mention. Every time a build fails, a lint error fires, or a TypeScript error occurs, the hook automatically logs it into docs/mistakes-log.md with a timestamp and error preview. The AI reads this log in future sessions and avoids repeating the same mistakes. The system literally learns from its failures.
14 CLI Commands
AI Kit is not just init and update. It ships 14 commands for ongoing project maintenance:
| Command | What It Does |
|---|---|
ai-kit init | Scan project and generate all configs |
ai-kit update | Re-scan and refresh generated content (preserves custom edits) |
ai-kit health | One-glance A-F project health dashboard |
ai-kit audit | Security and configuration health check |
ai-kit doctor | Diagnose setup issues and misconfigurations |
ai-kit stats | Project complexity metrics and analysis |
ai-kit tokens | Token usage summary, cost estimates, budget alerts |
ai-kit diff | Preview what would change on update (dry run) |
ai-kit export | Export rules to Windsurf, Aider, Cline |
ai-kit patterns | Generate pattern library from recurring code patterns |
ai-kit dead-code | Find unused components and dead code |
ai-kit drift | Detect drift between code and .ai.md documentation |
ai-kit component-registry | Generate component catalog for AI discovery |
ai-kit reset | Remove all AI Kit generated files cleanly |
The health command is particularly useful. It combines setup integrity, security, stack detection, tools/MCP status, and documentation checks into a single view with an A-F grade. One command tells you if your AI setup is healthy.
Multi-Tool Support
AI Kit does not lock you into one AI tool. A single scan generates configs for five tools:
| Tool | What Gets Generated |
|---|---|
| Claude Code | CLAUDE.md + skills + agents + hooks + contexts |
| Cursor | .cursorrules + .cursor/rules/*.mdc + .cursor/skills/ |
| Windsurf | .windsurfrules (via ai-kit export) |
| Aider | .aider.conf.yml (via ai-kit export) |
| Cline | .clinerules (via ai-kit export) |
Switch tools without losing project knowledge. Developer A uses Claude Code, Developer B uses Cursor. Both follow the same project rules from the same source.
Safe Updates
Teams add custom rules over time. AI Kit respects those. Generated content is wrapped in markers:
# My Team's Custom Rules <- preserved on update
<!-- AI-KIT:START -->
[generated content] <- refreshed on update
<!-- AI-KIT:END -->
# More Custom Rules <- preserved on updateRun ai-kit update when the stack changes — only the generated section refreshes. Custom skills, agents, and .mdc files you added manually are never overwritten.
JSON Schema for Configuration
As of v1.8.0, ai-kit.config.json includes a $schema field:
{
"$schema": "https://ai-kit.mikul.me/schema/ai-kit.config.schema.json",
"version": "1.8.0",
"scanResult": { ... },
"strictness": "standard",
"hookProfile": "standard",
"tools": { "claude": true, "cursor": true }
}Editors with JSON Schema support (VS Code, JetBrains) now provide autocomplete and validation for all config fields. No more guessing what values are valid.
The Impact
Here is what changes after running ai-kit init:
| Metric | Before AI Kit | After AI Kit |
|---|---|---|
| Context setup per session | 5-10 min re-explaining | Auto-loaded in 30 seconds |
| Code review cycles per PR | 2-4 rounds | 1-2 rounds |
| Component creation time | 30-60 min | 10-15 min |
| New developer onboarding | 1-2 weeks | 2-3 days |
| Security issues caught | At PR review or production | At development time |
| Knowledge retention | Lost when developers leave | Logged in decisions and mistakes |
| AI tool switching cost | Start over from scratch | Zero — same rules, 5+ tools |
For a team of 5 developers, that is roughly 50-75% fewer code review cycles, 60-70% faster component creation, and documentation that actually exists.
Architecture
For those who want to understand how AI Kit works under the hood, here is the architecture:
src/
├── index.ts # CLI entry point (thin — delegates to cli/)
├── cli/
│ ├── error-handler.ts # Shared error wrapper for all commands
│ └── register-commands.ts # All 14 command registrations
├── commands/ # 14 command implementations
├── scanner/ # Stack detection modules
│ ├── nextjs.ts # Next.js detection
│ ├── sitecore.ts # Sitecore detection
│ ├── styling.ts # Styling tools detection
│ ├── typescript.ts # TypeScript detection
│ ├── monorepo.ts # Monorepo tool detection
│ ├── figma.ts # Figma integration detection
│ ├── tools.ts # Dev tools detection
│ └── mcp.ts # MCP server detection
├── generator/ # Output generation
│ ├── assembler.ts # Template reading and assembly
│ ├── claude-md.ts # CLAUDE.md generation
│ ├── cursorrules.ts # .cursorrules generation
│ ├── cursor-mdc.ts # .cursor/rules/*.mdc generation
│ └── config.ts # ai-kit.config.json generation
└── copier/ # Asset copying
├── skills.ts # Skill copying (Claude + Cursor)
├── commands.ts # Legacy slash command copying
├── guides.ts # Guide copying
└── docs.ts # Doc scaffold copyingThe scanner modules are independent — each detects one technology and returns a typed result. The generator takes the combined scan result and selects template fragments based on what was detected. Templates use {{variable}} placeholders that get replaced during generation.
The tool is built with TypeScript, compiled with tsup, and distributed via npm. Zero runtime dependencies beyond Commander.js (CLI framework), chalk (terminal colors), ora (spinners), fs-extra (file operations), and @inquirer/prompts (interactive prompts).
Quick Start
# Run in any project directory
npx @mikulgohil/ai-kit init
# Follow the interactive prompts (30 seconds)
# Choose: Claude Code, Cursor, or both
# Choose: strictness level (relaxed / standard / strict)
# Choose: hook profile (minimal / standard / strict)
# Done — commit the generated files
git add -A && git commit -m "chore: add ai-kit configuration"Every developer who clones or pulls the repo now gets identical, project-aware AI configuration. Zero setup on their end.
Ongoing Maintenance
# Re-scan after stack changes
npx @mikulgohil/ai-kit update
# Check project health
npx @mikulgohil/ai-kit health
# Security audit
npx @mikulgohil/ai-kit audit
# Token usage and cost tracking
npx @mikulgohil/ai-kit tokens
# Preview changes before updating
npx @mikulgohil/ai-kit diffWho Is This For?
Individual developers — Stop re-explaining context. Let AI Kit teach the AI your project once. Every conversation starts informed.
Tech leads — Enforce coding standards through AI tools instead of code review comments. Standards are followed automatically, not policed manually.
Teams — Same AI experience across every developer and every project. New hires get the same AI context as senior engineers.
Open source maintainers — Contributors get project-aware AI assistance from their first PR. Standards are in the repo, not in your head.
Try It
AI Kit is free, open source, and MIT licensed.
- npm: npmjs.com/package/@mikulgohil/ai-kit
- GitHub: github.com/mikulgohil/ai-kit
- Documentation: ai-kit.mikul.me
npx @mikulgohil/ai-kit initOne command. 30 seconds. Your AI assistant goes from generic to project-aware.
If you are rolling out AI-assisted development across a team and want hands-on help — reach out. I am happy to help with setup, custom configuration, and training.