Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CHANGELOG.md

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# Cursor Rules for PHP and Laravel — Composer Plugin

<p align="center">
<a href="https://packagist.org/packages/pekral/cursor-rules"><img src="https://img.shields.io/packagist/v/pekral/cursor-rules" alt="Packagist Version"></a>
<a href="https://packagist.org/packages/pekral/cursor-rules"><img src="https://img.shields.io/packagist/dt/pekral/cursor-rules" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/pekral/cursor-rules"><img src="https://img.shields.io/packagist/php-v/pekral/cursor-rules" alt="PHP Version"></a>
<a href="https://github.com/pekral/cursor-rules/blob/master/LICENSE"><img src="https://img.shields.io/packagist/l/pekral/cursor-rules" alt="License"></a>
<a href="https://packagist.org/packages/agentic-vibes/laravel-agent-skills"><img src="https://img.shields.io/packagist/v/agentic-vibes/laravel-agent-skills" alt="Packagist Version"></a>
<a href="https://packagist.org/packages/agentic-vibes/laravel-agent-skills"><img src="https://img.shields.io/packagist/dt/agentic-vibes/laravel-agent-skills" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/agentic-vibes/laravel-agent-skills"><img src="https://img.shields.io/packagist/php-v/agentic-vibes/laravel-agent-skills" alt="PHP Version"></a>
<a href="https://github.com/agentic-vibes/laravel-agent-skills/blob/master/LICENSE"><img src="https://img.shields.io/packagist/l/agentic-vibes/laravel-agent-skills" alt="License"></a>
<a href="https://pekral.cz"><img src="https://img.shields.io/badge/by-pekral.cz-blue" alt="by pekral.cz"></a>
</p>

Expand All @@ -26,8 +26,8 @@
## Installation

```bash
composer require pekral/cursor-rules --dev
vendor/bin/cursor-rules install --editor=cursor
composer require agentic-vibes/laravel-agent-skills --dev
vendor/bin/agent-skills install --editor=cursor
```

The `--editor` flag is **required**. Use it to choose the target agent:
Expand All @@ -45,11 +45,11 @@ The `--editor` flag is **required**. Use it to choose the target agent:
| Skills | ✅ | ✅ | ✅ |
| Agents | — | ✅ | — |

