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
- Apply copy edits from PR 740 (which landed on ts-intent, not main)
- Update title to reference Agent Skills
- Link to agentskills.io, remove "intents" as grouping noun
- Fix all CLI commands (setup-github-actions, remove pnpm add)
- Cut premature "From skills to intents" section
- Add maintainer-focused "Try it out" closing with DB PR link
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/blog/from-docs-to-agents.md
+30-36Lines changed: 30 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: 'From Docs to Agents: Shipping Knowledge That Travels With Your Package'
2
+
title: 'Introducing TanStack Intent: Ship Agent Skills with Your npm Packages'
3
3
published: 2026-03-04
4
4
authors:
5
5
- Sarah Gerrard
@@ -10,29 +10,33 @@ authors:
10
10
11
11
Your docs are good. Your types are solid. Your agent still gets it wrong.
12
12
13
-
Not because it's dumb — because there's no pipeline between what you know about your tool and what agents know about your tool. Docs are written for humans who browse. Types check individual API calls but can't encode intent. Training data is a snapshot of the ecosystem as it _was_, mixing versions without flagging which one applies. The knowledge gap between your tool and agents using your tool isn't a content problem. It's a lifecycle problem.
13
+
Not because it's dumb — because nothing connects what you know about your tool to what agents know. Docs target humans who browse. Types check individual API calls but can't encode intent. Training data snapshots the ecosystem as it _was_, mixing versions without flagging which applies. The gap isn't content. It's lifecycle.
14
14
15
-
## Skills as side quests
15
+
## The copy-paste era
16
16
17
-
The ecosystem is already moving toward agent-readable knowledge. Cursor rules, CLAUDE.md files, skills directories — the idea that agents need more than docs and types has landed. But the delivery mechanism hasn't caught up.
17
+
The ecosystem already moves toward agent-readable knowledge. Cursor rules, CLAUDE.md files, skills directories — everyone agrees agents need more than docs and types. But delivery hasn't caught up.
18
18
19
-
Right now, if you want your agent to understand TanStack Router, you go find a community-maintained rules file in some GitHub repo. Maybe it's in `awesome-cursorrules`. Maybe someone linked it in Discord. You copy it into your project's `.cursorrules` or `CLAUDE.md`. Then you do the same for TanStack Query. And TanStack Table. Each one sourced from a different place, written by a different person, at a different point in time.
19
+
Right now, if you want your agent to understand TanStack Router, you hunt for a community-maintained rules file in some GitHub repo. Maybe it's in `awesome-cursorrules`. Maybe someone linked it in Discord. You copy it into `.cursorrules` or `CLAUDE.md`. Then you repeat for TanStack Query. And TanStack Table. Each from a different place, a different author, a different point in time.
20
20
21
-
Now multiply that across every tool in your stack. You're managing a pile of copy-pasted knowledge files with no versioning, no update mechanism, and no way to know when they've gone stale. Did TanStack Router ship a breaking change last week? Your rules file doesn't know. Is the Query skill you grabbed written for v4 or v5? Hope you checked.
21
+
Multiply that across every tool in your stack. You're managing copy-pasted knowledge files with no versioning, no update path, and no staleness signal. Did TanStack Router ship a breaking change last week? Your rules file doesn't know. Is the Query skill you grabbed written for v4 or v5? Hope you checked.
22
22
23
-
Finding skills is manual. Installing them is manual. Keeping them current is manual. And when they drift — and they always drift — you don't find out until your agent starts producing subtly wrong code again.
23
+
Finding skills is manual. Installing them is manual. Keeping them current is manual. When they drift — and they always drift — you discover it only when your agent starts producing subtly wrong code.
24
24
25
-
Meanwhile, library maintainers already have the knowledge agents need. It lives in their docs, migration guides, "common mistakes" GitHub discussions, Discord answers. But none of it reaches agents through a channel the maintainer controls. The knowledge exists. What's missing is a delivery mechanism tied to the package itself — not scattered across the ecosystem.
25
+
Library maintainers already have the knowledge agents need — in docs, migration guides, "common mistakes" GitHub discussions, Discord answers. But none of it reaches agents through a channel the maintainer controls. The knowledge exists. The delivery mechanism doesn't.
26
26
27
27

28
28
29
29
## Introducing `@tanstack/intent`
30
30
31
-
`@tanstack/intent` is the missing lifecycle layer. It's a toolkit for generating, discovering, and maintaining skills for your library — and shipping them as npm packages so they travel with your code.
31
+
`@tanstack/intent` is a CLI for library maintainers to generate, validate, and ship [Agent Skills](https://agentskills.io) alongside their npm packages.
32
32
33
-
The core idea: **intents are npm packages of skills.** They encode how tools work together, what patterns apply for 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 in separate repos. Not prompt snippets in READMEs. Versioned knowledge the maintainer owns, shipped through npm, 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.
34
34
35
-
A skill is a focused projection of knowledge you already maintain — the critical constraint an agent must know, the anti-pattern flagged explicitly, the composition rule stated once and clearly. Each skill declares which docs it was derived from:
35
+
This matters because the alternative — hoping model providers re-train 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 disambiguate. Skills bypass this. They're versioned with your package, and `npm update` brings the latest knowledge with the latest code.
36
+
37
+

38
+
39
+
A skill is a focused projection of knowledge you already maintain: the critical constraint, the flagged anti-pattern, the composition rule stated once and clearly. Each declares its source docs:
36
40
37
41
```
38
42
---
@@ -48,43 +52,41 @@ metadata:
48
52
---
49
53
```
50
54
51
-
That `metadata.sources` field is load-bearing. When those docs change, the CLI flags the skill for review. You're not maintaining two sources of truth — you're maintaining one, with a derived artifact that stays in sync.
55
+
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.
52
56
53
57
## Generating and validating skills
54
58
55
-
You don't author skills from scratch. `@tanstack/intent scaffold`walks you through a guided workflow to generate skills for your library:
59
+
You don't author skills from scratch. `@tanstack/intent scaffold`generates them from your library:
56
60
57
61
```bash
58
62
npx @tanstack/intent scaffold
59
63
```
60
64
61
-
The scaffold produces drafts you review, refine, and commit alongside your source code. Once you have skills, `@tanstack/intent validate` checks that your skill files are well-formed:
65
+
The scaffold produces drafts you review, refine, and commit. Once committed, `@tanstack/intent validate` checks that they're well-formed:
62
66
63
67
```bash
64
68
npx @tanstack/intent validate
65
69
```
66
70
67
-
And `@tanstack/intent setup-github-actions` copies CI workflow templates into your repo so validation runs automatically on every push:
71
+
`@tanstack/intent setup-github-actions` copies CI workflow templates into your repo so validation runs on every push:
68
72
69
73
```bash
70
74
npx @tanstack/intent setup-github-actions
71
75
```
72
76
73
-
This matters because the alternative is hoping model providers eventually re-train on your latest docs. That's not a strategy. Training data has a permanent version-mixing problem: once a breaking change ships, models contain _both_ versions forever with no mechanism to disambiguate. Skills bypass this entirely. They're versioned with your package, and `npm update` brings the latest knowledge with the latest code.
74
-
75
-

76
-
77
77
## The dependency graph does the discovery
78
78
79
-
When a developer runs `@tanstack/intent install`, the CLI discovers every intent-enabled package in their project and wires the relevant skills into their agent configuration — CLAUDE.md, .cursorrules, whatever their tooling expects.
79
+
That's the maintainer side. For developers using those libraries, the experience is simpler.
80
+
81
+
When a developer runs `@tanstack/intent install`, the CLI discovers every intent-enabled package and wires skills into the agent configuration — CLAUDE.md, .cursorrules, whatever the tooling expects.
80
82
81
83
```bash
82
84
npx @tanstack/intent install
83
85
```
84
86
85
-

87
+

86
88
87
-
No manual setup per-library. No hunting for rules files. Install the package, run `@tanstack/intent install`, and the agent understands the tool. Update the package, and the skills update with it. Knowledge travels through the same channel as code.
89
+
No per-library setup. No hunting for rules files. Install the package, run `@tanstack/intent install`, and the agent understands the tool. Update the package, and skills update too. Knowledge travels the same channel as code.
88
90
89
91
`@tanstack/intent list` shows you what's available:
90
92
@@ -93,42 +95,34 @@ npx @tanstack/intent list # See what's intent-enabled in your deps
93
95
npx @tanstack/intent list --json # Machine-readable output
94
96
```
95
97
96
-
For library maintainers, `@tanstack/intent meta` surfaces meta-skills — higher-level guidance for how to author and maintain skills for your library:
98
+
For library maintainers, `@tanstack/intent meta` surfaces meta-skills — higher-level guidance on authoring and maintaining skills:
97
99
98
100
```bash
99
101
npx @tanstack/intent meta
100
102
```
101
103
102
-
## From skills to playbooks
103
-
104
-
A single skill helps an agent use one tool correctly. But real development is composition — routing _with_ server state _with_ a data grid _with_ client-side storage. No individual skill covers how they fit together.
105
-
106
-
Playbooks are the orchestration layer. A developer says "build a paginated data table with URL-synced filters" and the playbook knows which skills to load and how they compose — the search params skill, the loader/query integration skill, the table columnDefs skill, in the right order. Developer goals map to skill combinations.
107
-
108
-
The more libraries in your stack that ship skills, the richer the composition story becomes.
109
-
110
104
## Keeping it current
111
105
112
-
The real risk with any derived artifact is staleness. You update your docs, ship a new API, and the skills silently drift. `@tanstack/intent` treats this as a first-class problem.
106
+
The real risk with any derived artifact is staleness. You update your docs, ship a new API, and skills silently drift. `@tanstack/intent` treats staleness as a first-class problem.
113
107
114
-
`@tanstack/intent stale` checks your skills for version drift — flagging any that may have fallen behind their source material:
108
+
`@tanstack/intent stale` checks for version drift, flagging skills that have fallen behind their sources:
115
109
116
110
```bash
117
111
npx @tanstack/intent stale # Human-readable report
118
112
npx @tanstack/intent stale --json # Machine-readable for CI
119
113
```
120
114
121
-
Run it in CI and you get a failing check when source material has changed. The skill becomes part of your release checklist — not something you remember to update, something your pipeline catches.
115
+
Run it in CI and you get a failing check when sources change. Skills become part of your release checklist — not something you remember to update, but something your pipeline catches.
122
116
123
117

124
118
125
-
The feedback loop runs both directions. `@tanstack/intent feedback` lets users submit structured reports when a skill produces incorrect output — which skill was active, which version, what went wrong. That context flows back to you as a maintainer, and the fix ships to everyone on the next `npm update`.
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`.
126
120
127
121
```bash
128
122
npx @tanstack/intent feedback
129
123
```
130
124
131
-
Skills that keep needing the same workaround are a signal. 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 as intended.
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.
0 commit comments