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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@vipinx/cursor-rules

v0.1.3

Published

One-shot Cursor rules generator for your tech stack

Readme

@vipinx/cursor-rules

One-shot generator that creates Cursor rules tailored to your project stack.

30-second usage

npx @vipinx/cursor-rules add
  • Detects your stack automatically
  • Generates .cursor/rules/*.mdc files in proper MDC format
  • Never overwrites: existing files are skipped to preserve your edits
  • Always creates project-specific.mdc and universal-guidelines.mdc

Available Templates (31 total)

Always Generated (2)

  • Universal Guidelines - Universal coding standards, error handling, security, testing, and conventional commits (always created)
  • Project-Specific - A template file for your repository-specific rules and conventions (always created)

Frontend Frameworks (5)

  • Next.js - Next.js App Router best practices
  • React - React components and hooks
  • Vue.js 3 - Vue Composition API
  • Angular - Angular framework
  • Svelte/SvelteKit - Svelte framework

Backend Frameworks (10)

  • Express.js - Node.js Express
  • NestJS - NestJS framework
  • Python Django - Django web framework
  • Python FastAPI - FastAPI async framework
  • Go + Fiber - Go with Fiber framework
  • PHP Laravel - Laravel framework
  • Ruby on Rails - Rails framework
  • Java Spring Boot - Spring Boot framework
  • Kotlin - Kotlin programming
  • Node.js Library (TypeScript) - TS library development

.NET Ecosystem (3)

  • C# - C# language best practices
  • .NET & ASP.NET Core - ASP.NET Core framework
  • Blazor - Blazor WebAssembly/Server

Mobile & Desktop (1)

  • Swift - iOS/macOS development

Languages (2)

  • TypeScript & JavaScript - TS/JS best practices
  • Rust - Rust programming language

Styling (1)

  • Tailwind CSS - Tailwind utility-first CSS

Database & ORM (2)

  • Prisma ORM - Prisma database toolkit
  • Supabase - Supabase database and auth

Validation & AI (2)

  • Zod Validation - Zod schema validation
  • Vercel AI SDK - AI SDK for LLM integration

Architecture & Deployment (2)

  • Edge Functions & Serverless - Edge runtime
  • Monorepo & pnpm Workspaces - Monorepo management

Universal (2)

  • Universal Guidelines - Code quality standards (alwaysApply: true)
  • Generic - Fallback for any project

Detection

Auto-detects your stack by inspecting:

  • package.json (JavaScript/TypeScript frameworks)
  • go.mod (Go projects)
  • Cargo.toml (Rust projects)
  • manage.py / requirements.txt (Python/Django/FastAPI)
  • *.csproj / *.sln (C#/.NET projects)
  • pom.xml / build.gradle (Java/Kotlin projects)
  • Gemfile (Ruby projects)
  • composer.json / artisan (PHP/Laravel)
  • Package.swift / *.xcodeproj (Swift projects)

Detection priority: Next.js > Vue > Angular > Svelte > NestJS > Express > Blazor > .NET > C# > Java Spring > Kotlin > Swift > PHP Laravel > Ruby Rails > Django > FastAPI > Rust > Go + Fiber > Node lib

If nothing matches, you get a terminal multi-select to pick templates manually.

Flags

  • --select: Skip detection and jump straight to multi-select
  • CR_NO_INTERACTIVE=1: Disable prompts (exits when nothing detected)

What it generates

All templates generate .cursor/rules/*.mdc files with:

  • MDC frontmatter (description, globs, alwaysApply)
  • Framework-specific best practices
  • Code conventions and patterns
  • Security guidelines
  • Performance tips

Example output:

.cursor/
└── rules/
    ├── nextjs.mdc
    ├── react.mdc
    ├── tailwind.mdc
    ├── universal-guidelines.mdc  # Always generated
    └── project-specific.mdc      # Always generated

Project-Specific Rules

The project-specific.mdc file is always generated and provides a dedicated place for your repository-specific rules:

  • Custom naming conventions - Document your team's naming standards
  • Architectural patterns - Explain project-specific design decisions
  • Domain terminology - Define business-specific concepts
  • Integration patterns - Document how you integrate with external services
  • Team agreements - Capture coding standards and best practices

This file is meant to be edited and committed to your repository. It won't be overwritten on subsequent runs.

File Safety Policy

Existing files are preserved: If a file with the same name already exists in .cursor/rules/, it will be skipped (not overwritten or renamed). This ensures your custom edits are never lost.

Example output when files exist:

Created files:
  ✓ .cursor/rules/react.mdc
  ✓ .cursor/rules/tailwind.mdc

Skipped files (already exist):
  ⊘ .cursor/rules/project-specific.mdc
  ⊘ .cursor/rules/universal-guidelines.mdc

Extending

Edit template files in templates/*.mdc to customize rules. Each template includes:

  • MDC frontmatter with metadata
  • Markdown content with conventions

Add new templates by:

  1. Creating a new .mdc file in templates/
  2. Creating a module in src/templates/
  3. Adding it to src/templates/index.ts
  4. Optionally adding detection logic in src/detection/detector.ts

Development

Building

npm run build    # Compile TypeScript and copy templates
npm run clean    # Remove dist directory

Publishing

  1. Update version in package.json
  2. Commit changes: git commit -am "chore: bump version to x.y.z"
  3. Tag release: git tag vx.y.z
  4. Push: git push && git push --tags
  5. Publish: npm publish

Package Contents

  • Compiled JavaScript in dist/
  • All template .mdc files
  • README and LICENSE

Package size: ~50 KB (gzipped)

Troubleshooting

  • Non-TTY / CI: When no stack is detected and there's no TTY (or CR_NO_INTERACTIVE=1), the tool exits without creating files
  • Permission issues: Ensure you run from a directory where .cursor/ can be created