directus/rstore/rstore-nuxt
Claude Code and agent skill by directus/rstore
- community
Checking that the SKILL.md file is still in the repository.
Use when wiring rstore into a Nuxt app end-to-end — module setup, auto-registered collections/plugins, SSR cache hydration, generated template/auto-import issues, and cross-module extension; also use before adding a custom `server/api` route, Nitro handler, or ad hoc `useFetch`/`$fetch` composable for collection data in an rstore-powered Nuxt app — prefer rstore collection APIs (`find*`, `query`, `liveQuery`) and plugin hooks over hand-rolled endpoints or fetch refs; pair with the `rstore-vue` skill for collection/query/form behavior.
Install
npx vskill@latest install directus/rstore/rstore-nuxtSKILL.md
Rstore Nuxt
Wire @rstore/vue into Nuxt through module scanning, generated templates, SSR hydration, and devtools integration. Use this skill together with the @rstore/vue skill for collection/query/form semantics.
Documentation map
| Area | Documentation | |
|---|---|---|
| Nuxt setup | https://rstore.akryum.dev/guide/getting-started#nuxt | |
| Collections and relations | https://rstore.akryum.dev/guide/schema/collection, https://rstore.akryum.dev/guide/schema/relations | |
| Query and mutation model | https://rstore.akryum.dev/guide/data/query, https://rstore.akryum.dev/guide/data/mutation | |
| Cache and live updates | https://rstore.akryum.dev/guide/data/cache, https://rstore.akryum.dev/guide/data/live | |
| Plugin extension model | https://rstore.akryum.dev/guide/plugin/setup, https://rstore.akryum.dev/guide/plugin/hooks | |
| Related package skills | rstore-vue skill (@rstore/vue) | |
| Skill-local API references | ./references/index.md |
Core concepts
| Primitive | Purpose | |
|---|---|---|
rstore.rstoreDirs | Per-layer directories scanned for collections and plugins | |
<rstoreDir>/*.ts | Collection/relations exports included in generated schema | |
<rstoreDir>/plugins/*.ts | Plugin exports included in generated plugin list | |
#build/$rstore-collection | Generated schema template from scanned collection files | |
#build/$rstore-plugins | Generated plugin exports from scanned plugin files | |
#build/$restore-options | Generated options template (experimentalGarbageCollection) | |
| Runtime plugin layer | Creates store, installs plugin, serializes/hydrates cache, injects $rstore | |
addCollectionImport / addPluginImport | Public extension hooks for other Nuxt modules |
Quick start
Expected layout:
Task workflow
- Register
@rstore/nuxtinmodules. - Keep collections and plugin files inside configured
rstoreDirs. - Ensure collection files export
defaultor namedconstvalues intended for schema assembly. - Use
useStore()and auto-imports from#importsin app code, not ad hoc store singletons. Before adding aserver/api/*.tshandler, adefineEventHandler, or auseFetch/$fetchcomposable for collection data, check whether a collection API (find*,query,liveQuery) or a plugin hook already covers it — if the data is Drizzle-backed, see therstore-nuxt-drizzleskill for the generated endpoint + hook story. - For cross-module extension, call
addCollectionImport/addPluginImportfrom module setup. - Validate generated template output when debugging scan/injection issues.
- For behavior inside collection APIs (
find*,query, forms, hooks), use therstore-vueskill.
Rely on the generated runtime
- Auto-imports include
withItemType,defineCollection,defineRstorePlugin,defineRstoreModule,useStore,RStoreSchema, plus related types. - The module generates and uses
#buildtemplates instead of requiring manual registry wiring. - The runtime plugin serializes cache state to
nuxtApp.payload.state.$srstoreon render and hydrates on client load. - In development, a devtools plugin is appended automatically by runtime code.
experimentalGarbageCollectionis passed from module options intocreateStore.
Extending from another Nuxt module
addCollectionImport(nuxt, importPath)appends import sources merged into generated schema.addPluginImport(nuxt, importPath)appends plugin imports merged into generated plugin list.- Use these APIs instead of mutating
_rstoreCollectionImports/_rstorePluginImportsdirectly. - Imported collection modules should export values that are valid store schema entries.
Guardrails
- Collection scan warns when files export neither
defaultnor namedconst. - Files in scanned collection directories should stay export-focused; extra exported helpers can be pulled into schema by
Object.values(...). - Avoid creating your own second Nuxt-side store instance; runtime plugin owns app store lifecycle.
- Debug missing data by inspecting generated
#build/$rstore-collectionand#build/$rstore-plugins. - Devtools route
/__rstoreis module-owned and served/proxied bysetupDevToolsUI; do not duplicate that wiring in app code.
References
| Topic | Description | Reference | |
|---|---|---|---|
| API index | Full map of Nuxt API/config references | api-index | |
| rstore.rstoreDirs | Collection/plugin scan directory option | api-rstore-dirs | |
| rstore.experimentalGarbageCollection | Pass-through garbage collection option | api-experimental-garbage-collection | |
| addCollectionImport | Extend generated collection imports | api-add-collection-import | |
| addPluginImport | Extend generated plugin imports | api-add-plugin-import | |
| defineRstorePlugin | Nuxt alias for definePlugin | api-define-rstore-plugin | |
| defineRstoreModule | Nuxt alias for defineModule | api-define-rstore-module | |
| RStoreSchema | Namespaced schema helper object | api-rstore-schema | |
| useStore (#imports) | Nuxt runtime store accessor | api-use-store | |
| SSR cache hydration ($srstore) | Payload cache serialization/hydration | api-cache-hydration | |
| Devtools route (/__rstore) | Custom devtools UI route wiring | api-devtools-route | |
| Base @rstore/vue skill | Underlying collection/query/form semantics | rstore-vue skill |
Further reading
- Getting started (Nuxt): https://rstore.akryum.dev/guide/getting-started#nuxt
- Query docs: https://rstore.akryum.dev/guide/data/query
- Cache docs: https://rstore.akryum.dev/guide/data/cache
- Plugin hook docs: https://rstore.akryum.dev/guide/plugin/hooks
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/nuxt/skills/rstore-nuxt/SKILL.md
Popularity
- Repository stars
- 413
- Repository forks
- 17
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/directus/rstore/rstore-nuxt)