add-example-tutorial
Skill3.2k starsChanged 2 months agoMITView on GitHub
Use when adding a public teaching example or a docs tutorial. Don't use for an internal Nx playground (that is new-react-playground), for a package API change with no walkthrough, or for a docs-only copy edit.
- Commits and pushes
Trending
More talk lately.about the whole repository
Who's talking about TanStack/ai
- nuxt/ui“Integrate chat components with Tanstack AI”GitHub · Jan 27, 2026 · 2 reactions
- getsentry/sentry-javascript“Add instrumentation for `@tanstack/ai`”GitHub · Jan 5, 2026 · 2 reactions
- kubb-labs/kubb“Use Knip for unused code detection”GitHub · Dec 18, 2025 · 2 reactions
- @jp-knj.bsky.social“github.com/TanStack/ai I’m curious”Bluesky · Dec 5, 2025 · 2 likes
- TanStack/tanstack.com“fix(builder): unlock BYOK passkey on the click, not mid-send”GitHub · Sep 5, 2026 · 1 reactions
The biggest 5 of 30 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 30
Talked about on GitHub and Bluesky (30 times).
On GitHub · 28
- Jan 27, 2026Integrate chat components with Tanstack AI — nuxt/ui2 reactions · 7 comments
- Jan 5, 2026Add instrumentation for `@tanstack/ai` — getsentry/sentry-javascript2 reactions · 1 comment
- Dec 18, 2025Use Knip for unused code detection — kubb-labs/kubb2 reactions · 2 comments
- Sep 5, 2026fix(builder): unlock BYOK passkey on the click, not mid-send — TanStack/tanstack.com1 reaction · 3 comments
- Jun 30, 2026build(deps): bump the bun-dependencies group with 9 updates — endalk200/skopeo1 reaction
23 more on GitHub
- Oct 5, 2026fix(ai-search): Haiku keyword extraction has fallen back on every search since 2026-06-12 — viclafouch/petit-meme0 reactions
- Oct 5, 2026chore(deps): bump the framework-deps group with 13 updates — clanker25/ui0 reactions
- Oct 5, 2026build(deps): Bump the production-minor-patch group across 1 directory with 22 updates — kvpendergast/jackline0 reactions
- Oct 3, 2026[Add] TanStack AI (TanStack/ai) — PyTorchKR/landscape0 reactions
- Oct 1, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 19 updates — cbangera2/BudgetLens0 reactions · 1 comment
- Oct 1, 2026Bump @tanstack/ai-client from 0.35.1 to 0.36.0 — unacms/UNA0 reactions · 1 comment
- Sep 30, 2026chore(deps): bump the framework-deps group with 13 updates — zhcndoc/shadcn0 reactions
- Sep 28, 2026chore(deps): bump the runtime-dependencies group across 1 directory with 4 updates — changbaebang/career-radar0 reactions
- Sep 27, 2026chore(deps): bump @tanstack/ai-code-mode from 0.4.10 to 0.4.13 — FRFlo/dumbdiscordbot0 reactions
- Sep 27, 2026chore(deps): bump @tanstack/ai from 0.55.0 to 0.58.0 — FRFlo/dumbdiscordbot0 reactions
- Sep 21, 2026fix(deps): bump @tanstack/ai-vue from 0.19.4 to 0.24.0 — vinayakkulkarni/tileserver-rs0 reactions · 2 comments
- Sep 17, 2026chore(deps): bump the framework-deps group with 13 updates — morganfeeney/shadcn-ui-fork0 reactions · 1 comment
- Sep 9, 2026chore(web)(deps): bump the web-dependencies group across 1 directory with 16 updates — najmuzzaman-mohammad/gawkbot0 reactions · 1 comment
- Sep 8, 2026chore(deps): bump @tanstack/ai-react from 0.16.4 to 0.24.0 — moodyawhvh/ui-chinese0 reactions
- Sep 1, 2026Bump @tanstack/ai from 0.39.1 to 0.52.0 — MrLightful/scopra0 reactions · 1 comment
- Aug 31, 2026chore(deps): bump the tanstack-ai group across 1 directory with 4 updates — linuxing3/openstory0 reactions · 1 comment
- Aug 24, 2026build(deps): bump @tanstack/ai-react from 0.19.2 to 0.21.1 — sushindustries/sushindustries0 reactions · 1 comment
- Aug 15, 2026build(deps-dev): bump the npm-dependencies group across 1 directory with 7 updates — sbonnick/openai-oauth-ai-provider0 reactions
- Aug 10, 2026chore(deps): bump the tanstack group across 1 directory with 17 updates — RLukas2/portfolio0 reactions · 1 comment
- Aug 4, 2026chore(deps): bump @tanstack/ai-react from 0.16.4 to 0.18.1 — raynilkumar-bs/Agent-V20 reactions · 2 comments
- Jul 8, 2026build(deps): Bump the tanstack group with 4 updates — fly-apps/tanstack-sprite-agent0 reactions
- Jun 12, 2026Bump the all-deps group across 1 directory with 27 updates — pantha-dapp/CORE0 reactions
- May 22, 2026Bump the all-deps group across 1 directory with 5 updates — pantha-dapp/CORE0 reactions
On Bluesky · 2
- Dec 5, 2025github.com/TanStack/ai I’m curious — @jp-knj.bsky.social2 likes and reposts
- Mar 19, 2026https://github.com/TanStack/ai — @tom-doerr.bsky.social1 likes and repost
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/instructions/copilot-instructions.mdCopilot instructions
- add-example-tutorialSkill
- bugfix-prSkill
- docsSkill
- gap-analysisSkill
- i-have-adhdSkill
- new-react-playgroundSkill
- ponytailSkill
- pr-descriptionSkill
- pr-sweepSkill
- simple-englishSkill
- triage-githubSkill
- bugfix-prSkill
- docsSkill
- gap-analysisSkill
- i-have-adhdSkill
- new-react-playgroundSkill
- ponytailSkill
- pr-descriptionSkill
- pr-sweepSkill
- simple-englishSkill
- triage-githubSkill
- tanstack-ai-migrationSkill
- tanstack-aiSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Start from the Nx React app generator.
- Distinctive: line 30
Do not commit the unused generator extras (every adapter, PKCE, model picker, thinking UI) unless this tutorial teaches them.
- Distinctive: line 40
Add other files only when this tutorial needs them (a key form, a tool, a store).
- Very specific: line 50
Create a Start app (npx @tanstack/cli@latest create) and install with package-manager tabs.
- Distinctive: line 55
Put the sandbox comment and the GitHub link on the page (see End state).
- Distinctive: line 63
Do not mention Nx, generators, or PRs in the tutorial.
- Distinctive: line 80
Do not add tests under the example app.
- Very specific: line 81
Do not commit docs/superpowers/, plans, screenshots, or .agent/.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Example Tutorial
Start from the Nx React app generator. Land at examples/react/<slug>/. Then slim the generated lab to the one scenario this tutorial teaches. examples/react/basic-chat and docs/tutorials/basic-chat.md show a finished public example. Do not copy that app. Use the generator as the starting tree.
Load docs, simple-english, and i-have-adhd before writing tutorial pages. Load pr-description before gh pr create and after an agent push on an open PR.
End state
- App at
examples/react/<slug>/(notexamples/<slug>/, notexamples/ts-*). pnpm-workspace.yamlincludesexamples/react/*.- Tutorial at
docs/tutorials/<slug>.mdon"tab": "tutorial". - Examples tab child
framework/react/examples/<slug>indocs/config.json. - Overview / Quick Start (and any recipe) point at the tutorial.
- GitHub link at the bottom:
https://github.com/TanStack/ai/tree/main/examples/react/<slug>. - Live sandbox comment on the tutorial page.
- One PR on this repo.
1. Shape the app
- Pick a kebab-case
slug. - From the repo root:
pnpm nx g @tanstack/workspace-plugin:react-app <slug>. The files land atexamples/react/<slug>/. - Slim the generated lab to this tutorial. One adapter. Keep
workspace:*for@tanstack/ai*deps. Do not add@tanstack/ai-client(framework packages re-export the client and/byok). - Inline the model id. Read the adapter's current chat model list and pass the latest flagship id as a string literal into the adapter factory. Do not add a model const, a
chat-model.ts, ahandle-chat-post.ts, or any other one-off helper for the model or the POST body. The route file ownschat().
Do not commit the unused generator extras (every adapter, PKCE, model picker, thinking UI) unless this tutorial teaches them.
2. File layout
Match Basic Chat only for the Start routes folder:
src/routes/index.tsxis the page.src/routes/api.chat.tsis the server route (next toindex.tsx). Start mapsapi.chat.tsto/api/chat.tsconfig.jsonis self-contained (Start-style). Do not extend the repo root.
Add other files only when this tutorial needs them (a key form, a tool, a store). Many examples will not use BYOK. Do not add BYOK files by default.
3. Tutorial page
Load docs. Run its persona and tone gates unless this conversation already chose them.
Open with the problem the reader has, why it matters, and how this tutorial solves it (one short block). Then walk through steps. Each step teaches one piece of that solution and says why that piece exists.
Typical shape (adapt to the scenario; do not force BYOK):
- Create a Start app (
npx @tanstack/cli@latest create) and install with package-manager tabs. React-only line, no@tanstack/ai-client:react: @tanstack/ai @tanstack/ai-react @tanstack/ai-<adapter>. - Client vs server: what each side is for in this scenario.
- Client pieces, one step each, each with why.
- Server pieces, one step each, each with why. Put the route at
src/routes/api.chat.tsand say that.
Put the sandbox comment and the GitHub link on the page (see End state). Do not add a numbered "try it" step that only repeats those.
Sandbox comment:
<!-- ::client-example library=ai framework=react slug=<slug> -->Do not mention Nx, generators, or PRs in the tutorial. Code on the page must match the example files.
Install tabs: <!-- ::start:tabs variant="package-manager" mode="install" -->. See the docs skill.
4. Nav and pointers
docs/config.json:
- Tutorials section
"tab": "tutorial", childtutorials/<slug>. - Examples section
"tab": "examples", childframework/react/examples/<slug>.
Point Overview and Quick Start at the tutorial. Cross-link any recipe that covers the same UI.
examples/README.md: list the new example.
PRs
- Do not add tests under the example app.
- Do not commit
docs/superpowers/, plans, screenshots, or.agent/. - Example-only / docs: no changeset unless a published package changed.
- Conventional commit. No
Co-authored-by. - Fill the PR template honestly. Do not tick
test:prif it was not run.
Common mistakes
| Mistake | Fix |
| Copy Basic Chat file-for-file | Generate, then slim to this scenario |
Generate under examples/<slug> | The generator writes examples/react/<slug>/ |
| Model const or extra handler file | Inline the latest model id in the route |
| BYOK files on a tutorial that does not need keys | Skip them |
| Tutorial is only commands and code | Problem, why, how, then each step as one piece |
| Skip nav or the sandbox comment | Add the Examples tab child and the ::client-example comment |
tsconfig.json extends ../../../tsconfig.json | Keep a self-contained Start-style tsconfig in the example |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

