vue-data
Skill21 starsChanged 10 months agoMITView on GitHub
Server-state and data fetching for Vue 3. Pinia Colada (useQuery/useMutation, caching, invalidation, optimistic updates), Vue Router Data Loaders, choosing between fetch layers, race conditions, SSR concerns. Use when fetching API data, caching server responses, handling loading/error states, or wiring mutations in Vue apps.
In this repository11 other files it gives its agents.
- antfuSkill
- build-toolingSkill
- designSkill
- find-skillsSkill
- nuxtSkill
- vitepressSkill
- vue-a11ySkill
- vue-clean-componentsSkill
- vue-formsSkill
- vue-performanceSkill
- vueSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Server state ≠ client state: Do not put API data in hand-rolled Pinia stores with loading/error flags — use a query layer (Pinia Colada) …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Vue Data Fetching Skill
Baseline 2026-07: Pinia Colada 1.x (stable, the recommended data layer for Vue), Vue Router 5 Data Loaders (experimental), TanStack Vue Query 5 as the heavyweight alternative. Nuxt apps: use built-in
useFetch/useAsyncDatafirst (seenuxtskill).
Core Rule
Server state ≠ client state. Do not put API data in hand-rolled Pinia stores with loading/error flags — use a query layer (Pinia Colada) that owns caching, deduplication, invalidation, and request lifecycle. Keep Pinia stores for genuinely client-owned state (auth session, UI preferences, drafts).
Decision Table
| Situation | Use |
| Vue SPA fetching REST/GraphQL | Pinia Colada (useQuery / useMutation) |
| Data must be ready before route renders | Data Loaders (defineColadaLoader / defineBasicLoader) |
| Nuxt app | useFetch / useAsyncData (Nitro-aware, SSR payload) |
| Already on TanStack Query (React parity, infinite queries) | TanStack Vue Query — fine, don't churn |
| One-shot fire-and-forget call (form submit w/o cache impact) | plain $fetch/ofetch in an event handler |
| Truly static lookup fetched once at startup | composable + module-level cache is acceptable |
Reference Map
| Topic | Description | Path |
| Pinia Colada | useQuery, useMutation, keys, invalidation, optimistic updates, SSR | pinia-colada |
| Data Loaders | Route-bound loading with Vue Router 5 experimental loaders | data-loaders |
| Patterns & Pitfalls | Race conditions, AbortSignal, error handling, layering rules | patterns |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

