directus/rstore/rstore-directus
Claude Code and agent skill by directus/rstore
- community
Checking that the SKILL.md file is still in the repository.
Use when integrating rstore with Directus runtime/schema helpers, generated Directus collections, Directus REST query options, cache-side Directus filtering, singleton handling, primary key stripping, and Directus-backed create/update/delete behavior; also use before writing custom Directus fetch or mutation code around rstore collections. Pair with rstore-vue for collection/query/form semantics and with framework-specific Directus skills for Vite or Nuxt wiring.
Install
npx vskill@latest install directus/rstore/rstore-directusSKILL.md
Rstore Directus
Use @rstore/directus as the shared Directus adapter layer for generated rstore collections and runtime CRUD behavior.
Core APIs
| Area | API | |
|---|---|---|
| Runtime client | createDirectusClient({ url }) | |
| Runtime plugin | createDirectusRstorePlugin({ url?, client?, scopeId? }) | |
| Query mapping | createDirectusQuery(findOptions, overrides?) | |
| Mutation payloads | stripPrimaryKeys(item, primaryKeys) | |
| Cache filtering | evaluateDirectusFilter, applyDirectusQuery | |
| Collection metadata | DEFAULT_DIRECTUS_SCOPE_ID, isDirectusSingleton, getDirectusPrimaryKeys | |
| Schema loading | loadDirectusCollections({ url, adminToken, scopeId? }) | |
| Schema building | buildDirectusCollections({ collections, fields, relations, scopeId }) | |
| Code generation | generateCollectionsTemplate, generateItemsTemplate, generateTypedCollectionsTemplate, generateConfigTemplate, generateViteDeclarations |
Workflow
- Load Directus metadata at build time with
loadDirectusCollections. - Generate rstore collections from Directus collections, fields, and relations.
- Create a Directus runtime client with
createDirectusClient. - Register
createDirectusRstorePluginin the store plugins list. - Query and mutate through rstore collection APIs instead of direct component-level Directus SDK calls.
Query Behavior
- Pass Directus global query parameters in rstore find options:
filter,fields,search,sort,limit,offset,page,deep,alias,backlink,version, andversionRaw. pageIndexandpageSizemap to Directusoffsetandlimitwhen explicit Directus pagination is not provided.createDirectusQuerymerges adapterparams, top-level find options, and optional overrides.- Supported Directus filters, sort, and pagination can be evaluated against cache data through
applyDirectusQuery. - Unsupported cache-side query shapes fall through to Directus fetches instead of returning possibly wrong cached results.
Generated Collections
- Directus system collections and collections without schema are skipped during metadata loading.
- Generated collection names mirror Directus collection names.
- Generated metadata stores Directus collection name, singleton state, and primary keys.
- Many-to-one foreign key fields stay scalar in the cache.
- Alias-side relations are generated only when Directus exposes a non-colliding alias field.
- Directus singleton collections use singleton read/update APIs and one stable local key.
Mutation Behavior
createDirectusRstorePluginhandles create, createMany, update, updateMany, delete, and deleteMany hooks for Directus-scoped collections.- Primary key fields are stripped from update payloads before Directus mutation calls.
- Singleton collections use singleton update behavior and do not support normal delete paths.
Guardrails
- Keep
adminTokenbuild/server-side. It is for introspection only and must not be emitted into runtime client code. - Do not hand-write parallel Directus CRUD paths for generated collections unless the route is intentionally outside rstore.
- Prefer plugin hooks and collection APIs over ad hoc Directus SDK calls in components.
- Use
rstore-vuefor query, live query, form, and cache semantics. - Use
rstore-vite-directusor Nuxt integration docs for framework wiring.
Security
- Security scanPassed, 91 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/directus/skills/rstore-directus/SKILL.md
Popularity
- Repository stars
- 433
- Repository forks
- 20
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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-directus)