npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-ai-cursor

v1.0.0

Published

CLI generator that creates a complete .cursor/ AI infrastructure for frontend and backend projects

Readme

create-ai-cursor

A professional CLI generator that scaffolds a complete .cursor/ AI infrastructure for frontend and backend projects.

What This CLI Does

create-ai-cursor generates a tailored Cursor AI setup including:

  • Rules — Project coding standards (.mdc files)
  • Skills — Step-by-step agent workflows (SKILL.md files)
  • Agents — Specialized AI personas for architecture, review, and domain expertise
  • Commands — Reusable slash command templates

Each preset is customized based on your interactive answers (framework, styling, database, ORM, etc.).

Installation

# Run directly with npx (no install required)
npx create-ai-cursor

# Or install globally
npm install -g create-ai-cursor

# Or use locally in this repo
pnpm install
pnpm build
pnpm link --global

Usage

# Interactive — choose preset and answer questions
create-ai-cursor

# Frontend preset
create-ai-cursor frontend
npx create-ai-cursor frontend

# Backend preset
create-ai-cursor backend
npx create-ai-cursor backend

# Non-interactive with defaults (useful for CI/testing)
create-ai-cursor frontend --defaults
create-ai-cursor backend --defaults

Run the command from your project root. It creates a .cursor/ directory in the current working directory.

Examples

# Generate frontend Cursor setup for a Next.js project
cd my-next-app
npx create-ai-cursor frontend

# Generate backend Cursor setup for an Express API
cd my-api
npx create-ai-cursor backend

Frontend Preset

Interactive questions:

| Question | Options | |----------|---------| | Project name | Free text | | Framework | React / Next.js | | Styling | Tailwind / CSS Modules / Styled Components | | State management | React Query + Zustand / Redux Toolkit / None | | Testing | Vitest + Testing Library / Playwright / Both / None |

Generated Files

.cursor/
├── rules/
│   ├── typescript.mdc
│   ├── react.mdc
│   ├── architecture.mdc
│   ├── accessibility.mdc
│   ├── performance.mdc
│   ├── testing.mdc
│   ├── documentation.mdc
│   └── context7.mdc
├── skills/
│   ├── create-feature/SKILL.md
│   ├── refactor-component/SKILL.md
│   ├── code-review/SKILL.md
│   ├── accessibility-audit/SKILL.md
│   ├── performance-audit/SKILL.md
│   └── testing-strategy/SKILL.md
├── agents/
│   ├── frontend-architect.md
│   ├── react-expert.md
│   ├── typescript-expert.md
│   ├── performance-reviewer.md
│   ├── accessibility-reviewer.md
│   └── code-reviewer.md
└── commands/
    ├── feature.md
    ├── review.md
    ├── refactor.md
    ├── test.md
    └── docs.md

Backend Preset

Interactive questions:

| Question | Options | |----------|---------| | Project name | Free text | | Runtime | Node.js / Bun | | Framework | Express / Fastify / NestJS | | Database | PostgreSQL / MongoDB / MySQL / None | | ORM | Prisma / Drizzle / TypeORM / None | | Auth | JWT / Session / OAuth / None | | Testing | Vitest / Jest / Supertest / None |

Generated Files

.cursor/
├── rules/
│   ├── typescript.mdc
│   ├── backend-architecture.mdc
│   ├── api-design.mdc
│   ├── database.mdc
│   ├── security.mdc
│   ├── error-handling.mdc
│   ├── testing.mdc
│   ├── documentation.mdc
│   └── context7.mdc
├── skills/
│   ├── create-endpoint/SKILL.md
│   ├── database-migration/SKILL.md
│   ├── api-review/SKILL.md
│   ├── security-review/SKILL.md
│   ├── debugging/SKILL.md
│   └── testing-strategy/SKILL.md
├── agents/
│   ├── backend-architect.md
│   ├── api-expert.md
│   ├── database-expert.md
│   ├── security-reviewer.md
│   ├── testing-expert.md
│   └── code-reviewer.md
└── commands/
    ├── endpoint.md
    ├── review-api.md
    ├── migration.md
    ├── debug.md
    └── test.md

Context7 Integration

Both presets include a context7.mdc rule that instructs the AI to:

  • Use Context7 MCP for latest official documentation
  • Not rely solely on model memory for external library APIs
  • Verify APIs for React, Next.js, TypeScript, React Query, Tailwind, Prisma, Drizzle, Express, Fastify, and NestJS

Safety and Overwrite Behavior

  • Existing files are never overwritten by default
  • When a file exists, you are prompted to: Skip, Overwrite, or Overwrite all remaining
  • A final summary shows all created, overwritten, and skipped files

Development Commands

# Install dependencies
pnpm install

# Run CLI in development (with tsx)
pnpm dev frontend
pnpm dev backend

# Build for production
pnpm build

# Run built CLI
pnpm start frontend

Project Structure

src/
├── cli.ts
├── types.ts
├── presets/
│   ├── frontend.ts
│   └── backend.ts
├── generators/
│   ├── copyTemplateFiles.ts
│   ├── generateRules.ts
│   ├── generateSkills.ts
│   ├── generateAgents.ts
│   ├── generateCommands.ts
│   └── generateCursorSetup.ts
├── templates/
│   ├── frontend/
│   └── backend/
└── utils/
    ├── applyTemplate.ts
    ├── ensureDir.ts
    ├── writeFileSafe.ts
    └── logger.ts

Tech Stack

  • TypeScript (strict mode)
  • Node.js (ESM)
  • commander — CLI argument parsing
  • prompts — Interactive questions
  • fs-extra — File system operations
  • chalk — Terminal styling
  • tsx — Development execution

License

MIT