cursorrules
A set of cursor rules for Cursor AI IDE that support PHP, Python, JavaScript and Drupal-specific rules
Install / Use
npx skills add ivangrynenko/cursorrulesInstalls into whichever agent you are using.
.cursorrules
Cursor IDE rules (legacy)
Quality Score
Category
Customer SupportSupported Platforms
Skill content
View source on GitHubCursor AI Project Rules for Modern Development
📌 About This Repository
This repository contains a comprehensive set of Cursor AI rules designed to enhance efficiency, enforce coding standards, and automate best practices across multiple programming languages and frameworks, including PHP/Drupal, JavaScript/React/Vue, Python, and DevOps technologies, with a strong focus on security following OWASP Top 10 guidelines.
These rules help Cursor AI assist developers by:
- Enforcing coding standards and best practices
- Ensuring tests and documentation remain up to date
- Detecting inefficiencies in AI query usage and improving response quality
- Providing automated suggestions for commit messages, dependencies, and performance optimisations
🚀 Who Is This For?
This repository is ideal for:
- PHP & Drupal developers following Drupal coding standards and security best practices
- Frontend developers working with JavaScript, React, Vue, Tailwind, and other modern frameworks
- Python developers building secure applications following OWASP guidelines
- DevOps engineers working with Docker, CI/CD, and deployment workflows
- Security-conscious developers implementing OWASP Top 10 protections
- Software teams looking for a structured, automated workflow with comprehensive rule sets
- Open-source contributors who want standardized development and security practices
📥 Installation
Interactive Installation (Recommended)
For a fully interactive installation with prompts:
# Step 1: Download the installer
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php -o install.php
# Step 2: Run the installer interactively
php install.php
This two-step process ensures you get the interactive experience with:
- Prompts to choose which rule sets to install (Core, Web Stack, Python, or All)
- Option to remove the installer file after installation (defaults to yes)
Quick Non-Interactive Installation
For a quick installation without prompts (installs core rules only):
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php
or install rules by tag expression
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --tags "language:javascript category:security"
⚠️ Note: When using the curl piping method above, interactive mode is not possible because STDIN is already being used for the script input. The installer will automatically default to installing core rules only.
Installation with Specific Options
To install with specific options and bypass the interactive mode:
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- [options]
For example, to install all rules:
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --all
Installation Options
The installer supports the following options:
--core: Install core rules only--web-stackor--ws: Install web stack rules (includes core rules)--python: Install Python rules (includes core rules)--all: Install all rules--yesor-y: Automatically answer yes to all prompts--destination=DIR: Install to a custom directory (default: .cursor/rules)--debug: Enable detailed debug output for troubleshooting installation issues--ignore-files <opt>: Control installation of .cursorignore files (yes, no, ask), default's to yes--helpor-h: Show help message
.cursorignore Files
The installer can automatically add recommended .cursorignore and .cursorindexingignore files to your project. These files tell Cursor AI which files and directories to exclude from processing, which helps to:
- Improve performance by skipping large generated files, vendor directories, and node_modules
- Reduce noise in AI responses by focusing only on relevant project files
- Prevent unnecessary context from third-party code being included in AI prompts
The .cursorignore file ensures files are not indexed by Cursior and they are not read by Cursor or sent to the models for processing. This is a good setting for files that may contain secrets or other information you'd prefer to keep private. The .cursorindexingignore file is just for indexing and is there mainly for performance reasons.
By default, the installer will add these files (controlled by the --ignore-files option). You can:
- Set to
yes(default): Always install ignore files - Set to
no: Never install ignore files - Set to
ask: Prompt during installation
If you need to modify the ignore patterns, you can edit the .cursorignore files manually after installation.
Troubleshooting Installation
If you encounter issues during installation, try running the installer with the debug option:
php install.php --debug
This will provide detailed information about what the installer is doing, which can help identify the source of any problems.
Common issues:
- If only core rules are installed when selecting other options, make sure your internet connection is working properly as the installer needs to download additional rules from GitHub.
- If you're behind a corporate firewall or proxy, you may need to configure PHP to use your proxy settings.
Examples
Install core rules only:
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --core
Install web stack rules (includes core rules):
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --web-stack
# Or using the shorter alias
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --ws
Install all rules:
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --all
Install to a custom directory:
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --all --destination=my/custom/path
Tag-Based Selection
The installer now supports filtering rules by tags, allowing you to install only the rules relevant to your project:
# Install all JavaScript security rules
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --tags "language:javascript category:security"
# Install all OWASP Top 10 rules for PHP
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --tags "language:php standard:owasp-top10"
# Install all React-related rules
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --tags "framework:react"
# Install rules matching multiple criteria with OR logic
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --tags "language:javascript OR language:php"
Available tag presets:
web: JavaScript, HTML, CSS, PHPfrontend: JavaScript, HTML, CSSdrupal: Drupal-specific rulesreact: React-specific rulesvue: Vue-specific rulespython: Python-specific rulessecurity: Security-focused rulesowasp: OWASP Top 10 rulesa11y: Accessibility rulesphp-security: PHP security-focused rulesjs-security: JavaScript security-focused rulespython-security: Python security-focused rulesdrupal-security: Drupal security-focused rulesphp-owasp: PHP OWASP Top 10 rulesjs-owasp: JavaScript OWASP Top 10 rulespython-owasp: Python OWASP Top 10 rulesdrupal-owasp: Drupal OWASP Top 10 rules
See the TAG_STANDARDS.md file for detailed information about the tagging system.
Manual Installation
If you prefer to install manually:
-
Clone this repository:
git clone https://github.com/ivangrynenko/cursor-rules.git -
Copy the rules to your project:
mkdir -p /path/to/your/project/.cursor/rules cp -r cursor-rules/.cursor/rules/* /path/to/your/project/.cursor/rules/
📜 Available Cursor Rules
Each rule is written in .mdc format and structured to enforce best practices in different aspects of development.
Core Rules
| File Name | Purpose |
|-----------|---------|
| cursor-rules.mdc | Defines standards for creating and organising Cursor rule files |
| git-commit-standards.mdc | Enforces structured Git commit messages with proper prefixes and formatting |
| github-actions-standards.mdc | Ensures GitHub Actions workflows follow best practices |
| improve-cursorrules-efficiency.mdc | Detects and optimises inefficient AI queries |
| pull-request-changelist-instructions.mdc | Guidelines for creating consistent pull request changelists in markdown format with proper code block formatting |
| readme-maintenance-standards.mdc | Ensures README documentation is comprehensive and up-to-date |
| testing-guidelines.mdc | Ensures proper testing practices and separation between test and production code |
Web Development Rules
Frontend Development
| File Name | Purpose |
|-----------|---------|
| accessibility-standards.mdc | WCAG compliance and accessibility best practices |
| api-standards.mdc | RESTful API design and documentation standards |
| build-optimization.mdc | Webpack/Vite configuration and build process optimisation |
| javascript-performance.mdc | Best practices for optimising JavaScript performance |
| javascript-standards.mdc | Standards for JavaScript development in Drupal |
| node-dependencies.mdc | Node.js versioning and package management best practices |
| react-patterns.mdc | React component patterns and hooks usage guidelines |
| tailwind-standards.mdc | Tailwind CSS class organisation and best practices |
| vue-best-practices.mdc | Vue 3 and NuxtJS specific standards and optimisations |
Backend Development
| File Name | Purpose |
|-----------|---------|
| php-drupal-best-practices.mdc | PHP & Drupal Development Standards and Best Practices |
| php-drupal-development-standards.mdc | Standards for PHP and Drupal development |
| drupal-database-standards.mdc | Database schema changes, migrations, and query optimisation |
| drupal-file-permissions.mdc | Drupal file permissions security standards |
Security Rules
| File Name | Purpose |
|-----------|---------|
| drupal-authentication-failures.mdc | Prevents authentication failures in Drupal |
| drupal-broken-access-control.mdc | Prevents broken access control vulnerabilities in Drupal |
| drupal-cryptographic-failures.mdc | Prevents cryptographic failures in Drupal applications |
| [`drupal
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
84.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
nanobot
48.5kUltra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
Scrapling
82.8k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ
