skills/builderx_spa-api/SKILL.md
Standardized API fetching for BuilderX SPA using useApiget, useApipost, useApiDelete, and useApiProgress from @/composable/fetch. Covers GET/POST requests, file uploads, and progress tracking. Use this skill when making network requests in the builderx_spa project.
npx skillsauth add vuluu2k/skills builderx_spa-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Always use the built-in HTTP composables instead of using
axiosdirectly.
| Topic | Description | Reference |
|-------|-------------|-----------|
| Fetching Data | useApiget, useApipost, useApiDelete, useApiProgress | fetch |
| Class-based API | BaseApi class, extending REST controllers in @/api | base-api |
Used when interacting with standard REST resources. Classes exist inside src/api/ (Core API) and src/api/landing/ (Landing Page API).
import productApi from '@/api/productApi'
import landingPageApi from '@/api/landing/pageApi'
// List resources (calls base implementation)
const res = await productApi.list({ site_id: 123, limit: 10 })
const landingRes = await landingPageApi.list({ limit: 10 })
// Call custom endpoints defined in the child class
const customRes = await productApi.getProductsBuild({ search: 'shirt' })
import { useApiget, useApipost } from '@/composable/fetch'
export default {
methods: {
async fetchUsers() {
const url = `${import.meta.env.VITE_BUILDERX_API_URL}/api/v1/users`
// Returns a resolved axios response. Data is usually inside res.data.data
const res = await useApiget(url, { page: 1 })
console.log(res.data.data)
},
async saveProfile(payload) {
const url = `${import.meta.env.VITE_BUILDERX_API_URL}/api/v1/update_account`
// Signature: url, params (query string), body
await useApipost(url, null, payload)
}
}
}
const formData = new FormData()
formData.append('file', fileObject)
// Provide headers as the 4th argument
await useApipost(url, null, formData, { 'Content-Type': 'multipart/form-data' })
development
Vue 3 Composition API — <script setup>, reactivity (shallowRef/ref), props without destructure, computed, watch, provide/inject, and composables. Use when the project uses modern Vue 3 Composition API style.
development
Vue 3 Options API — data, props, computed, methods, watch, emits, provide/inject, lifecycle hooks, and mixins. Use when the project uses Options API style (Vue 2 legacy or explicit Vue 3 Options API preference).
tools
Best practices for mixing Ant Design Vue components with Tailwind CSS utility classes. Use this skill to keep styling consistent without custom CSS files.
development
Pinia state management for Vue 3 using Composition API (Setup Stores) — TypeScript-first, storeToRefs for reactivity, focused stores, and API calls in composables. Use when the project uses Vue 3 Composition API / <script setup>.