scaffold-composable

Generate Pinia-Colada query and mutation composables for Nuxt backend API resources.

9|2|Updated Nov 29, 2024
One-click install
npx skills add https://github.com/bbvch-ai/aihub-core --skill scaffold-composable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-composable
Source: https://github.com/bbvch-ai/aihub-core/tree/main/.claude/skills/scaffold-composable
Command: npx skills add https://github.com/bbvch-ai/aihub-core --skill scaffold-composable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the tedious manual effort of writing repetitive Pinia-Colada query and mutation composables for backend API resources, drastically reducing frontend development time for API integration.

Core Features & Use Cases

  • Standardized Composable Generation: Creates list queries, single-item route-dependent queries, and create/update/delete mutations aligned with project conventions.
  • Integrated SDK & Cache Handling: Automatically wires SDK calls with Nuxt $fetch, sets correct stale times, and invalidates query caches after mutations.
  • Use Case: When onboarding a new backend API resource, use this Skill to generate all required composables with correct types and patterns instead of writing each file manually.

Quick Start

Use the scaffold-composable skill to generate all required Pinia-Colada composables for the new 'pipeline' backend API resource.

Frequently Asked Questions about scaffold-composable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Pinia-Colada composables for a new API resource in Nuxt?

To generate Pinia-Colada composables for a new API resource, you can automate the creation of list queries, single-item route-dependent queries, and mutations. This eliminates manual repetitive frontend development work by automatically wiring SDK calls and setting correct stale times.

What is the best way to invalidate query cache after mutations in Pinia-Colada?

The best way to invalidate query cache after mutations is to use a scaffolding tool that automatically invalidates query caches after write operations. This ensures data consistency by refreshing list and single-item queries following create, update, or delete actions.

Does this scaffolding approach work with Nuxt $fetch and backend SDKs?

Yes, this scaffolding approach works with Nuxt $fetch and backend SDKs. It automatically wires SDK calls with Nuxt $fetch integration, ensuring correct types and standardized composable structures aligned with project conventions.

How do I structure hierarchical query keys for Pinia-Colada list and single-item queries?

To structure hierarchical query keys for Pinia-Colada queries, you can use automated scaffolding to enforce correct key hierarchies. This standardizes composable structure for both list queries and single-item route-dependent queries.

Can I scaffold create, update, and delete mutations alongside query composables?

Yes, you can scaffold create, update, and delete mutations alongside query composables. The automated generation covers list queries, single-item route-dependent queries, and full CRUD mutations to provide complete API integration coverage.