SkillTide Submit
Official descriptionOpen source8d ago
leek/laravel-agent-rules

leek/laravel-agent-rules

Directory-scoped Laravel CLAUDE.md rules — mirrors laravel/laravel structure
View on GitHub ↗Direct link · no redirect page
Star count
9 ★ · leek/laravel-agent-rules · read from the repository page · (checked 2026-10-16 20:00:20)
Source
read directly from its GitHub page · type: open-source project
Harvest history
first seen 2026-10-09 · last seen 2026-10-16 · seen 12× · listed by 1 sources
Score
score 103 · 9 ★ · 1 sources · repo
Install
npx apply-agent-rules
FAQ (answers come from our records)
How do I install it?
The repository provides this install command: npx apply-agent-rules. It comes from the repository itself; we cannot guarantee it runs as-is in your client.
Who is it for?
We filed it under these tags: 开源项目. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository leek/laravel-agent-rules;first catalogued 2026-10-09;last seen 2026-10-16。There is no official certification or quality rating here — we record sources and dates only.
Third-party quality signals

laravel-agent-rules

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

Directory-scoped agent rules for Laravel projects. Each CLAUDE.md lives next to the code it governs and mirrors the laravel/laravel skeleton. The root rules direct agents to shared conventions and any guidance outside the edited file's directory.
Requirements
- **Laravel 12 or 13** (bootstrap withMiddleware / withExceptions, attribute model wiring, casts() method, schedule in routes/console.php). Laravel 12 requires PHP 8.2+; Laravel 13 requires PHP 8.3+. Version-specific examples are labeled; check the project's installed version before copying them. See Laravel release notes.
- **Pest** for new tests (tests/CLAUDE.md). PHPUnit-style assertions still work under Pest.
- **Optional package dirs** — install rules only matter when the package is present:
- app/Livewire/ — Livewire 4
- app/Features/ — laravel/pennant (skip banner in file)
- app/States/ — spatie/laravel-model-states (skip banner in file)
- Companion rulesets (not in this repo): Filament → filament-agent-rules.
Install
Use apply-agent-rules to drop the rules into a Laravel project:
Supported agents: claude, codex, gemini, cursor, windsurf, cline.
How install works
Every CLAUDE.md in this repo is the canonical source. The installer walks the tree and, for each CLAUDE.md it finds, writes one file per selected agent into the **same directory** under that agent's expected filename:
| Agent | Filename written |
| --------- | ------------------------- |
| claude | CLAUDE.md |
| codex | AGENTS.md |
| gemini | GEMINI.md |
| cursor | .cursorrules |
| windsurf| .windsurfrules |
| cline | .clinerules |
So picking --agents claude,codex against this repo produces, for example:
Subdirectory rules ship as separate files, not concatenated into the root. The root rule file instructs agents to read the cross-cutting app/ rules for every project directory, and resolves canonical CLAUDE.md references to the selected agent's filename. The installer copies content unchanged; it does not rewrite references.
Claude, Codex, and Gemini support hierarchical context files, subject to their context-loading settings. Do not assume every supported output filename has the same discovery behavior. The installer currently emits legacy .cursorrules, .windsurfrules, and .clinerules files rather than native glob-scoped rules. Verify the root loader is active and explicitly reads the relevant nested files. For automatic scoping, configure native rules using Cursor project rules, Windsurf rules or AGENTS.md, or Cline conditional rules. Merely writing a legacy rule file into each subdirectory does not guarantee it is loaded.
Laravel's optional directories need setup independently of installing agent rules: php artisan install:api creates API routing, php artisan install:broadcasting configures broadcasting, and php artisan lang:publish publishes language files. Install only the features the project needs.
What you get
| Path | Covers |
| --------------------------------- | --------------------------------------------------------- |
| app/CLAUDE.md | Cross-cutting naming, code style (one-thing methods, no DocBlocks, short syntax, standard tools, prefer final), IoC/DI, constants & i18n, security bullets, domain sub-namespacing, class-type → directory index |
| app/Models/ | Eloquent: casts, relationships, scopes, eager loading, transactions |
| app/Models/Scopes/ / app/Models/Builders/ | Global scope classes and custom Eloquent builders |
| app/Queries/ | Reusable query objects |
| bootstrap/ | Routing, middleware, exception hooks, and provider registration |
Source
github · https://github.com/leek/laravel-agent-rules
Browse by field
Open source
Traction
9 ★
added
yesterday

More in Open source

All 731 in Open source →

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields →

← Back to index