Every framework should ship agent skills

By

Tagged: AI, Astro, Laravel

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.

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 and Laravel Rust, which both drop 8 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

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.)

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 and 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:

#!/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

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 and in the free 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):

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 measuredWith .agents/skills/Without .agents/skills/
Bundled v0.2.0 Markdown docs read10 commands via docs-path.sh0 (all 69 docs ignored)
Web searches01
Raw Go source greps in GOMODCACHE612
go vet ./... and go test ./...Pass (5 new tests)Pass (5 new tests)
Policy locationColocated in models/webhook.goNew policies/webhook.go package
Database default tag on Activedb:",default" on *boolMissing (Active bool)
Relationship tagUser *User with model:"belongs_to" and omitzeroMissing
Model factoryAdded database/factories/webhook.goSkipped (manual helper in test file)
Migration filename2026_12_05_000000_create_webhooks_table.go0001_01_01_000003_create_webhooks_table.go
Route namesNamed (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

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:

How a coding agent writes code with and without framework skillsWith 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.YesNoAgent opens aprojectDoes the repo shipskills?Reads AGENTS.md andmatching SKILL.mdRuns docs-path.sh tofind package docs ondiskReads exact versionMarkdown guideWrites idiomaticcode for installedversionGuesses fromtraining data or websearchMixes old versionsor anotherframework's habitsCompiler errors orsilent conventiondrift

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:

FrameworkWhat ships in a new appVersion-matched local docsHow agents find them
Astro (7.4)20-line AGENTS.md from create-astro, no .agents/skills/ or CLAUDE.mdNone inside node_modules/astro6 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.comdocs-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 cratedocs-path.sh via cargo metadata
Next.js (16.2+)AGENTS.md generated by create-next-appMarkdown guides inside node_modules/next/dist/docs/Direct path in AGENTS.md
Laravel PHP + BoostOpt-in via composer require laravel/boost --devVersion-matched docs API + local MCP serverphp artisan boost:install and boost:add-skill
Cloudflare WorkersSeparate skills repo (npx skills add)Online docs retrieval instructions in skillsInstalled 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 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 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.

Want me to talk about your product? You can sponsor this site.

Related posts about ai: