Vercel Douses Cold Water on Agent Skills
/ 3 min read /
Table of Contents 目录
The Vercel team recently shared a blog post about how to make an agent use the correct Next.js APIs — that is, using the APIs that match the version of Next.js installed in the current project, rather than picking APIs from a different version. If you’re a Next.js developer, you know how important this is, because Next.js releases updates very quickly.
What’s most interesting is that the Vercel team initially went all-in on Skills to solve this problem. Since Skills can progressively disclose information, they can best protect your context from blowing up 💥. But after the Vercel team built the Skills and ran actual tests, they found Skills unreliable — the agent simply wouldn’t trigger the Vercel-written Skills. Even with an emphasized prompt, they couldn’t guarantee it would work, and relying on prompts itself isn’t the right approach.
Since Agent Skills didn’t work, the Vercel team instead embedded a document index directly into Agent.md (just an index, which also avoids context explosion). The agent can then retrieve the corresponding content based on this index and thus use the correct APIs. There’s an important instruction inside Agent.md:
IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoningfor any Next.js tasks.This way the agent consults the documentation instead of relying on pre-trained data. Tests showed that adding this instruction in Agent.md worked remarkably well:
100% success. If you don’t believe it, try it yourself: **npx @next/codemod@canary agents-md**
This command does three things:
- Checks your Next.js version
- Downloads the matching documentation into .next-docs/
- Injects the compressed index into your
Agent.md
Notably, Vercel used some techniques to compress the index down to 8KB, so the agent can accurately locate the relevant documentation without bloating the context.
Summary
Vercel’s sharing shows one thing: Agent Skills are not a universal solution. There are scenarios where they don’t fit, such as providing a way to acquire knowledge.
Vercel also explained why Agent.md outperforms Skills:
- Skills perform poorly because their invocation rate is low — they depend on the phrasing of the prompt to be triggered.
Agent.mdperforms well because it’s a system prompt that is always present in every conversation. This eliminates the agent’s decision step — it no longer needs to decide whether to call the corresponding Skill; it just follows the instruction directly.
Finally, Vercel gave developers some advice:
- Prefer
Agent.mdfor knowledge acquisition - Skills are suitable for handling task workflows (SOPs), such as version upgrades
- For framework authors, you should provide an official
Agent.mdto help developers use agents to quickly and accurately generate useful code
This article was handcrafted, no AI involved.