Skip to content

Cursor Rules

PHP and Laravel Cursor rules, coding standards, testing, and conventions for the Cursor editor. Install via Composer.

Install: git clone https://github.com/pekral/cursor-rules

Works with Claude Code, Cursor · 11 GitHub stars

Install

$git clone https://github.com/pekral/cursor-rules

Install command taken from the project's README or registry entry. Always review code before running it.

Cursor Rules for PHP and Laravel — Composer Plugin

Cursor rules for PHP and Laravel — a Composer plugin for PHP/Laravel projects that installs a complete set of .mdc rule files and Agent skills for Cursor, Claude Code, and Codex. One package for PHP and Laravel cursor rules: coding standards, testing, and conventions. The installer discovers the project root (via composer.json lookup from the current directory), mirrors the rules/ directory into the editor's rules path and the skills/ directory into the editor's skills path, and copies or symlinks every file into the target project. Use cursor rules for PHP and Laravel to keep every edit aligned with enforced standards, plus comprehensive Agent skills for issue resolution, bug fixing, code review, security analysis, refactoring, testing, frontend and UI, platform and data, and package review.

Why This Package

  • a Composer plugin: PHP/Laravel cursor rules + agent skills in one composer require --dev package
  • unified PHP coding guidelines for PHP 8.4 projects
  • Pest-based testing with mandatory code analysis and 100% coverage
  • strong focus on clean code: typed properties, SRP, no redundant comments
  • 62 comprehensive Agent skills for automated workflows (v0.9.1)
  • fast onboarding inside development repositories

Installation

composer require pekral/cursor-rules --dev
vendor/bin/cursor-rules install --editor=cursor

The --editor flag is required. Use it to choose the target agent:

  • cursor: .cursor/rules, .cursor/skills
  • claude: .claude/rules, .claude/skills, and when HOME/USERPROFILE is set also ~/.claude/skills
  • codex: .codex/rules, .codex/skills, and when HOME/USERPROFILE is set also ~/.codex/skills
  • all: all of the above (Cursor, Claude, Codex in project + home)

Editor compatibility

Feature Cursor Claude Codex
Rules ✅ ✅ experimental / unverified
Skills ✅ ✅ ✅

Codex rules support is listed as experimental / unverified — the installer copies the files into .codex/rules, but native rule loading by Codex has not been confirmed; report your findings in #663.

When the package is required via Composer, sources are read from vendor/pekral/cursor-rules/rules and vendor/pekral/cursor-rules/skills.

Important: By default, the installer only copies missing files and keeps existing content untouched. Use the --force flag to overwrite existing files: vendor/bin/cursor-rules install --force. This is particularly useful when you want to update rules to their latest versions or when you've made local changes that should be replaced. The file .cursor/rules/project.mdc and CLAUDE.md are never overwritten once they exist in the target project, so you can safely customize them.

Automatic Installation via Composer Plugin

By default, the Composer plugin does not auto-install rules on composer install or composer update. To enable automatic installation, add the following to your project's composer.json:

{
  "extra": {
    "cursor-rules": {
      "auto-install": true,
      "editor": "claude"
    }
  }
}

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

PluginDev tools+6,803 this week

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…

Explore related