agentleFS
KIMJINWOO4KIMJINWOO4/vue-skills/skills/vue-data/SKILL.md

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.

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
  1. Very specific:

    Server state ≠ client state: Do not put API data in hand-rolled Pinia stores with loading/error flags — use a query layer (Pinia Colada) …

    line 12

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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/useAsyncData first (see nuxt skill).

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

SituationUse
Vue SPA fetching REST/GraphQLPinia Colada (useQuery / useMutation)
Data must be ready before route rendersData Loaders (defineColadaLoader / defineBasicLoader)
Nuxt appuseFetch / 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 startupcomposable + module-level cache is acceptable

Reference Map

TopicDescriptionPath
Pinia ColadauseQuery, useMutation, keys, invalidation, optimistic updates, SSRpinia-colada
Data LoadersRoute-bound loading with Vue Router 5 experimental loadersdata-loaders
Patterns & PitfallsRace conditions, AbortSignal, error handling, layering rulespatterns

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.