Get Started with vibe-rules
Learn how to use vibe-rules to manage AI prompts and rules in your local development environment.
Installation
Install vibe-rules globally using your preferred package manager:
Basic Commands
Save a Rule
Store a rule for later use in the common vibe-rules store.
Options:-f, --file <file>: Path to the file containing the rule content-c, --content <content>: Rule content provided as a string-d, --description <desc>: Optional description for the rule
List Saved Rules
See all the rules you've saved to the common local store.
Load (Apply) a Rule
Apply a rule from your local store to a specific editor's configuration.
Options:-g, --global: Apply to the editor's global configuration path-t, --target <path>: Specify a custom target file path or directory
Install Rules from NPM Packages
Install rules directly from NPM packages into an editor's configuration. This automatically scans your project's dependencies for compatible rule exports.
How it works:
1. Looks for NPM packages with llms exports
2. Imports the llms module from each package
3. Applies the rules to your editor's configuration with proper formatting
Supported Editors & Formats
Cursor
Creates/updates individual .mdc files in ./.cursor/rules/
cursorWindsurf
Appends rules to ./.windsurfrules with tagged blocks
windsurfClaude Code
Updates ./CLAUDE.md (local) or ~/.claude/CLAUDE.md (global)
claude-codeVS Code
Creates .instructions.md files in ./.github/instructions/
vscodeZed
Manages rules within ./.rules file
zedCline/Roo
Creates .md files in ./.clinerules/ directory
clinerulesorrooExample Workflow
Complete Example: React Development Rules
This workflow creates a reusable React rule that can be applied across different editors and projects, while also pulling in additional rules from NPM packages.
Tips & Best Practices
Organize Your Rules
Use descriptive names and descriptions for your rules to make them easy to find and understand later.
Use Debug Mode
Add --debug to any command to see detailed logging and troubleshoot issues.
Metadata Support
When saving from .mdc files, vibe-rules automatically extracts metadata like alwaysApply and globs.