docs: add Agent Skills (TanStack Intent) getting started page #200
MergedKevinVandymerged 1 commit into
main fromrefs/pull/200/headmerged by KevinVandy - @@ -0,0 +1 @@1+---@@ -0,0 +79,21 @@79+80+Run `npx @tanstack/intent@latest list` from the workspace root to see available local skills.81+If a listed skill matches the task, run `npx @tanstack/intent@latest load <package>#<skill>` before changing files.82+Use the loaded `SKILL.md` guidance while making the change.83+Monorepos: when working across packages, run the skill check from the workspace root and prefer the local skill for the package being changed.84+Multiple matches: prefer the most specific local skill for the package or concern you are changing; load additional skills only when the task spans multiple packages or concerns.85+86+<!-- intent-skills:end -->87+```88+89+Keep the block near the top of the config file so your agent sees it before task-specific instructions.90+91+You can inspect and load Hotkeys skills yourself with the same commands:92+93+```bash94+npx @tanstack/intent@latest list95+npx @tanstack/intent@latest load @tanstack/react-hotkeys#react-hotkeys96+npx @tanstack/intent@latest load @tanstack/hotkeys#hotkeys-core97+```98+99+For dialogs that stack or nest scopes, follow the loaded entry point's link to `references/scopes.md`. The load command resolves relative Markdown links to the installed package, including when your package manager uses nested dependency paths.@@ -0,0 +95,21 @@95+npx @tanstack/intent@latest load @tanstack/react-hotkeys#react-hotkeys96+npx @tanstack/intent@latest load @tanstack/hotkeys#hotkeys-core97+```98+99+For dialogs that stack or nest scopes, follow the loaded entry point's link to `references/scopes.md`. The load command resolves relative Markdown links to the installed package, including when your package manager uses nested dependency paths.100+101+If you prefer explicit task-to-skill entries, run `npx @tanstack/intent@latest install --map`. Mapping mode scans your installed intent-enabled packages and writes compact `id`, `run`, and `for` entries into the managed block.102+103+## Step 4: Confirm It's Wired Up104+105+Open a fresh session in your coding agent and ask it to build something with TanStack Hotkeys, for example: _"Add Mod+S to save the document, and a dialog that closes with Escape, using TanStack Hotkeys."_106+107+You should see:108+109+The agent registers shortcuts with the adapter API, such as `useHotkey('Mod+S', ...)`, instead of a `keydown` listener.110+It uses `Mod` and `formatForDisplay` instead of `isMac` checks and hand-written `⌘`/`Ctrl` labels.111+It relies on the defaults for text inputs and `preventDefault` instead of reimplementing them.112+The dialog's `Escape` is registered inside an `exclusive` scope with a per-instance name, instead of a "shortcuts enabled" flag.113+Shortcuts that need a help dialog carry `meta: { name }`, or are declared as app hotkeys.114+115+If the agent still writes its own key handling, reopen its config file and confirm the `intent-skills` block is present. You can also run `intent list` to confirm that the installed Hotkeys packages are detected and `intent load` to inspect the matching guidance directly.
KevinVandy merged this218a6c1
KevinVandy closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: caa511afb579024dd80f121386651d3cb730baa5
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR