feat: add TanStack Intent skills and fix publishing#7161
Conversation
- Fix @tanstack/react-router to publish skills (add skills to files array, @tanstack/intent devDep, bin entry) - Add tanstack-intent keyword to all 11 skill-bearing packages for npm discoverability - Create standalone route-masking skill (extracted from not-found-and-errors) - Add TanStack Query composition skills for solid-router and vue-router - Update _artifacts/skill_tree.yaml with all Start, framework, plugin, and new skills Made-with: Cursor
📝 WalkthroughWalkthroughThis PR adds TanStack Intent support metadata and skill documentation across 11 packages. It introduces npm discoverability improvements via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 359b89e ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
_artifacts/skill_tree.yaml (2)
425-509: Wirestart-server-coreinto the server-side Start skills.
start-server-coreis added here as a standalone core, but none of the server-oriented Start skills depend on it. That leaves the new node disconnected from the graph and can surfaceserver-functions,middleware,server-routes, ordeploymentwithout the server runtime prerequisite.Suggested diff
- name: 'Server Functions' slug: 'start-core/server-functions' @@ requires: - 'start-core' + - 'start-server-core' @@ - name: 'Start Middleware' slug: 'start-core/middleware' @@ requires: - 'start-core' + - 'start-server-core' - 'start-core/server-functions' @@ - name: 'Server Routes' slug: 'start-core/server-routes' @@ requires: - 'start-core' + - 'start-server-core' @@ - name: 'Deployment' slug: 'start-core/deployment' @@ requires: - 'start-core' + - 'start-server-core'Also applies to: 511-525
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@_artifacts/skill_tree.yaml` around lines 425 - 509, The new core node start-server-core was added but not wired into server-related skills; update the requires arrays for the server-focused sub-skills (references: 'start-core/server-functions', 'start-core/middleware', 'start-core/server-routes', 'start-core/deployment' and any other server-oriented entries around the same section) to include 'start-server-core' so those nodes depend on the server runtime; ensure you add 'start-server-core' to each requires list consistently (and mirror the same change for the repeated block noted in the comment).
528-594: Add the framework-router prerequisites to the Start framework nodes.These entries are framework-specific wrappers on top of the corresponding router bindings, but their
requiresonly includestart-core. Adding the matching router skill keeps the learning graph ordered correctly and avoids presentingreact-start/solid-start/vue-startas standalone fromreact-router/solid-router/vue-router.Suggested diff
- name: 'React Start' slug: 'react-start' @@ requires: - 'start-core' + - 'react-router' @@ - name: 'Solid Start' slug: 'solid-start' @@ requires: - 'start-core' + - 'solid-router' @@ - name: 'Vue Start' slug: 'vue-start' @@ requires: - 'start-core' + - 'vue-router'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@_artifacts/skill_tree.yaml` around lines 528 - 594, Update the framework skill nodes so their requires include the matching router skill: for the 'React Start' node (slug 'react-start') add 'react-router' to the requires array; for 'Solid Start' (slug 'solid-start') add 'solid-router'; and for 'Vue Start' (slug 'vue-start') add 'vue-router' so each framework wrapper depends on its corresponding router skill in addition to 'start-core'.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/react-router/package.json`:
- Line 109: The package.json change adds a new devDependency "@tanstack/intent"
but the pnpm lockfile wasn’t updated, causing CI failure; run pnpm install (or
pnpm install --lockfile-only) to regenerate pnpm-lock.yaml so it includes the
new specifier, verify the lockfile is updated, and commit the updated
pnpm-lock.yaml alongside the package.json change before pushing.
In `@packages/solid-router/skills/compositions/router-query/SKILL.md`:
- Around line 26-28: The MD028 markdown lint error is caused by an empty blank
line inside the blockquote around the CRITICAL notes; remove the blank line so
the two CRITICAL lines are contiguous in the same blockquote. Edit the SKILL.md
block that mentions defaultPreloadStaleTime and the SSR QueryClient guidance
(references: defaultPreloadStaleTime, createRouter, QueryClient, TanStack Query,
Router) and ensure there are no blank lines between the blockquote lines so the
blockquote is properly formatted.
In `@packages/vue-router/skills/compositions/router-query/SKILL.md`:
- Around line 26-28: Remove the extra blank line inside the blockquote in
SKILL.md so the two CRITICAL notes become contiguous blockquote lines;
specifically, merge the two lines containing "**CRITICAL**: Set
`defaultPreloadStaleTime: 0`..." and "**CRITICAL**: For SSR, create
`QueryClient`..." by deleting the empty line between them so markdownlint MD028
no longer flags the blockquote formatting.
---
Nitpick comments:
In `@_artifacts/skill_tree.yaml`:
- Around line 425-509: The new core node start-server-core was added but not
wired into server-related skills; update the requires arrays for the
server-focused sub-skills (references: 'start-core/server-functions',
'start-core/middleware', 'start-core/server-routes', 'start-core/deployment' and
any other server-oriented entries around the same section) to include
'start-server-core' so those nodes depend on the server runtime; ensure you add
'start-server-core' to each requires list consistently (and mirror the same
change for the repeated block noted in the comment).
- Around line 528-594: Update the framework skill nodes so their requires
include the matching router skill: for the 'React Start' node (slug
'react-start') add 'react-router' to the requires array; for 'Solid Start' (slug
'solid-start') add 'solid-router'; and for 'Vue Start' (slug 'vue-start') add
'vue-router' so each framework wrapper depends on its corresponding router skill
in addition to 'start-core'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9a110b09-27a1-411e-9f5c-fbca860db843
📒 Files selected for processing (20)
.changeset/intent-skills-audit.md_artifacts/skill_tree.yamlpackages/react-router/package.jsonpackages/react-start/package.jsonpackages/router-core/package.jsonpackages/router-core/skills/router-core/SKILL.mdpackages/router-core/skills/router-core/not-found-and-errors/SKILL.mdpackages/router-core/skills/router-core/route-masking/SKILL.mdpackages/router-plugin/package.jsonpackages/solid-router/package.jsonpackages/solid-router/skills/compositions/router-query/SKILL.mdpackages/solid-router/skills/solid-router/SKILL.mdpackages/solid-start/package.jsonpackages/start-client-core/package.jsonpackages/start-server-core/package.jsonpackages/virtual-file-routes/package.jsonpackages/vue-router/package.jsonpackages/vue-router/skills/compositions/router-query/SKILL.mdpackages/vue-router/skills/vue-router/SKILL.mdpackages/vue-start/package.json
| "isbot": "^5.1.22" | ||
| }, | ||
| "devDependencies": { | ||
| "@tanstack/intent": "^0.0.14", |
There was a problem hiding this comment.
CI blocker: lockfile is out of sync with new devDependency.
Line 109 adds @tanstack/intent, but pipeline logs show pnpm install --frozen-lockfile fails because pnpm-lock.yaml was not updated. Please regenerate and commit the lockfile with this specifier.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/react-router/package.json` at line 109, The package.json change adds
a new devDependency "@tanstack/intent" but the pnpm lockfile wasn’t updated,
causing CI failure; run pnpm install (or pnpm install --lockfile-only) to
regenerate pnpm-lock.yaml so it includes the new specifier, verify the lockfile
is updated, and commit the updated pnpm-lock.yaml alongside the package.json
change before pushing.
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | ||
|
|
||
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. |
There was a problem hiding this comment.
Fix markdownlint MD028 blockquote formatting.
Line 27 introduces a blank line between blockquote lines, which triggers no-blanks-blockquote.
Suggested fix
> **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness.
-
> **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | |
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. | |
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | |
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 27-27: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/solid-router/skills/compositions/router-query/SKILL.md` around lines
26 - 28, The MD028 markdown lint error is caused by an empty blank line inside
the blockquote around the CRITICAL notes; remove the blank line so the two
CRITICAL lines are contiguous in the same blockquote. Edit the SKILL.md block
that mentions defaultPreloadStaleTime and the SSR QueryClient guidance
(references: defaultPreloadStaleTime, createRouter, QueryClient, TanStack Query,
Router) and ensure there are no blank lines between the blockquote lines so the
blockquote is properly formatted.
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | ||
|
|
||
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. |
There was a problem hiding this comment.
Fix markdownlint MD028 blockquote formatting.
Line 27 has a blank line between blockquoted CRITICAL notes, which causes the linter warning.
Suggested fix
> **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness.
-
> **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | |
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. | |
| > **CRITICAL**: Set `defaultPreloadStaleTime: 0` when using TanStack Query. Without this, Router's built-in preload cache (30s default) prevents Query from controlling data freshness. | |
| > **CRITICAL**: For SSR, create `QueryClient` inside the `createRouter` factory function. A module-level singleton leaks data between server requests. |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 27-27: Blank line inside blockquote
(MD028, no-blanks-blockquote)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/vue-router/skills/compositions/router-query/SKILL.md` around lines
26 - 28, Remove the extra blank line inside the blockquote in SKILL.md so the
two CRITICAL notes become contiguous blockquote lines; specifically, merge the
two lines containing "**CRITICAL**: Set `defaultPreloadStaleTime: 0`..." and
"**CRITICAL**: For SSR, create `QueryClient`..." by deleting the empty line
between them so markdownlint MD028 no longer flags the blockquote formatting.
Summary
@tanstack/react-routerskill publishing: The package hadskills/on disk andbin/intent.jsbut was missing"skills"in thefilesarray,@tanstack/intentas a devDependency, and thebinentry inpackage.json. The 3 react-router skills (Query composition, React Router migration guide) were silently not being published to npm.tanstack-intentkeyword to all 11 skill-bearing packages for npm-based skill discovery (matching the pattern used by@tanstack/ai).route-maskingskill: Extracted from thenot-found-and-errorsskill into its own SKILL.md underrouter-core/skills/router-core/route-masking/, coveringmaskon Link/navigate,createRouteMask,unmaskOnReload, and sharing behavior.@tanstack/solid-routerand@tanstack/vue-router(adapted from the existing@tanstack/react-routercomposition skill with framework-appropriate APIs)._artifacts/skill_tree.yaml: Expanded from 13 entries (router-core + react-router only) to 31+ entries covering all Start, framework, plugin, and new skills.Test plan
npm packfor@tanstack/react-routerincludes theskills/directorytanstack-intentkeyword appears in all 11 package.json files_artifacts/skill_tree.yamlparses as valid YAMLMade with Cursor
Summary by CodeRabbit
New Features
Documentation