# Every framework should ship agent skills

> Astro 7 ships AGENTS.md with web links, but no skills or local docs. Seeing how Laravel Go ships 8 Agent Skills shows what every framework needs next.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2026-12-05 | Topics: [AI](https://flaviocopes.com/tags/ai/), [Astro](https://flaviocopes.com/tags/astro/), [Laravel](https://flaviocopes.com/tags/laravel/) | Canonical: https://flaviocopes.com/framework-agent-skills/

[Astro](https://flaviocopes.com/astro/) is my main framework. This site runs on Astro `7.4.13`, and so do most of my web projects.

Every week, when I ask a coding agent to build a page or update a collection in an Astro 7 app, it still reaches for Astro 4 or 5 habits. It tries to put collections in `src/content/config.ts`, calls `entry.render()`, writes `Astro.glob()`, or installs `@astrojs/tailwind`.

I ran `npx create-astro@latest` to see what a fresh Astro project gives coding agents today, and the gap stood out right away.

Then I spent the week building apps in [Laravel Go](https://flaviocopes.com/laravel-go/) and [Laravel Rust](https://flaviocopes.com/laravel-rust/), which both drop 8 [Agent Skills](https://flaviocopes.com/agent-skills/) and version-matched Markdown docs into every new app.

**Agent skills are the new framework documentation.**

A great docs website used to be enough, because a human developer opened a browser tab, checked the version they installed, and typed the code. Now a coding agent writes the first draft of almost every feature, and a docs site on the web does not stop an agent from writing outdated code.

Every framework needs to ship agent skills inside every new project, and Astro is the one I want to see do it next.

## What a fresh Astro 7 app ships for coding agents

When I ran `npx create-astro@latest` with the minimal template (`astro ^7.4.14`), it created an `AGENTS.md` file right at the root of the project.

![Terminal output of create-astro@latest showing the generated files and the 20-line AGENTS.md with astro dev --background and six docs.astro.build links](https://images.flaviocopes.com/framework-agent-skills/astro-scaffold.webp?v=d3fe4899)

Astro already got one important piece right here. Astro 7 added agent detection inside its CLI (`node_modules/astro/dist/cli/agent.js`), and `AGENTS.md` tells agents to run `astro dev --background` alongside `astro dev stop`, `astro dev status`, and `astro dev logs` so the dev server does not hang the agent's terminal.

Look at the rest of the project, though.

There is no `.agents/skills/` folder, no `CLAUDE.md` importing `@AGENTS.md`, and zero Markdown guides inside `node_modules/astro/` (the package only ships a 1.7 KB `README.md`). Every documentation pointer in `AGENTS.md` is a web link to `https://docs.astro.build`.

Astro does offer an official Docs MCP server (`https://mcp.docs.astro.build/mcp`) and `llms.txt`. Both help once you set them up, but they put you right back in an opt-in workflow: you have to configure the MCP server in every coding agent you use, it needs a network call, and it queries the latest live website instead of the exact Astro version pinned in `package.json`.

Without local skills and version-matched docs, models keep tripping over the real API changes between Astro 4, 5, 6, and 7:

- Putting content collections in `src/content/config.ts` instead of `src/content.config.ts` with `glob()` loaders from `astro/loaders`.
- Calling `entry.render()` on a collection item instead of `render(entry)` from `astro:content`.
- Using `Astro.glob()` (removed) or `<ViewTransitions />` instead of `<ClientRouter />`.
- Reaching for the old `@astrojs/tailwind` integration instead of configuring Tailwind CSS v4 through `@tailwindcss/vite`.

(If you are learning Astro 7 yourself, I keep all of those current patterns in my free [Astro Handbook](https://flaviocopes.com/ebooks/astro-handbook/).)

The problem is not that Astro's documentation is bad. Astro has some of the best web docs in JavaScript. The problem is that coding agents do not browse a docs site the way humans do.

## Let's see how Laravel does it

To see what the next step looks like, let's look at [Laravel Go](https://flaviocopes.com/laravel-go/) and [Laravel Rust](https://flaviocopes.com/laravel-rust/).

When I scaffolded a new Laravel Go app with `laravel new demo-go --go`, I got the usual app folders (`models/`, `handlers/`, `routes/`, `database/`), plus 10 agent files totaling 759 lines:

- `AGENTS.md` (48 lines): project layout, test and vet commands, core conventions, and an index of the skills.
- `CLAUDE.md` (1 line): `@AGENTS.md`, so Claude Code loads the shared rules without duplicating them.
- `.agents/skills/` (8 folders): `writing-laravel-go-apps`, `database-and-models`, `validation-and-input`, `auth-and-authorization`, `queues-and-workflows`, `testing-laravel-go-apps`, `inertia-frontend`, and `upgrading-laravel-go`.

The clever part is inside `.agents/skills/writing-laravel-go-apps/scripts/docs-path.sh`.

The whole script is 4 lines:

```sh
#!/usr/bin/env sh
set -eu

go list -m -f '{{.Dir}}/docs' go.laravel.com
```

Running it prints the local folder inside your Go module cache where `go.laravel.com` unpacks its documentation.

On `v0.2.0`, that folder contains **69 Markdown guides** (1.9 MB of docs), matched to the version pinned in `go.mod`.

![Terminal output showing the 8 skills in .agents/skills, docs-path.sh, and the 69 Markdown guides inside go.laravel.com@v0.2.0](https://images.flaviocopes.com/framework-agent-skills/scaffold-skills.webp?v=fb9c37bb)

Laravel Rust uses the same setup with Cargo. The `laravel-rust` `0.1.4` crate ships **68 Markdown guides** (1.8 MB) inside the package, and its `docs-path.sh` asks `cargo metadata` where they live on disk.

None of those 69 guides enter the agent's context window at startup. At startup, the agent sees only `AGENTS.md` and the short YAML `name` and `description` of each skill.

When you ask for a migration or a policy, the agent loads the matching `SKILL.md` (between 38 and 207 lines each), runs `docs-path.sh`, and reads only the one Markdown guide it needs. I covered how that three-level loading works in [how to write an Agent Skill](https://flaviocopes.com/agent-skills/) and in the free [Agent Skills Handbook](https://flaviocopes.com/ebooks/agent-skills-handbook/).

One of those 8 skills is `upgrading-laravel-go`. Every release of `go.laravel.com` includes a `docs/upgrade.md` file inside the module with search patterns and before/after diffs for breaking changes.

When `v0.2.0` changed `auth.Ability[U]` to take `ctx context.Context` as its first parameter, the upgrade guide listed the exact grep patterns (`auth.Ability`, `auth.GuestAbility`, `auth.Allows(`, `auth.AuthorizeFor(`) and the new signatures. Asking an agent to upgrade the framework becomes a repeatable checklist instead of hunting through release notes.

## What happens when you strip those skills out

Talking about this in theory is easy, so I ran a real test on Laravel Go to see how much those files actually change an agent's output.

I scaffolded a fresh Laravel Go `v0.2.0` app, switched `bootstrap/app.go` to SQLite so `go test ./...` runs locally with no external database, and cloned it into two identical git repositories:

- `with-skills`: untouched starter kit, keeping `AGENTS.md`, `CLAUDE.md`, and `.agents/skills/`.
- `without-skills`: the same Go codebase and `go.mod`, with `AGENTS.md`, `CLAUDE.md`, and `.agents/` deleted.

I gave both repositories the same prompt using Codex (`codex-cli 0.174.0`):

```text
Add a Webhook resource: a Webhook model (name, target_url, secret hidden from JSON, active defaulting to true, user_id), a migration, authenticated JSON endpoints POST /webhooks, PATCH /webhooks/{webhook}, and DELETE /webhooks/{webhook}, typed validation (name required max 120, target_url required valid URL and unique, partial PATCH updates supported), a policy so only the webhook owner can update or delete it, and feature tests covering creation, validation errors, partial update, and unauthorized deletion. Make sure go vet ./... and go test ./... pass.
```

Remember that Laravel Go came out 2 days earlier. Neither run had `go.laravel.com@v0.2.0` in its training data, and both had the same 69 Markdown docs sitting in `GOMODCACHE`.

Here is what happened in the 2 runs:

| What I measured | With `.agents/skills/` | Without `.agents/skills/` |
| --- | --- | --- |
| Bundled `v0.2.0` Markdown docs read | 10 commands via `docs-path.sh` | **0** (all 69 docs ignored) |
| Web searches | **0** | 1 |
| Raw Go source greps in `GOMODCACHE` | 6 | 12 |
| `go vet ./...` and `go test ./...` | Pass (5 new tests) | Pass (5 new tests) |
| Policy location | Colocated in `models/webhook.go` | New `policies/webhook.go` package |
| Database default tag on `Active` | `db:",default"` on `*bool` | Missing (`Active bool`) |
| Relationship tag | `User *User` with `model:"belongs_to"` and `omitzero` | Missing |
| Model factory | Added `database/factories/webhook.go` | Skipped (manual helper in test file) |
| Migration filename | `2026_12_05_000000_create_webhooks_table.go` | `0001_01_01_000003_create_webhooks_table.go` |
| Route names | Named (`webhooks.store`, `webhooks.update`, `webhooks.destroy`) | Unnamed |

Look at the diff summaries and the model file from `with-skills`:

![Terminal comparison showing git show --stat for with-skills and without-skills, plus the generated models/webhook.go with db default, belongs_to, and colocated policy](https://images.flaviocopes.com/framework-agent-skills/experiment-diff.webp?v=240bb61c)

Reading the logs turned up a surprise right away.

**Bundling Markdown docs inside a package does nothing if there is no skill pointing at them.** All 69 guides were sitting on disk in `/Users/flaviocopes/go/pkg/mod/go.laravel.com@v0.2.0/docs/` during the `without-skills` run. The agent never opened a single one. Instead it ran a web search (`go.laravel.com Laravel Go typed validation policy Authenticate route Laravel 0.2.0`) and ran 12 shell commands grepping the framework's raw Go source files to figure out function signatures.

And **even when an agent reads your source code and makes the tests pass, it still writes unidiomatic code.**

Go's compiler caught type mismatches in both runs, so both produced passing tests in roughly two and a half minutes (169 seconds with skills, 148 seconds without, with 1.92M vs 1.78M input tokens, almost all cached). Looking at the code, though, the `without-skills` version drifted from the framework in six places:

- It invented a `policies/` package from Laravel PHP habit, while Laravel Go colocates abilities right under the model in `models/webhook.go`.
- It left off `db:",default"` on `Active`, so any Go code inserting `models.Webhook{}` directly saves `false` instead of letting SQL apply `DEFAULT true`.
- It skipped the `model:"belongs_to"` relationship tag and `json:"user,omitzero"`.
- It never created a factory in `database/factories/`, so the test file had to hand-roll a `createWebhook()` helper and call `factories.User.Create(client.Context())` with manual error checks instead of `client.Create(factories.Webhook.For("user", &owner))`.
- It copied the starter migration prefix (`0001_01_01_000003_...`) instead of using a real date timestamp.
- It left the three routes unnamed.

The `with-skills` run opened 5 skills on its very first command, called `docs-path.sh`, and got all 6 conventions right on the first try.

Now think about what that means for Astro. Go is the best-case scenario for running without skills: it is statically typed, compiles in 0.5s, and keeps readable `.go` source files in `GOMODCACHE`. In an Astro project, `node_modules/astro/` holds compiled JavaScript and zero Markdown guides, so an agent without skills falls straight back to older Astro training data.

## Why a docs website is no longer enough

When a coding agent opens a repository, there are now 2 very different paths it can take:

```mermaid
flowchart TD
  accTitle: How a coding agent writes code with and without framework skills
  accDescr: With bundled skills, the agent reads AGENTS.md, loads the matching skill, locates version-matched Markdown docs on disk, and writes idiomatic code. Without skills, it relies on stale training data, web search, or raw package source and misses framework conventions.
  A[Agent opens a project] --> B{Does the repo ship skills?}
  B -->|Yes| C[Reads AGENTS.md and matching SKILL.md]
  C --> D[Runs docs-path.sh to find package docs on disk]
  D --> E[Reads exact version Markdown guide]
  E --> F[Writes idiomatic code for installed version]
  B -->|No| G[Guesses from training data or web search]
  G --> H[Mixes old versions or another framework's habits]
  H --> I[Compiler errors or silent convention drift]
```

### Version drift

Models are trained on years of older blog posts, Stack Overflow answers, and previous major versions. Even when an agent searches the web, it often lands on docs for the latest release when your project is pinned 2 minor versions behind, or on an old tutorial from 2024. Docs bundled inside the installed package stay locked to the exact version in `package.json`, `go.mod`, or `Cargo.lock`.

### Unwritten conventions

Type signatures tell an agent what compiles. They do not tell it when to use a Server Island versus `client:visible` in Astro, whether policies belong in `models/` or `policies/` in Laravel Go, or whether you should prefer `date.Now(ctx)` over `time.Now()` so tests can freeze time. Those rules are what keep a codebase clean after 10 features, and skills are where agents reliably read them.

### Breaking upgrades

Web migration guides are written as prose for humans to skim once a year. A bundled `upgrade.md` paired with an `upgrading-*` skill gives the agent exact search patterns, ordered version steps, and verification commands.

## Where frameworks stand right now

A handful of frameworks have started moving in this direction, each stopping at a different point:

| Framework | What ships in a new app | Version-matched local docs | How agents find them |
| --- | --- | --- | --- |
| **Astro** (`7.4`) | 20-line `AGENTS.md` from `create-astro`, no `.agents/skills/` or `CLAUDE.md` | None inside `node_modules/astro` | 6 web links to `docs.astro.build` + opt-in Astro Docs MCP |
| **Laravel Go** (`0.2.0`) | `AGENTS.md`, `CLAUDE.md`, 8 `.agents/skills/` | 69 Markdown files + `upgrade.md` inside `go.laravel.com` | `docs-path.sh` via `go list -m` |
| **Laravel Rust** (`0.1.4`) | `AGENTS.md`, `CLAUDE.md`, 8 `.agents/skills/` | 68 Markdown files + `upgrade.md` inside `laravel-rust` crate | `docs-path.sh` via `cargo metadata` |
| **Next.js** (`16.2+`) | `AGENTS.md` generated by `create-next-app` | Markdown guides inside `node_modules/next/dist/docs/` | Direct path in `AGENTS.md` |
| **Laravel PHP + Boost** | Opt-in via `composer require laravel/boost --dev` | Version-matched docs API + local MCP server | `php artisan boost:install` and `boost:add-skill` |
| **Cloudflare Workers** | Separate skills repo (`npx skills add`) | Online docs retrieval instructions in skills | Installed globally by the user |

Next.js `16.2` is the clearest proof that this works inside npm packages, not just Go or Rust. Its `create-next-app` template now drops an `AGENTS.md` in the project root that warns the model ("This is NOT the Next.js you know") and points it directly to `node_modules/next/dist/docs/`.

Notice also the gap between installing a skill globally with `npx skills add` and shipping it inside the project scaffold.

I have Cloudflare's skills (`cloudflare`, `wrangler`, `durable-objects`, `agents-sdk`) installed in my `~/.agents/skills/` folder on my Mac, and they help a lot. Even their descriptions say "Biases towards retrieval from Cloudflare docs over pre-trained knowledge."

The problem is that I had to know those skills existed, install them myself, and remember to keep them updated. A teammate cloning my repo does not get them automatically, and a fresh scaffold starts without them.

When the framework puts `.agents/skills/` and `AGENTS.md` straight into the project template and ships the Markdown docs inside the package itself, every developer and every coding agent gets the right instructions on day one.

## What Astro (and every other framework) should ship

If I were maintaining Astro, or any web framework, ORM, or SDK today, I would treat agent skills as a release requirement right next to the README.

Astro already did part one by putting `AGENTS.md` into `create-astro`. Here is the full setup I want to see every framework ship:

1. **A short `AGENTS.md` at the repo root** (plus a one-line `CLAUDE.md` containing `@AGENTS.md`). Keep it under 60 lines: folder map, dev/test/build commands, core rules, and a list of the bundled skills. I wrote a full guide on [what goes in an AGENTS.md file](https://flaviocopes.com/agents-md/) if you want a template.
2. **Modular skills under `.agents/skills/`.** For Astro, that would mean focused skills for Content Layer collections, Islands and hydration, Astro Actions, SSR adapters, and upgrading. Splitting them by job keeps startup context small and each `SKILL.md` short. Stick to the open [Agent Skills](https://flaviocopes.com/agent-skills/) format (`name` and `description` in YAML frontmatter, relative script paths) so Claude Code, Codex, Cursor, and Antigravity all read the same folder.
3. **Version-matched Markdown docs inside the package itself.** Ship them inside `node_modules/astro/docs/` (just like Next.js ships `node_modules/next/dist/docs/` and Laravel Go ships `go.laravel.com/docs/`), and include a tiny script in the main skill that prints their path on disk.
4. **An `upgrade.md` and an upgrade skill.** Moving from Astro 6 to Astro 7, or across `0.x` releases of Laravel Go, gets much smoother when the package includes the exact symbols to grep for and the before/after code so an agent can migrate the repo and verify the build.

One limit showed up in my own Webhook test.

Framework skills explain how the framework works, while your product decisions still have to come from you.

In the `with-skills` run, the agent accepted an optional client-supplied `secret` field and fell back to generating one with `rand.Text()` if empty. In the `without-skills` run, the agent ignored client input and always generated the secret on the server. Both matched my prompt, and no framework skill can make that call for you.

You still need tests, types, and code review.

If a framework ships stale skills that contradict its own latest release, agents will write the wrong code even faster. Keeping the skills and bundled docs tested in CI alongside the framework code is part of maintaining the framework now.

For the last twenty years, developers picked frameworks partly for how good their documentation was.

Over the next few years, a big part of that choice will come down to whether your coding agent writes idiomatic code in that framework on the first try.

Laravel Go and Laravel Rust already showed how clean this is: `AGENTS.md`, focused skills in `.agents/skills/`, version-pinned Markdown docs inside the package, and a built-in upgrade skill. I hope Astro ships the same setup next, and every other framework follows.