Agents are installed only for `--editor=claude` and `--editor=all`; they are skipped for `cursor` and `codex` because only Claude Code has a native subagent format. 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](https://github.com/pekral/cursor-rules/issues/663).
Agents are installed only for `--editor=claude` and `--editor=all`; they are skipped for `cursor` and `codex` because only Claude Code has a native subagent format. 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](https://github.com/agentic-vibes/laravel-agent-skills/issues/663).

When the package is required via Composer, sources are read from `vendor/pekral/cursor-rules/rules` and `vendor/pekral/cursor-rules/skills`.
When the package is required via Composer, sources are read from `vendor/agentic-vibes/laravel-agent-skills/rules` and `vendor/agentic-vibes/laravel-agent-skills/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.
**Important:** By default, the installer only copies missing files and keeps existing content untouched. Use the `--force` flag to overwrite existing files: `vendor/bin/agent-skills 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

Expand All @@ -58,7 +58,7 @@ By default, the Composer plugin does **not** auto-install rules on `composer ins
```json
{
"extra": {
"cursor-rules": {
"agent-skills": {
"auto-install": true,
"editor": "claude"
}
Expand All @@ -71,7 +71,7 @@ By default, the Composer plugin does **not** auto-install rules on `composer ins
| `auto-install` | Enable automatic install on `composer install/update`. | `false` |
| `editor` | Target editor for auto-install (`cursor`, `claude`, `codex`, `all`). | `cursor` |

If you prefer manual control, simply call `vendor/bin/cursor-rules install` in your Composer `post-update-cmd` scripts with the desired flags.
If you prefer manual control, simply call `vendor/bin/agent-skills install` in your Composer `post-update-cmd` scripts with the desired flags.

### Installing rules from GitHub (Cursor only)

Expand All @@ -80,27 +80,27 @@ You can use this repository as a **Remote Rule** in Cursor without installing th
1. Open **Cursor Settings** → **Rules**.
2. In the **Project Rules** section, click **Add Rule**.
3. Select **Remote Rule (Github)**.
4. Enter the repository URL: `https://github.com/pekral/cursor-rules`.
4. Enter the repository URL: `https://github.com/agentic-vibes/laravel-agent-skills`.

Cursor will fetch and apply the rules from the repository. Note: this method provides rules only; Agent skills are installed into your project when you use the Composer-based installation above.

### Available Commands

```bash
vendor/bin/cursor-rules help # print help
vendor/bin/cursor-rules install --editor=cursor # install for Cursor
vendor/bin/cursor-rules install --editor=claude # install for Claude
vendor/bin/cursor-rules install --editor=codex # install for Codex
vendor/bin/cursor-rules install --editor=all # install for Cursor, Claude, and Codex
vendor/bin/cursor-rules install --editor=cursor --force # overwrite existing files
vendor/bin/cursor-rules install --editor=cursor --symlink # prefer symlinks (fallback to copy)
vendor/bin/cursor-rules install --editor=claude --allow-bundled-scripts # whitelist this package's bundled scripts in ~/.claude/settings.json
vendor/bin/agent-skills help # print help
vendor/bin/agent-skills install --editor=cursor # install for Cursor
vendor/bin/agent-skills install --editor=claude # install for Claude
vendor/bin/agent-skills install --editor=codex # install for Codex
vendor/bin/agent-skills install --editor=all # install for Cursor, Claude, and Codex
vendor/bin/agent-skills install --editor=cursor --force # overwrite existing files
vendor/bin/agent-skills install --editor=cursor --symlink # prefer symlinks (fallback to copy)
vendor/bin/agent-skills install --editor=claude --allow-bundled-scripts # whitelist this package's bundled scripts in ~/.claude/settings.json
```

### Installer Flow

1. Determine the project root by walking up from the current directory until `composer.json` is found.
2. Resolve the rules source (local `rules/` or `vendor/pekral/cursor-rules/rules`).
2. Resolve the rules source (local `rules/` or `vendor/agentic-vibes/laravel-agent-skills/rules`).
3. Install rules into the target directory(ies) for the chosen editor (see `--editor`).
4. If present, resolve the skills source and install into the corresponding skill directory(ies).
5. For `--editor=claude` or `--editor=all`: copy `CLAUDE.md` to the project root (never overwrites existing).
Expand Down Expand Up @@ -246,7 +246,7 @@ Agents = specialised orchestration roles over multiple skills
1. Install for Claude Code (or every editor):

```bash
vendor/bin/cursor-rules install --editor=claude # or --editor=all
vendor/bin/agent-skills install --editor=claude # or --editor=all
```

Agents land in `.claude/agents/`. They are **not** installed for `--editor=cursor` or `--editor=codex`.
Expand Down Expand Up @@ -351,7 +351,7 @@ All `.mdc` and `.md` files are ready for automatic injection by Cursor so every
```bash
composer check # run full quality check (skill-check, normalize, phpcs, pint, rector, phpstan, audit, tests)
composer fix # run all automatic fixes (skill-check-fix, normalize, rector, pint, phpcs)
composer build # install (cursor-rules install --force) then fix then check
composer build # install (agent-skills install --force) then fix then check
composer analyse # run PHPStan static analysis
composer test:coverage # run tests with 100% coverage
composer coverage # alias for test:coverage
Expand Down
18 changes: 9 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## Plugin trust model

`pekral/cursor-rules` is a **Composer plugin** (`"type": "composer-plugin"`). Composer requires explicit opt-in before running any plugin — including this one — to guard against supply-chain attacks from unknown packages.
`agentic-vibes/laravel-agent-skills` is a **Composer plugin** (`"type": "composer-plugin"`). Composer requires explicit opt-in before running any plugin — including this one — to guard against supply-chain attacks from unknown packages.

### `allow-plugins` in `composer.json`

When you `composer require pekral/cursor-rules`, Composer may ask:
When you `composer require agentic-vibes/laravel-agent-skills`, Composer may ask:

```
Do you trust "pekral/cursor-rules" to execute code and wish to enable it now? (yes/no)
Do you trust "agentic-vibes/laravel-agent-skills" to execute code and wish to enable it now? (yes/no)
```

If you answer `yes`, Composer writes the following entry to your project's `composer.json`:
Expand All @@ -18,7 +18,7 @@ If you answer `yes`, Composer writes the following entry to your project's `comp
{
"config": {
"allow-plugins": {
"pekral/cursor-rules": true
"agentic-vibes/laravel-agent-skills": true
}
}
}
Expand All @@ -29,8 +29,8 @@ This is the **standard Composer plugin-trust mechanism** (`allow-plugins`). It i
If you prefer to give a non-interactive answer (e.g. in CI), you can pass the flag explicitly:

```bash
composer require pekral/cursor-rules --dev --no-plugins # skip the plugin during install
composer config allow-plugins.pekral/cursor-rules true # then grant trust manually
composer require agentic-vibes/laravel-agent-skills --dev --no-plugins # skip the plugin during install
composer config allow-plugins.agentic-vibes/laravel-agent-skills true # then grant trust manually
```

### Auto-install hook
Expand All @@ -40,15 +40,15 @@ Granting `allow-plugins: true` also enables the package's Composer plugin to rea
```json
{
"extra": {
"cursor-rules": {
"agent-skills": {
"auto-install": true,
"editor": "claude"
}
}
}
```

When `auto-install` is `true`, every `composer install` or `composer update` automatically runs `Installer::run(['cursor-rules', 'install', '--force', '--editor=<editor>'])` — the same installer that you would call manually, with `--force` and without any opt-in flags (`--allow-bundled-scripts`, `--allow-subagent-writes`). **Security implication:** any package that ships a `post-install-cmd` / `post-update-cmd` hook and is trusted via `allow-plugins` can trigger code execution during a routine `composer install`. Review the `extra.cursor-rules` block in your `composer.json` before enabling `auto-install`, and treat it the same way you treat other Composer script hooks.
When `auto-install` is `true`, every `composer install` or `composer update` automatically runs `Installer::run(['agent-skills', 'install', '--force', '--editor=<editor>'])` — the same installer that you would call manually, with `--force` and without any opt-in flags (`--allow-bundled-scripts`, `--allow-subagent-writes`). **Security implication:** any package that ships a `post-install-cmd` / `post-update-cmd` hook and is trusted via `allow-plugins` can trigger code execution during a routine `composer install`. Review the `extra.agent-skills` block in your `composer.json` before enabling `auto-install`, and treat it the same way you treat other Composer script hooks.

See also: [README — Automatic Installation via Composer Plugin](README.md#automatic-installation-via-composer-plugin).

Expand Down Expand Up @@ -110,6 +110,6 @@ The installer never writes outside the project directory and the user's home dir

If you discover a security issue in this package, please report it privately so it can be addressed before public disclosure.

**Contact:** open a [GitHub Security Advisory](https://github.com/pekral/cursor-rules/security/advisories/new) (preferred) or email `kral.petr.88@gmail.com`.
**Contact:** open a [GitHub Security Advisory](https://github.com/agentic-vibes/laravel-agent-skills/security/advisories/new) (preferred) or email `kral.petr.88@gmail.com`.

Please include a description of the issue, reproduction steps, and the potential impact. You will receive a response within a reasonable time. Public disclosure is coordinated after a fix is available.
2 changes: 1 addition & 1 deletion bin/cursor-rules → bin/agent-skills
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ if (!$autoloadFound) {
exit(1);
}

Pekral\CursorRules\Installer::run($argv);
AgenticVibes\AgentSkills\Installer::run($argv);
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "pekral/cursor-rules",
"name": "agentic-vibes/laravel-agent-skills",
"description": "Composer plugin for PHP and Laravel projects that installs Cursor/Claude/Codex rules and agent skills — coding standards, testing, and conventions",
"license": "MIT",
"type": "composer-plugin",
"keywords": [
"composer-plugin",
"cursor",
"cursor-rules",
"agent-skills",
"cursor-editor",
"php-cursor-rules",
"laravel-cursor-rules",
"php-agent-skills",
"laravel-agent-skills",
"php",
"laravel",
"coding-standards",
Expand All @@ -27,9 +27,9 @@
],
"homepage": "https://pekral.cz",
"support": {
"issues": "https://github.com/pekral/cursor-rules/issues",
"source": "https://github.com/pekral/cursor-rules",
"docs": "https://github.com/pekral/cursor-rules#readme"
"issues": "https://github.com/agentic-vibes/laravel-agent-skills/issues",
"source": "https://github.com/agentic-vibes/laravel-agent-skills",
"docs": "https://github.com/agentic-vibes/laravel-agent-skills#readme"
},
"require": {
"composer-plugin-api": "^2.0"
Expand All @@ -54,7 +54,7 @@
},
"autoload": {
"psr-4": {
"Pekral\\CursorRules\\": "src/"
"AgenticVibes\\AgentSkills\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -63,7 +63,7 @@
}
},
"bin": [
"bin/cursor-rules"
"bin/agent-skills"
],
"archive": {
"exclude": [
Expand All @@ -72,23 +72,23 @@
},
"config": {
"allow-plugins": {
"agentic-vibes/laravel-agent-skills": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"pekral/cursor-rules": true,
"pestphp/pest-plugin": true,
"phpstan/extension-installer": true
}
},
"extra": {
"class": "Pekral\\CursorRules\\ComposerPlugin"
"class": "AgenticVibes\\AgentSkills\\ComposerPlugin"
},
"scripts": {
"analyse": [
"echo \"🔍 Running PHPStan static analysis...\"",
"vendor/bin/phpstan analyse --memory-limit=2G"
],
"build": [
"bin/cursor-rules install --force",
"bin/agent-skills install --force",
"@fix",
"@check"
],
Expand Down
Loading
Loading