Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
Cursor ruleSafeCode review & qualityBeginner friendly

cursorrules

ivangrynenko · ivangrynenko/cursorrules

A comprehensive set of Cursor AI rules to enhance efficiency, enforce coding standards, and automate best practices across multiple languages and frameworks.

A set of cursor rules for Cursor AI IDE that support PHP, Python, JavaScript and Drupal-specific rules

88 stars13License: MITUpdated 12 months ago0 opens

Preview

▍

What you can do with it

  • Ensure PHP and Drupal code adheres to specific coding standards and security guidelines.
  • Automate code review for JavaScript, React, and Vue applications in Cursor.
  • Integrate OWASP Top 10 security best practices into Python development workflows.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

Cursor 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-stack or --ws: Install web stack rules (includes core rules)
  • --python: Install Python rules (includes core rules)
  • --all: Install all rules
  • --yes or -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
  • --help or -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 -- --al
View source on GitHub