-
Notifications
You must be signed in to change notification settings - Fork 2
feat(tanstack): add TanStack intent-based skills plugin #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ba99f05
feat(tanstack): add TanStack intent-based skills plugin
amondnet 527b677
feat(tanstack): prefer ask CLI for docs fallback
amondnet b5dd286
fix(tanstack): use version-pinned ask npm: specifiers in docs fallback
amondnet 2b1f241
Merge branch 'main' of https://github.com/pleaseai/claude-code-plugin…
amondnet e5eec57
chore: update agent memory
amondnet 6009f69
chore(tanstack): apply AI code review suggestions
amondnet 2656164
chore(tanstack): apply gemini review suggestions
amondnet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "name": "tanstack", | ||
| "version": "0.1.0", | ||
| "description": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI). Uses the official @tanstack/intent CLI to load skills shipped inside the installed npm packages.", | ||
| "author": { | ||
| "name": "TanStack", | ||
| "url": "https://tanstack.com" | ||
| }, | ||
| "homepage": "https://tanstack.com/intent", | ||
| "repository": "https://github.com/TanStack/intent", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "tanstack", | ||
| "query", | ||
| "router", | ||
| "start", | ||
| "table", | ||
| "form", | ||
| "db", | ||
| "virtual", | ||
| "intent" | ||
| ], | ||
| "skills": [ | ||
| "./skills/" | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "name": "tanstack", | ||
| "version": "0.1.0", | ||
| "description": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI). Uses the official @tanstack/intent CLI to load skills shipped inside the installed npm packages.", | ||
| "author": { | ||
| "name": "TanStack", | ||
| "url": "https://tanstack.com" | ||
| }, | ||
| "interface": { | ||
| "displayName": "Tanstack", | ||
| "shortDescription": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI)", | ||
| "longDescription": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI). Uses the official @tanstack/intent CLI to load skills shipped inside the installed npm packages.", | ||
| "developerName": "TanStack", | ||
| "category": "Framework", | ||
| "capabilities": [ | ||
| "Skill" | ||
| ], | ||
| "defaultPrompt": [ | ||
| "Help me use Tanstack for my current task." | ||
| ], | ||
| "websiteURL": "https://tanstack.com/intent" | ||
| }, | ||
| "homepage": "https://tanstack.com/intent", | ||
| "repository": "https://github.com/TanStack/intent", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "tanstack", | ||
| "query", | ||
| "router", | ||
| "start", | ||
| "table", | ||
| "form", | ||
| "db", | ||
| "virtual", | ||
| "intent" | ||
| ], | ||
| "skills": "./skills/" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "tanstack", | ||
| "displayName": "Tanstack", | ||
| "description": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI). Uses the official @tanstack/intent CLI to load skills shipped inside the installed npm packages.", | ||
| "version": "0.1.0", | ||
| "author": { | ||
| "name": "TanStack" | ||
| }, | ||
| "category": "Framework", | ||
| "homepage": "https://tanstack.com/intent", | ||
| "repository": "https://github.com/TanStack/intent", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "tanstack", | ||
| "query", | ||
| "router", | ||
| "start", | ||
| "table", | ||
| "form", | ||
| "db", | ||
| "virtual", | ||
| "intent" | ||
| ], | ||
| "tags": [ | ||
| "framework", | ||
| "frontend" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # tanstack | ||
|
|
||
| Version-aware skills for the TanStack ecosystem — Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI, and more. Ships a single `use-tanstack` skill that drives the official [`@tanstack/intent`](https://tanstack.com/intent) CLI to load Agent Skills **shipped inside the installed npm packages**, so guidance always matches the exact library versions in the project. | ||
|
|
||
| ## How it works | ||
|
|
||
| TanStack publishes official SKILL.md documents inside its npm packages, versioned with each release ([TanStack Intent](https://tanstack.com/intent/latest/docs/overview)). The skill instructs the agent to: | ||
|
|
||
| 1. `npx @tanstack/intent@latest list` — discover skills from the project's installed dependencies | ||
| 2. `npx @tanstack/intent@latest load @tanstack/db#db-core/live-queries` — load the exact-version skill content for the task at hand | ||
| 3. Fall back to the official markdown docs (`tanstack.com/<lib>/latest/docs/<page>.md`) for packages that don't ship skills yet | ||
|
|
||
| No skill content is vendored in this plugin — everything is resolved from the project's own dependencies at run time, so there is nothing to go stale. | ||
|
|
||
| ## Install | ||
|
|
||
| ### Claude Code | ||
|
|
||
| ```bash | ||
| /plugin marketplace add pleaseai/claude-code-plugins | ||
| /plugin install tanstack@pleaseai | ||
| ``` | ||
|
|
||
| ## Compatibility | ||
|
|
||
| The `SKILL.md` format is shared by Claude Code, Cursor, Codex CLI, and Google Antigravity. Runtime manifests (`.codex-plugin/plugin.json`, root `plugin.json`, `.cursor-plugin/plugin.json`) are auto-generated by `bun run plugins:multi-format` — do not hand-edit them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "name": "tanstack", | ||
| "version": "0.1.0", | ||
| "description": "Version-aware skills for the TanStack ecosystem (Query, Router, Start, Table, Form, DB, Virtual, Store, Pacer, AI). Uses the official @tanstack/intent CLI to load skills shipped inside the installed npm packages.", | ||
| "author": { | ||
| "name": "TanStack", | ||
| "url": "https://tanstack.com" | ||
| }, | ||
| "homepage": "https://tanstack.com/intent", | ||
| "repository": "https://github.com/TanStack/intent", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "tanstack", | ||
| "query", | ||
| "router", | ||
| "start", | ||
| "table", | ||
| "form", | ||
| "db", | ||
| "virtual", | ||
| "intent" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| name: use-tanstack | ||
| description: 'Answer questions and write code for TanStack libraries using version-accurate, officially shipped Agent Skills instead of training data. Use when working with any @tanstack/* package or TanStack library: Query (react-query, solid-query, vue-query — useQuery, useMutation, QueryClient, queryOptions, invalidation, optimistic updates), Router (@tanstack/react-router — createFileRoute, loaders, search params, path params, type-safe navigation), Start (full-stack framework — server functions, SSR, streaming), Table (headless tables — useReactTable, columns, sorting, filtering, pagination), Form (useForm, field validation), DB (createCollection, live queries, optimistic mutations, sync adapters), Virtual (useVirtualizer, list/grid virtualization), Store, Pacer (debounce/throttle/queue), AI, Devtools, Config, or CLI. Also use when the user mentions tanstack.com docs or the @tanstack/intent CLI.' | ||
| --- | ||
|
|
||
| ## Core Principle: Load Official Skills, Do Not Trust Internal Knowledge | ||
|
|
||
| TanStack libraries release fast and their APIs drift between minor versions. TanStack ships **official Agent Skills inside the npm packages themselves**, versioned with each release. The [`@tanstack/intent`](https://tanstack.com/intent) CLI discovers and loads the skills matching the **exact versions installed in the project** — always prefer them over recalled knowledge. | ||
|
|
||
| Pick the runner matching the project's package manager: | ||
|
|
||
| | Tool | Pattern | | ||
| |------|---------| | ||
| | npm | `npx @tanstack/intent@latest <command>` | | ||
| | pnpm | `pnpm dlx @tanstack/intent@latest <command>` | | ||
| | Yarn | `yarn dlx @tanstack/intent@latest <command>` | | ||
| | Bun | `bunx @tanstack/intent@latest <command>` | | ||
|
|
||
| ## Workflow | ||
|
|
||
| **1. Discover** — from the project root (must run after dependencies are installed): | ||
|
|
||
| ```bash | ||
| npx @tanstack/intent@latest list | ||
| ``` | ||
|
|
||
| This scans `node_modules` / workspace dependencies for intent-enabled packages and prints every available skill with its description and the exact `load` command, e.g.: | ||
|
|
||
| ``` | ||
| @tanstack/db | ||
| db-core [core] TanStack DB core concepts: createCollection ... | ||
| Load: npx @tanstack/intent@latest load @tanstack/db#db-core | ||
| live-queries [sub-skill] Query builder fluent API: from, where, join ... | ||
| mutations-optimistic [sub-skill] collection.insert, collection.update ... | ||
| ``` | ||
|
|
||
| **2. Load** — start with the `[core]` skill for the library, then load only the sub-skills whose descriptions match the task: | ||
|
|
||
| ```bash | ||
| npx @tanstack/intent@latest load @tanstack/db#db-core | ||
| npx @tanstack/intent@latest load @tanstack/db#db-core/live-queries | ||
| ``` | ||
|
|
||
| The output is the SKILL.md content for the installed package version. Treat it as authoritative: verify every API name and signature against it before writing code, and prefer it over any conflicting memory of the API. | ||
|
|
||
| **3. Re-check on version changes** — skills are pinned to the installed version. If dependencies are updated mid-session, re-run `list`/`load`. | ||
|
|
||
| Notes: | ||
|
|
||
| - `list` only scans local project dependencies by default; pass `--global` to include globally installed packages. | ||
| - `load --path` prints the resolved skill file path instead of its content (useful for debugging). | ||
| - The CLI may print a notice about `package.json#intent.skills` — that allowlist narrows which packages' skills are surfaced. Do not add one unless the user asks. | ||
|
|
||
| ## Fallback: Packages Without Shipped Skills | ||
|
|
||
| Intent is rolling out across the ecosystem (newest packages first — Router, Start, DB, AI, Devtools ship skills; some stable packages like `@tanstack/react-query` may not yet). If `list` shows no skills for the library you need, check the installed version first (`npm ls @tanstack/react-query` or read the lockfile), then: | ||
|
|
||
| 1. **Preferred — [`ask`](https://github.com/pleaseai/ask) CLI** (check `which ask`). It fetches the library's docs/source at the exact installed version (resolved from the lockfile) and caches them locally for grepping: | ||
|
|
||
| ```bash | ||
| # `ask docs` prints candidate paths one per line (installed package dir, then | ||
| # the repo docs tree). Pick the last line that is an existing directory rather | ||
| # than blindly trusting `tail -n1` — output format/notices can shift. | ||
| ASK_DOCS=$(ask docs "npm:@tanstack/react-query" | while read -r p || [ -n "$p" ]; do [ -d "$p" ] && echo "$p"; done | tail -n1) | ||
| [ -d "$ASK_DOCS" ] && rg -l "useQuery" "$ASK_DOCS" | ||
| ASK_SRC=$(ask src "npm:@tanstack/react-query" | while read -r p || [ -n "$p" ]; do [ -d "$p" ] && echo "$p"; done | tail -n1) # implementation, for API signatures | ||
| ``` | ||
|
|
||
| Append `@<version>` to pin explicitly (e.g. `npm:@tanstack/react-query@5.101.2`). Requires `ask` >= 0.4.9 — older versions cannot resolve TanStack's scoped monorepo release tags; there, fall back to `github:TanStack/query@main` (repo names match the library: `TanStack/query`, `TanStack/router`, `TanStack/table`, `TanStack/form`, `TanStack/virtual`, ...) and cross-check anything version-sensitive against the installed package's `node_modules` typings or CHANGELOG. | ||
|
|
||
| 2. **No `ask` — official markdown docs.** Every page on tanstack.com has a plain-markdown variant; append `.md` to the docs URL: | ||
|
|
||
| ```bash | ||
| curl -fsSL https://tanstack.com/query/latest/docs/framework/react/overview.md | ||
| curl -fsSL https://tanstack.com/table/latest/docs/introduction.md | ||
| ``` | ||
|
|
||
| Replace `latest` with the installed major version (e.g. `/query/v5/`) when the project is not on the latest line. | ||
|
|
||
| If neither shipped skills nor version-matching docs can back an answer, say so explicitly instead of guessing. | ||
|
|
||
| ## Common Decision Points | ||
|
|
||
| - **Which library?** Query = server-state caching/fetching; DB = client-side reactive collections with optimistic mutations and sync; Store = tiny framework-agnostic reactive store. Do not reach for DB when plain Query suffices. | ||
| - **Router vs Start**: Router is the type-safe routing library; Start is the full-stack framework built on it (server functions, SSR). A Router project is not automatically a Start project — check for `@tanstack/react-start` before suggesting server functions. | ||
| - **Framework adapters**: most libraries are headless cores with per-framework adapters (`@tanstack/react-*`, `@tanstack/vue-*`, `@tanstack/solid-*`, ...). Load skills / read docs for the adapter actually installed, not the React one by default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.