技能潮 SkillTide 提交收录
官方说明开源项目8 天前
leek/laravel-agent-rules

leek/laravel-agent-rules

Directory-scoped Laravel CLAUDE.md rules — mirrors laravel/laravel structure
在 GitHub 查看 ↗直链 · 无中转页
★ 数取值
9 ★ · leek/laravel-agent-rules · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 12 次 · 被 1 个来源列出
评分构成
综合分 103 · 9 ★ · 1 个来源 · repo
安装
npx apply-agent-rules
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 npx apply-agent-rules。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 leek/laravel-agent-rules;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

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 |
来源
github · https://github.com/leek/laravel-agent-rules
按领域浏览
开源项目
Traction
9 ★
收录于
昨天

更多开源项目

查看开源项目全部 731 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引