Laravel文档启动器

claude-code-laravel-starter — Laravel 文档模板

作者 albertoarena

面向 Laravel 项目的 Claude Code 文档骨架,按加载方式把上下文分成 CLAUDE.md、规则、技能与 docs 四层。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

按加载方式分层组织上下文:CLAUDE.md、.claude/rules/、技能与 docs/

02

提供 CLAUDE.md、DESIGN.md、PLAN.md、DECISIONS.md 的初始文件结构

03

.claude/rules/domain.md 通过 paths glob 限定作用域为 app/Domains/**/*.php

04

领域代码放在 app/Domains,命名空间 App\Domains\...,无需改动 composer.json

05

README 列出四条内容归类规则,用于判断新内容该放在哪一层

模板详细介绍

这是一个面向 Laravel 项目的文档骨架,用于配合 Claude Code 使用。它的核心主张是把上下文按“加载方式”分层:CLAUDE.md 每轮都会加载,因此保持精简;.claude/rules/ 下的规则按文件路径匹配后才加载;技能只在被调用时加载并在本次会话中常驻;其余内容放在 docs/ 目录,只有被引用时才读取。

仓库提供的结构包括根目录的 CLAUDE.md 与 README.md,.claude/rules/domain.md(作用域限定为 app/Domains/**/*.php),.claude/skills/README.md 作为技能安装位置,以及 docs/ 下的 DESIGN.md(领域模型、聚合、事件)、PLAN.md(分阶段、计划优先的实现)和 DECISIONS.md(轻量 ADR 记录),并预留 app/Domains 目录。

使用方式是从一个全新的 Laravel 应用出发,把这些文件复制到项目根目录:由于 laravel new 与 composer create-project 需要空目录,应先安装 Laravel 再叠加骨架。领域代码放在 app/Domains(命名空间 App\Domains\...),无需修改 composer.json 即可自动加载。随后需要填写 CLAUDE.md 中的实际技术栈、版本与命令,替换 DESIGN.md 中的示例聚合,并在领域层不位于 app/Domains 时调整 domain.md 的 glob。

仓库同时给出四条取舍规则:每次都需要的内容放 CLAUDE.md,仅对特定文件生效的放 .claude/rules/,属于流程的放技能,其余放 docs/;从少量文件起步,出现真实需求再增加;带 paths glob 的规则文件优于嵌套 CLAUDE.md;技能不是磁盘存储,具有可执行性与触发不确定性,因此不变量不应放入技能。

需要注意,这是一个文档与目录骨架,不包含业务实现或构建配置;README 中的订阅链接与相关文章属于作者的外部内容。代码以 MIT 许可发布,演示图片、字体、图标等第三方素材需单独核对许可。

Laravel文档启动器

适合你的项目吗?

适用场景

  • 为使用 Claude Code 的 Laravel 项目建立初始文档与目录结构
  • 把过长的 CLAUDE.md 拆分为按路径加载的规则文件
  • 为领域驱动设计的 Laravel 项目记录领域模型与阶段性实现计划

适合人群

  • 使用 Claude Code 进行 Laravel 开发的团队或个人
  • 希望控制上下文体积、按需加载项目说明的开发者
  • 采用 app/Domains 领域分层并需要轻量 ADR 记录的项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    先创建全新的 Laravel 应用,再把骨架文件复制到项目根目录,顺序不能颠倒

  2. 2

    填写 CLAUDE.md 中的实际技术栈、版本与命令,替换 docs/DESIGN.md 中的示例聚合

  3. 3

    若领域层不在 app/Domains,需调整 .claude/rules/domain.md 中的 glob

  4. 4

    仓库仅为文档骨架,不包含业务实现;第三方素材与外部服务需单独核对许可与费用

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • README 含作者邮件订阅推广链接(指向 albertoarena.it/subscribe),属外部内容,非使用限制;订阅为可选,不影响代码使用。
  • 使用需先自行安装 Laravel(laravel new 或 composer create-project),骨架本身不含 Laravel 依赖或构建配置,需外部工具链。
  • README 引用作者两篇外部博客文章作为说明来源,需访问外部站点阅读,非代码使用限制。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Occasional emails on Claude Code and AI-assisted Laravel development: new releases, packages, and write-ups. No spam, unsubscribe anytime.

README 原文

