You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/blog/from-docs-to-agents.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,11 @@ Library maintainers already have the knowledge agents need — in docs, migratio
28
28
29
29
## Introducing `@tanstack/intent`
30
30
31
-
`@tanstack/intent` is a CLI for library maintainers to generate, validate, and ship [Agent Skills](https://agentskills.io) alongside their npm packages.
31
+
`@tanstack/intent` is a CLI for library maintainers to generate, validate, and ship [Agent Skills](https://agentskills.io) alongside their npm packages. The Agent Skills format has been adopted by VS Code, GitHub Copilot, OpenAI Codex, Cursor, Claude Code, Goose, Amp, and others — this isn't a proprietary format, it's an open standard with broad industry adoption.
32
32
33
-
**Skills ship inside your npm package.** They encode how your tool works, which patterns fit which goals, and what to avoid. Skills travel with the tool via `npm update` — not the model's training cutoff, not community-maintained rules files, not prompt snippets in READMEs. Versioned knowledge the maintainer owns, updated when the package updates.
33
+
**Skills ship inside your npm package.** They encode how your tool works, which patterns fit which goals, and what to avoid. Skills travel with the tool via `npm update` — not the model's training cutoff, not community-maintained rules files, not prompt snippets in READMEs. Versioned knowledge the maintainer owns, updated when the package updates. And because skills are editorial — prose, not code contracts — maintaining them is updating documentation, not debugging API compatibility.
34
34
35
-
This matters because the alternative — hoping model providers retrain on your latest docs — is not a strategy. Training data has a permanent version-mixing problem: once a breaking change ships, models contain _both_ versions forever with no way to tell them apart. Skills bypass this. They're versioned with your package, and `npm update` brings the latest knowledge with the latest code.
35
+
Agents handle popular, stable libraries well — React, Express, Tailwind. Training data is saturated with correct usage. But at the frontier — new tools, major version transitions, novel compositions across packages — agents hallucinate, confuse versions, and miss critical implications. The frontier is bigger than it sounds: every new library, every breaking change, every composition across tools that nobody has written about. And once a breaking change ships, models don't "catch up." They develop a permanent split-brain — training data contains _both_ versions forever with no way to disambiguate. Skills bypass this. They're pinned to the installed version.
36
36
37
37

38
38
@@ -52,6 +52,29 @@ metadata:
52
52
---
53
53
```
54
54
55
+
Inside the skill, you write what the agent needs to get right — including what NOT to do:
56
+
57
+
```markdown
58
+
## Search Params
59
+
60
+
Use `validateSearch` to define type-safe search params on a route:
61
+
62
+
const Route = createFileRoute('/products')({
63
+
validateSearch: z.object({
64
+
page: z.number().default(1),
65
+
filter: z.string().optional(),
66
+
}),
67
+
})
68
+
69
+
## Common Mistakes
70
+
71
+
❌ Don't use `useSearchParams()` from React Router — use TanStack
72
+
Router's `useSearch()` hook which is fully type-safe.
That `metadata.sources` field is load-bearing. When those docs change, the CLI flags the skill for review. One source of truth, one derived artifact that stays in sync.
56
79
57
80
## Generating and validating skills
@@ -116,13 +139,13 @@ Run it in CI and you get a failing check when sources change. Skills become part
116
139
117
140

118
141
119
-
The feedback loop runs both directions. `@tanstack/intent feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to you, and the fix ships to everyone on the next `npm update`.
142
+
The feedback loop runs both directions. `@tanstack/intent feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to you as a maintainer, and the fix ships to everyone on the next `npm update`. Every support interaction produces an artifact that prevents the same problem for all future users — not just the one who reported it.
120
143
121
144
```bash
122
145
npx @tanstack/intent feedback
123
146
```
124
147
125
-
Skills that keep needing the same workaround signal a deeper problem. Sometimes the fix is a better skill. Sometimes it's a better API. A skill that dissolves because the tool absorbed its lesson is the system working.
148
+
A skill that persists forever means the tool has a design gap it should close. A skill that disappears because the tool absorbed its lesson is the system working exactly as intended.
0 commit comments