directus/rstore/rstore-directus

Claude Code and agent skill by directus/rstore

Trust tier 2
  • community
LLM review pending
Source check pending

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-directus

SKILL.md

Rstore Directus

Use @rstore/directus as the shared Directus adapter layer for generated rstore collections and runtime CRUD behavior.

Core APIs

AreaAPI
Runtime clientcreateDirectusClient({ url })
Runtime plugincreateDirectusRstorePlugin({ url?, client?, scopeId? })
Query mappingcreateDirectusQuery(findOptions, overrides?)
Mutation payloadsstripPrimaryKeys(item, primaryKeys)
Cache filteringevaluateDirectusFilter, applyDirectusQuery
Collection metadataDEFAULT_DIRECTUS_SCOPE_ID, isDirectusSingleton, getDirectusPrimaryKeys
Schema loadingloadDirectusCollections({ url, adminToken, scopeId? })
Schema buildingbuildDirectusCollections({ collections, fields, relations, scopeId })
Code generationgenerateCollectionsTemplate, generateItemsTemplate, generateTypedCollectionsTemplate, generateConfigTemplate, generateViteDeclarations

Workflow

  1. Load Directus metadata at build time with loadDirectusCollections.
  2. Generate rstore collections from Directus collections, fields, and relations.
  3. Create a Directus runtime client with createDirectusClient.
  4. Register createDirectusRstorePlugin in the store plugins list.
  5. 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, and versionRaw.
  • pageIndex and pageSize map to Directus offset and limit when explicit Directus pagination is not provided.
  • createDirectusQuery merges adapter params, 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

  • createDirectusRstorePlugin handles 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

  1. Keep adminToken build/server-side. It is for introspection only and must not be emitted into runtime client code.
  2. Do not hand-write parallel Directus CRUD paths for generated collections unless the route is intentionally outside rstore.
  3. Prefer plugin hooks and collection APIs over ad hoc Directus SDK calls in components.
  4. Use rstore-vue for query, live query, form, and cache semantics.
  5. Use rstore-vite-directus or 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/directus/rstore/rstore-directus/badge)](https://verified-skill.com/skills/directus/rstore/rstore-directus)

Something wrong with this skill or its page? Tell us.