Skip to content

AI Kit: The Open-Source CLI That Makes AI Coding Assistants Actually Useful

14 min read2649 words

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:

  1. AI forgets everything each session
  2. AI generates wrong framework patterns
  3. Developers write bad prompts
  4. Same mistakes happen repeatedly
  5. Every developer gets different AI behavior
  6. No quality checks on AI-generated code
  7. AI generates insecure code
  8. AI cannot handle multi-file reasoning
  9. No decision trail
  10. Onboarding takes too long
  11. Context gets repeated every conversation
  12. AI does not improve over time
  13. Complex tasks need multiple manual AI passes
  14. Switching AI tools means starting over
  15. AI creates components without tests, docs, or types
  16. No visibility into AI usage costs
  17. AI bloats the repo with unnecessary duplication
  18. No component-level AI awareness
  19. Setup is manual and error-prone
  20. 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 init

That 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:

OutputWhat It Does
CLAUDE.mdProject rules for Claude Code — conventions, patterns, stack details
.cursorrules + .cursor/rules/*.mdcEquivalent 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.jsonAutomated 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.jsonSaved 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 detected

The scanner checks for:

CategoryWhat It Detects
FrameworksNext.js (App Router, Pages Router, Hybrid), React
CMSSitecore XM Cloud v2, Sitecore XMC v1, Sitecore JSS
StylingTailwind CSS (v3 + v4), SCSS, CSS Modules, styled-components
LanguageTypeScript with strict mode detection
MonoreposTurborepo, Nx, Lerna, pnpm workspaces
DesignFigma MCP, design tokens (Tailwind config, CSS variables)
ToolsPlaywright, Storybook, ESLint, Prettier, Biome, Snyk, Knip
MCP ServersPlaywright, Figma, GitHub, Context7, Perplexity
Package Managersnpm, 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:

  1. Asks 10 structured questions (props, Server/Client, data fetching, responsive needs)
  2. Reads an existing component to match your project's patterns
  3. Generates component + types + tests + docs together
  4. Follows your exact conventions — because it read them in CLAUDE.md

Here is the full skill library across 8 categories:

CategorySkills
Getting Startedprompt-help, understand
Buildingnew-component, new-page, api-route, error-boundary, extract-hook, figma-to-code, design-tokens, schema-gen, storybook-gen, scaffold-spec
Qualityreview, pre-pr, test, accessibility-audit, security-check, responsive-check, type-fix, perf-audit, bundle-check, i18n-check, test-gaps
Maintenancefix-bug, refactor, optimize, migrate, dep-check, sitecore-debug, upgrade
Workflowdocument, commit-msg, env-setup, changelog, release, pr-description, standup, learn-from-pr, release-notes
Sessionsave-session, resume-session, checkpoint
Orchestrationorchestrate, quality-gate, harness-audit
Requirementsdeep-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.

AgentWhat It Does
@plannerBreak features into implementation plans with dependencies
@code-reviewerDeep quality review — patterns, performance, types
@security-reviewerOWASP Top 10, XSS, CSRF, secrets detection
@build-resolverDiagnose and fix build errors and type conflicts
@doc-updaterKeep documentation in sync with code changes
@refactor-cleanerFind and remove dead code and unnecessary complexity
@architectSSR/SSG/ISR strategy, component hierarchy, data flow
@tdd-guideTest-driven development workflow guidance
@ci-debuggerAnalyze CI/CD failures, parse logs, suggest fixes
@data-scientistML pipelines, model evaluation, data analysis
@performance-profilerCore Web Vitals, bundle analysis, runtime profiling
@migration-specialistFramework upgrades, breaking change detection, codemods
@dependency-auditorVulnerability scanning, license compliance, bundle impact
@api-designerREST/GraphQL API design, schema validation
@e2e-runnerPlaywright tests with Page Object Model (conditional)
@sitecore-specialistSitecore 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:

ProfileWhat Runs
MinimalAuto-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:

CommandWhat It Does
ai-kit initScan project and generate all configs
ai-kit updateRe-scan and refresh generated content (preserves custom edits)
ai-kit healthOne-glance A-F project health dashboard
ai-kit auditSecurity and configuration health check
ai-kit doctorDiagnose setup issues and misconfigurations
ai-kit statsProject complexity metrics and analysis
ai-kit tokensToken usage summary, cost estimates, budget alerts
ai-kit diffPreview what would change on update (dry run)
ai-kit exportExport rules to Windsurf, Aider, Cline
ai-kit patternsGenerate pattern library from recurring code patterns
ai-kit dead-codeFind unused components and dead code
ai-kit driftDetect drift between code and .ai.md documentation
ai-kit component-registryGenerate component catalog for AI discovery
ai-kit resetRemove 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:

ToolWhat Gets Generated
Claude CodeCLAUDE.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 update

Run 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:

MetricBefore AI KitAfter AI Kit
Context setup per session5-10 min re-explainingAuto-loaded in 30 seconds
Code review cycles per PR2-4 rounds1-2 rounds
Component creation time30-60 min10-15 min
New developer onboarding1-2 weeks2-3 days
Security issues caughtAt PR review or productionAt development time
Knowledge retentionLost when developers leaveLogged in decisions and mistakes
AI tool switching costStart over from scratchZero — 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 copying

The 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 diff

Who 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.

npx @mikulgohil/ai-kit init

One 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.