Add Example Tutorial logo

Add Example Tutorial

OrganizationPopular
TanStack
add-example-tutorial

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.

Overview

PublisherTanStack
Repositoryai
Skill nameadd-example-tutorial
Stars
3.2K
Forks
361
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by TanStack on GitHub. Read the source before you install it.

Installation

Install the Add Example Tutorial AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/TanStack/ai/tree/main/.agents/skills/add-example-tutorial
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TanStack/ai.git /tmp/ai
mkdir -p .claude/skills
cp -r /tmp/ai/.agents/skills/add-example-tutorial .claude/skills/add-example-tutorial
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Add Example Tutorial in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Add Example Tutorial on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Add Example Tutorial is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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>/ (not examples/<slug>/, not examples/ts-*).
  • pnpm-workspace.yaml includes examples/react/*.
  • Tutorial at docs/tutorials/<slug>.md on "tab": "tutorial".
  • Examples tab child framework/react/examples/<slug> in docs/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

  1. Pick a kebab-case slug.
  2. From the repo root: pnpm nx g @tanstack/workspace-plugin:react-app <slug>. The files land at examples/react/<slug>/.
  3. 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).
  4. 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, a handle-chat-post.ts, or any other one-off helper for the model or the POST body. The route file owns chat().

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.tsx is the page.
  • src/routes/api.chat.ts is the server route (next to index.tsx). Start maps api.chat.ts to /api/chat.
  • tsconfig.json is 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):

  1. 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>.
  2. Client vs server: what each side is for in this scenario.
  3. Client pieces, one step each, each with why.
  4. Server pieces, one step each, each with why. Put the route at src/routes/api.chat.ts and 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:

html
<!-- ::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", child tutorials/<slug>.
  • Examples section "tab": "examples", child framework/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:pr if it was not run.

Common mistakes

MistakeFix
Copy Basic Chat file-for-fileGenerate, then slim to this scenario
Generate under examples/<slug>The generator writes examples/react/<slug>/
Model const or extra handler fileInline the latest model id in the route
BYOK files on a tutorial that does not need keysSkip them
Tutorial is only commands and codeProblem, why, how, then each step as one piece
Skip nav or the sandbox commentAdd the Examples tab child and the ::client-example comment
tsconfig.json extends ../../../tsconfig.jsonKeep a self-contained Start-style tsconfig in the example

Frequently asked questions

What does the Add Example Tutorial AI skill do?

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.

Why use Add Example Tutorial on TypingMind?

Because you install it once and use it with any model. Add Example Tutorial is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Add Example Tutorial in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TanStack/ai/tree/main/.agents/skills/add-example-tutorial. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Add Example Tutorial?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Add Example Tutorial?

As many as you like. As long as a model supports skills, you can use Add Example Tutorial with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Add Example Tutorial AI skill free?

Yes. It is published on GitHub by TanStack under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