pinia
antfu/skills · Agent Skill
Pinia durum yönetimi için en iyi uygulamalar, tip güvenli Vue mağazaları, getters ve eylemler için.
Kuruluma geç ↓Genel bakış
| Yayıncı | |
|---|---|
| Depo | antfu/skills ↗ |
| Skill klasörü | pinia |
| Yıldız | 6.011 |
| Fork | 338 |
| Dosyalar | 11 |
| Lisans | MIT |
| Son güncelleme | 23 Ekim 2026 |
| Bağlantılar | Skill kaynağı ↗ · Depo ↗ |
Mozgi kontrolü
Skill dosyalarında bulduklarımız. Ayrıntılar abonelikle.
Kurulum
Skill, SKILL.md dosyası içeren bir klasördür. Ajanınızı seçin ve komutları proje kökünde bir terminalde çalıştırın (macOS, Linux veya Windows'ta Git Bash).
Promptu Claude, Codex veya başka bir asistana yapıştırın: skill'i inceleyip sizin için kuracaktır.
Install the “pinia” skill from mozgi.io (https://mozgi.io/skills/antfu-pinia/) for me. 1. Download the archive: https://mozgi.io/skills/antfu-pinia/download If it fails, take the skill folder from the source: https://github.com/antfu/skills/tree/main/skills/pinia 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “pinia” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/pinia/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .claude/skills cp -r /tmp/skills/skills/pinia .claude/skills/pinia
Claude Code'u yeniden başlatın — skill listede görünür; elle çağırmak için /pinia. Tüm projeler için ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .agents/skills cp -r /tmp/skills/skills/pinia .agents/skills/pinia
Codex skill'leri geçerli klasörden depo köküne kadar .agents/skills içinde arar; /skills veya $pinia ile çağırın. Tüm projeler için ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .cursor/skills cp -r /tmp/skills/skills/pinia .cursor/skills/pinia
Cursor skill'i açılışta yükler; Agent sohbetinde “/” ile çağırın. Cursor .claude/skills ve .agents/skills klasörlerini de okur. Tüm projeler için ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .gemini/skills cp -r /tmp/skills/skills/pinia .gemini/skills/pinia
Gemini CLI, görev uyduğunda skill'i etkinleştirmeyi önerir — siz onaylarsınız. Tüm projeler için ~/.gemini/skills.
Kurulumdan önce SKILL.md ve eşlik eden dosyaları inceleyin. Önizleme için dosyaya tıklayın.
SKILL.md içeriği
Yazarın orijinal metni · salt okunurPinia
Pinia is the official state management library for Vue, designed to be intuitive and type-safe. It supports both Options API and Composition API styles, with first-class TypeScript support and devtools integration.
> The skill is based on Pinia v4.0.3, generated at 2026-09-25.
Core References
| Topic | Description | Reference |
|-------|-------------|-----------|
| Stores | Defining stores, state, getters, actions, storeToRefs, subscriptions | core-stores ↗ |
Features
Extensibility
| Topic | Description | Reference |
|-------|-------------|-----------|
| Plugins | Extend stores with custom properties, state, and behavior | features-plugins ↗ |
Composability
| Topic | Description | Reference |
|-------|-------------|-----------|
| Composables | Using Vue composables within stores (VueUse, etc.) | features-composables ↗ |
| Composing Stores | Store-to-store communication, avoiding circular dependencies | features-composing-stores ↗ |
Best Practices
| Topic | Description | Reference |
|-------|-------------|-----------|
| Testing | Unit testing with @pinia/testing, mocking, stubbing | best-practices-testing ↗ |
| Outside Components | Using stores in navigation guards, plugins, middlewares | best-practices-outside-component ↗ |
Advanced
| Topic | Description | Reference |
|-------|-------------|-----------|
| SSR | Server-side rendering, state hydration | advanced-ssr ↗ |
| Nuxt | Nuxt integration, auto-imports, SSR best practices | advanced-nuxt ↗ |
| HMR | Hot module replacement for development | advanced-hmr ↗ |
Key Recommendations
- Prefer Setup Stores for complex logic, composables, and watchers
- Use
storeToRefs()when destructuring state/getters to preserve reactivity - Actions can be destructured directly - they're bound to the store
- Call stores inside functions not at module scope, especially for SSR
- Add HMR support to each store for better development experience
- Use
@pinia/testingfor component tests with mocked stores
Sık sorulan sorular
pinia skill'i ne yapar?
Pinia durum yönetimi için en iyi uygulamalar, tip güvenli Vue mağazaları, getters ve eylemler için.
pinia nasıl kurulur?
Bu sayfadaki “Kurulum” bölümünü açın ve ajanınızı seçin — Claude Code, Codex, Cursor veya Gemini CLI: skill klasörünü doğru yere kopyalayan hazır komutlar orada. Ya da “Asistanla” sekmesindeki promptu kopyalayın; asistan skill'i inceleyip kuracaktır.
pinia hangi yapay zekâlarla çalışır?
Skill'ler düz Markdown talimatlarıdır (Agent Skills formatı), bu yüzden pinia SKILL.md okuyan her ajanla çalışır: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode ve diğerleri. Model talimatları yalnızca görev skill açıklamasına uyduğunda yükler.
pinia ücretsiz mi?
Skill, antfu tarafından açık olarak yayımlandı (MIT lisansı). Skill'in kendisi ücretsizdir — yalnızca kullandığınız token'lar için yapay zekâ sağlayıcınıza ödeme yaparsınız.
Skill kurmak güvenli mi?
Skill, ajanınızın izleyeceği talimatlardır; kurmadan önce SKILL.md ve eşlik eden dosyaları okuyun. Skill klasöründeki betikler yalnızca ajanınız çalıştırırsa çalışır — ne yaptığını izleyin ve gereksiz izin vermeyin.
Skill, MCP sunucusu veya eklentiden nasıl farklıdır?
MCP sunucusu veya eklenti modele yeni araçlar verir — çalışıp sonuç döndüren kod. Skill ise bilgi ve süreç verir: göreve nasıl yaklaşılacağı, hangi adımların izleneceği ve iyi sonucun neye benzediği. Sunucu veya API anahtarı gerekmez.