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

@bastienyoussfi/cbook

v1.0.0

Published

Predefined Cursor rules for AI-assisted coding

Readme

Cursor Playbook

A package for managing reusable Cursor rules across projects. Cursor Playbook allows you to define, share, and reuse AI coding guidelines in different projects.

Installation

npm install -g @bastienyoussfi/cursor-playbook

Features

  • Add predefined rules to your project
  • Create rule groups for easy application
  • Export/import rules between projects
  • Save and apply rule profiles
  • Store user-specific rule configurations
  • Tab completion for all commands and arguments
  • JSON export/import for community sharing

Usage

Tab Completion

Enable tab completion in your shell to easily navigate commands, rules, and profiles:

# Add this to your ~/.bashrc or ~/.zshrc
source <(cursor-playbook completion)

After sourcing the completion script, you can use tab completion for commands and arguments:

cursor-playbook add <TAB>       # Shows available rules
cursor-playbook add-group <TAB> # Shows available rule groups
cursor-playbook apply-profile <TAB> # Shows available profiles

Basic Commands

Add a rule to your project:

cursor-playbook add typescript

List available rules:

cursor-playbook list

Create a new rule template:

cursor-playbook create my-rule

Rule Groups

Add a group of related rules at once:

cursor-playbook add-group typescript

User Registry

Create a rule in your user registry (accessible across all projects):

cursor-playbook create my-custom-rule --global

Export a project rule to your user registry:

cursor-playbook export my-rule

Import a rule from your user registry to your current project:

cursor-playbook import my-custom-rule

Profiles

Save all your current project rules as a profile:

cursor-playbook save-profile my-typescript-project

Apply a saved profile to a new project:

cursor-playbook apply-profile my-typescript-project

List all saved profiles:

cursor-playbook list-profiles

Community Sharing

Export your rules to a JSON file for sharing with the community:

cursor-playbook export-json my-awesome-rules.json

Import rules from a shared JSON file:

cursor-playbook import-json my-awesome-rules.json

Use the --overwrite flag to replace existing rules when importing:

cursor-playbook import-json my-awesome-rules.json --overwrite

The exported JSON file includes metadata (project name, description, export date) and all rule contents, making it easy to share on GitHub, in blog posts, or other community platforms.

Repository Structure

To contribute rules to the community, you can structure your repository like this:

my-cursor-rules/
├── README.md                 # Description and usage instructions
├── rules/                    # Directory containing individual rule files
│   ├── typescript.mdc        # Individual rule file
│   └── react.mdc             # Individual rule file
└── packages/                 # Pre-configured rule packages for easy import 
    ├── typescript-basic.json # Package with basic TypeScript rules
    └── react-best-practices.json # Package with React best practices

Adding Your Own Rule Groups

To define custom rule groups, modify the getRuleGroups function in the src/index.ts file.

License

MIT