|
| 1 | +--- |
| 2 | +title: Overview |
| 3 | +--- |
| 4 | + |
| 5 | +`@tanstack/intent` is a CLI for library maintainers to generate, validate, and ship [Agent Skills](https://agentskills.io) alongside their npm packages. |
| 6 | + |
| 7 | +## The problem |
| 8 | + |
| 9 | +Your docs are good. Your types are solid. Your agent still gets it wrong. |
| 10 | + |
| 11 | +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 with no way to tell which applies. Once a breaking change ships, models develop a permanent split-brain — training data contains _both_ versions forever with no way to disambiguate. |
| 12 | + |
| 13 | +The ecosystem already moves toward agent-readable knowledge — Cursor rules, CLAUDE.md files, skills directories. But delivery is stuck in copy-paste: hunt for a community-maintained rules file, paste it into your config, repeat for every tool. No versioning, no update path, no staleness signal. |
| 14 | + |
| 15 | +## Skills: versioned knowledge in npm |
| 16 | + |
| 17 | +A skill is a short, versioned document that tells agents how to use a specific capability of your library — correct patterns, common mistakes, and when to apply them. Skills ship inside your npm package and 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. |
| 18 | + |
| 19 | +Each skill declares its source docs. When those docs change, the CLI flags the skill for review. One source of truth, one derived artifact that stays in sync. |
| 20 | + |
| 21 | +The [Agent Skills spec](https://agentskills.io) is an open standard already adopted by VS Code, GitHub Copilot, OpenAI Codex, Cursor, Claude Code, Goose, Amp, and others. |
| 22 | + |
| 23 | +## For library consumers |
| 24 | + |
| 25 | +Set up skill-to-task mappings in your project's agent config files (CLAUDE.md, .cursorrules, etc.): |
| 26 | + |
| 27 | +```bash |
| 28 | +npx @tanstack/intent install |
| 29 | +``` |
| 30 | + |
| 31 | +No per-library setup. No hunting for rules files. Install the package, run `npx @tanstack/intent install`, and the agent understands the tool. Update the package, and skills update too. |
| 32 | + |
| 33 | +List available skills from installed packages: |
| 34 | + |
| 35 | +```bash |
| 36 | +npx @tanstack/intent list |
| 37 | +``` |
| 38 | + |
| 39 | +## For library maintainers |
| 40 | + |
| 41 | +Generate skills for your library by telling your AI coding agent to run: |
| 42 | + |
| 43 | +```bash |
| 44 | +npx @tanstack/intent scaffold |
| 45 | +``` |
| 46 | + |
| 47 | +This walks the agent through domain discovery, skill tree generation, and skill creation — one step at a time with your review at each stage. |
| 48 | + |
| 49 | +Validate your skill files: |
| 50 | + |
| 51 | +```bash |
| 52 | +npx @tanstack/intent validate |
| 53 | +``` |
| 54 | + |
| 55 | +Check for skills that have fallen behind their sources: |
| 56 | + |
| 57 | +```bash |
| 58 | +npx @tanstack/intent stale |
| 59 | +``` |
| 60 | + |
| 61 | +Copy CI workflow templates into your repo so validation and staleness checks run on every push: |
| 62 | + |
| 63 | +```bash |
| 64 | +npx @tanstack/intent setup-github-actions |
| 65 | +``` |
| 66 | + |
| 67 | +## Keeping skills current |
| 68 | + |
| 69 | +The real risk with any derived artifact is staleness. `npx @tanstack/intent stale` flags skills whose source docs have changed, and CI templates catch drift before it ships. |
| 70 | + |
| 71 | +The feedback loop runs both directions. `npx @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 the maintainer, and the fix ships to everyone on the next `npm update`. Every support interaction produces an artifact that prevents the same class of problem for all future users — not just the one who reported it. |
| 72 | + |
| 73 | +## CLI Commands |
| 74 | + |
| 75 | +| Command | Description | |
| 76 | +| --- | --- | |
| 77 | +| `npx @tanstack/intent install` | Set up skill-to-task mappings in agent config files | |
| 78 | +| `npx @tanstack/intent list [--json]` | Discover intent-enabled packages | |
| 79 | +| `npx @tanstack/intent meta` | List meta-skills for library maintainers | |
| 80 | +| `npx @tanstack/intent scaffold` | Print the guided skill generation prompt | |
| 81 | +| `npx @tanstack/intent validate [dir]` | Validate SKILL.md files | |
| 82 | +| `npx @tanstack/intent setup-github-actions` | Copy CI templates into your repo | |
| 83 | +| `npx @tanstack/intent stale [--json]` | Check skills for version drift | |
| 84 | +| `npx @tanstack/intent feedback` | Submit skill feedback | |
0 commit comments