Get started scaffolding, validating, and shipping skills for your library.
npm i -D @tanstack/intentpnpm add -D @tanstack/intentyarn add -D @tanstack/intentbun add -d @tanstack/intentOr run commands without installing:
npx @tanstack/intent@latest scaffold
When using npx or bunx, always include @latest. Intent-enabled libraries ship a local intent binary shim, and without @latest, your package manager may resolve to that shim instead of the real CLI.
Start the scaffolding process with your AI agent:
npx @tanstack/intent@latest scaffold
This prints a comprehensive prompt that walks you and your agent through three phases:
Phase 1: Domain Discovery
Phase 2: Tree Generation
Phase 3: Skill Generation
This is a context-heavy process that involves domain discovery, GitHub issues analysis, and interactive maintainer interviews. The agent will scan your documentation, recent issues and discussions, and ask targeted questions to surface implicit knowledge and common failure modes. The more information you provide about your library's patterns, pitfalls, and real-world usage problems, the better the generated skills will be. Expect multiple rounds of refinement and regular context compaction before completion.
After scaffolding, validate that all SKILL.md files are well-formed:
npx @tanstack/intent@latest validate
This checks:
If any artifacts are present (domain_map.yaml, skill_spec.md, skill_tree.yaml), they must parse as valid YAML.
Commit both generated skills and the artifacts used to create them:
skills/
core/SKILL.md
react/SKILL.md
_artifacts/
domain_map.yaml
skill_spec.md
skill_tree.yaml
Artifacts enforce a consistent skill structure across versions, making it easier to audit, refresh, or extend the skill set without starting from scratch.
Run these commands to prepare your package for skill publishing:
# Generate the bin shim that consumers use for discovery
npx @tanstack/intent@latest add-library-bin
# Update package.json with required fields
npx @tanstack/intent@latest edit-package-json
# Copy CI workflow templates (validate + stale checks)
npx @tanstack/intent@latest setup-github-actions
What these do:
Skills ship inside your npm package. When you publish:
npm publish
Consumers who install your library automatically get the skills. They discover them with intent list and map them with intent install.
Version alignment:
After running setup-github-actions, you'll have three workflows in .github/workflows/:
validate-skills.yml (runs on PRs touching skills/)
check-skills.yml (runs on release or manual trigger)
notify-intent.yml (runs on docs/source changes to main)
When you publish a new release, check-skills.yml automatically opens a PR flagging skills that need review.
Manually check which skills need updates with:
npx @tanstack/intent@latest stale
This detects:
To update stale skills:
Skills are updated through agent assistance, not full automation. The workflow detects what's stale and provides the prompt — your agent handles the actual updates.
Use --json output for CI integration or scripting.
As your library evolves:
Create GitHub issue labels matching your skill names (skill:core, skill:react). When users file issues, tag them with the relevant skill label to track which areas need the most improvement.