A collection of powerful utilities designed to enhance your experience with Cursor IDE, the AI-powered code editor.
This repository contains five specialized tools to help developers get the most out of Cursor IDE by improving AI context, managing ignored files, analyzing dependencies, and more.
Purpose: Generates a .cursorrules template file to help you get started creating your own rules, providing better context to Cursor's AI.
Features:
- Creates a directory tree structure for your project
- Maintains a system prompt in your
.cursorrulesfile - Watches for file system changes to automatically update rules
- Respects
.cursorignorepatterns - Creates a
.cursorrulesfile with a basic template.
Usage:
# Update .cursorrules file once
./cr
# Watch for changes and update automatically
./cr --watchPurpose: Manages .cursorignore files to specify which files and directories should be excluded from Cursor's AI analysis.
Features:
- Creates
.cursorignorefiles with saved patterns - Maintains a global list of saved patterns
- Adds/removes patterns to/from
.cursorignore
Usage:
# Create .cursorignore with saved patterns
./ci
# Add a pattern
./ci --add "node_modules"
# Remove a pattern
./ci --remove "node_modules"
# List all saved patterns
./ci --list
# Show help
./ci --helpPurpose: Generates comprehensive snapshots of your codebase in a structured format with XML-like tags, making it easy to share your project with chatbots like ChatGPT or Claude.
Features:
- Creates a markdown file with your entire codebase structure
- Encapsulates file contents in XML-like tags
- Excludes files based on patterns from
.cursorignore - Handles binary files and large files appropriately
- Supports syntax highlighting based on file extensions
Usage:
# Generate a snapshot with default settings
./cb
# Specify a different directory and output file
./cb -d /path/to/project -o output.md
# Include markdown files in the snapshot
./cb -m
# Show verbose output
./cb -vPurpose: Analyzes project dependencies using Claude 3.7 Sonnet to identify outdated packages and version gaps.
Features:
- Finds and analyzes
package.jsonandrequirements.txtfiles - Uses Claude 3.7 Sonnet to analyze version information
- Identifies outdated packages and version gaps
- Provides formatted analysis results with markdown
- Can analyze directory structure to provide file descriptions
Usage:
# Analyze dependencies in the current directory
./analyze_dependencies
# The script will automatically find package.json and requirements.txt filesPurpose: An HTML-to-Markdown converter CLI for creating documentation from web content.
Features:
- Fetches HTML content from URLs
- Converts HTML to Markdown with customizable options
- Supports batch processing of multiple URLs
- Generates tables of contents from headings
- Saves both Markdown and optionally raw HTML files
Usage:
# Run the interactive CLI
./url-to-md
# Follow the prompts to:
# - Choose single URL or batch processing
# - Enter URL(s) or file containing URLs
# - Configure conversion optionsPurpose: A comprehensive prompt template designed to work with your codebase snapshot to generate custom .cursorrules files.
Features:
- Follows the Cursor Rules Specification (CRS-1) format
- Helps AI models understand how to create effective
.cursorrulesfiles - Structures the rules with identity establishment, technical constraints, and more
- Provides clear guidelines for AI behavior and knowledge framework
- Works perfectly with the output from the
cbtool
Usage:
- Generate a codebase snapshot using the
cbtool - Provide both the codebase snapshot and the
CRS-1_prompt.mdto a chatbot (like ChatGPT or Claude) - The AI will analyze your codebase and generate a custom
.cursorrulesfile tailored to your project
# First, generate your codebase snapshot
./cb -o my-codebase-snapshot.md
# Then, provide both files to a chatbot (chatGPT, Claude, etc.)- Clone the repository:
git clone https://github.com/SlyyCooper/cursorrules-tools.git
cd cursorrules-tools- Install required dependencies:
# For Python scripts
pip install requests questionary html2text rich anthropic
# Make scripts executable
chmod +x ci cr cb analyze_dependencies url-to-md- Python 3.6+
- Bash shell (for
ciscript) - Anthropic API key (for
analyze_dependencies) - Internet connection (for
url-to-mdandanalyze_dependencies)
Cursor IDE uses AI to understand your codebase and provide intelligent code suggestions. These tools enhance that experience by:
- Providing Better Context: The
crtool creates a.cursorrulestemplate file to help get you started creating your own rules. - Focusing AI Analysis: The
citool helps exclude irrelevant files from analysis. - Maintaining Dependencies: The
analyze_dependenciestool helps keep your project dependencies up-to-date. - Improving Documentation: The
url-to-mdtool helps create Markdown documentation from web content. - Codebase Snapshot: The
cbtool creates a snapshot of your codebase with XML-like tags to easily share your project with chatbots like chatGPT or Claude. - Custom Rules Generation: The
CRS-1_prompt.mdworks with your codebase snapshot to help chatbots like ChatGPT or Claude generate tailored.cursorrulesfiles that optimize Cursor's AI capabilities for your specific project.
The .cursorrules file is a powerful feature of Cursor IDE that acts as a persistent context provider for the AI assistant. By creating a custom .cursorrules file tailored to your project:
- The AI understands your project's architecture and patterns
- Code suggestions become more relevant and consistent
- The AI follows your preferred coding style and best practices
- Development becomes more efficient with context-aware assistance
The combination of the cb tool and the CRS-1_prompt.md makes it easy to create sophisticated .cursorrules files without being an expert in prompt engineering.
Contributions are welcome! Please feel free to submit a Pull Request.
Created by SlyyCooper 🦊