Start from a fresh Laravel app, then copy these files into its root.

README 原文

It's covered across two posts:

README 原文
https://github.com/albertoarena/claude-code-laravel-starter/blob/main/LICENSEhttps://github.com/albertoarena/claude-code-laravel-starter/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 88 / 100
技术栈
Laravel
网站类型
文档 · 启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-08-06
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: f00227c49961a6720711f1a7fa2d9ef04d071d26bcec5ca4151af4a6c27b63a3

2026-10-03T15:22:09.436Z

来源文件 / 仓库
# claude-code-laravel-starter

A small, opinionated documentation skeleton for Laravel projects driven with
[Claude Code](https://www.anthropic.com/claude-code).

The idea in one line: **`CLAUDE.md` is RAM, `.claude/rules/` is demand-paged
RAM, skills are installed programs, and `docs/` is disk.** `CLAUDE.md` is
loaded on every turn, so it stays lean. Rules load only for the files they're
scoped to. Skills load only when invoked, then stay resident for the rest of
the session. Everything else lives in `docs/` and loads only when something
points to it.

## Structure

```
claude-code-laravel-starter/
├── CLAUDE.md                    # the lean anchor, auto-loaded every session
├── README.md                    # this file (for humans, not Claude)
├── .claude/
│   ├── rules/
│   │   └── domain.md            # path-scoped: app/Domains/**/*.php only
│   └── skills/
│       └── README.md            # where project skills get installed
├── docs/
│   ├── DESIGN.md                 # domain model, aggregates, events
│   ├── PLAN.md                   # phased, plan-first implementation
│   └── DECISIONS.md              # lightweight ADR log
└── app/
    └── Domains/                  # your domain layer; see .claude/rules/domain.md
        └── .gitkeep
```

## How to use it

1. Start from a fresh Laravel app, then copy these files into its root.
   `laravel new` / `composer create-project` need an empty directory, so install
   Laravel first and overlay the skeleton, not the other way round. The domain
   lives in `app/Domains` (namespace `App\Domains\...`), so it autoloads with no
   `composer.json` changes.
2. Fill in `CLAUDE.md` with your real stack, versions and commands.
3. Replace the example aggregate in `docs/DESIGN.md` with your own domain.
4. Adjust the glob in `.claude/rules/domain.md` if your domain layer doesn't
   live at `app/Domains`.
5. Keep `CLAUDE.md` tight. When you catch yourself adding detail Claude needs
   only occasionally, ask whether it's scoped to some files (`.claude/rules/`),
   a procedure (`.claude/skills/`), or neither (`docs/`).

## Why not just one big CLAUDE.md?

Because every line of it stays resident in your context for the whole session,
and a 300-line file makes the session worse, not better. Splitting it by how
certainly and how often each piece of content is needed, not just into two
piles, is the full idea behind this repo. It's covered across two posts:

- [CLAUDE.md Is RAM, Not Disk](https://albertoarena.it/posts/claude-md-is-ram-not-disk/):
  the original two-tier model.
- [CLAUDE.md Is RAM, Skills Are Not Disk](https://albertoarena.it/posts/claude-md-skills-are-not-disk/):
  why skills needed their own tier, and the correction to the nested
  `CLAUDE.md` trick from the first post.

## The four rules

1. If Claude needs it every time, it goes in `CLAUDE.md`. If it only applies to
   files matching a pattern, it goes in `.claude/rules/`. If it's a procedure,
   it goes in a skill. Otherwise, it goes in `docs/`.
2. Start small (`CLAUDE.md`, `DESIGN.md`, `PLAN.md`). Add a rule, a skill, or a
   doc only when a real need shows up.
3. A `.claude/rules/*.md` file with a `paths:` glob beats a nested `CLAUDE.md`:
   same on-demand loading, scoped by pattern instead of by folder, reviewable
   in one place.
4. A skill is not disk. It's executable and probabilistic to trigger, so
   invariants stay out of it; procedures are what belong there.

## 📬 Stay updated

Occasional emails on Claude Code and AI-assisted Laravel development: new releases, packages, and write-ups. No spam, unsubscribe anytime.

**[Subscribe to the newsletter →](https://albertoarena.it/subscribe/?utm_source=github&utm_medium=readme&utm_campaign=newsletter&utm_content=claude-code-laravel-starter)**

## License

MIT.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。