skills/builderx_spa-permission/SKILL.md
Rule-based permission checking in BuilderX SPA using bitwise operations from @/composable/employeePermission. Use this skill when hiding/showing UI or checking user access.
npx skillsauth add vuluu2k/skills builderx_spa-permissionInstall 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
hasPermissionandhasPermissionsto check user roles logically against the bitwise structure.
| Topic | Description | Reference | |-------|-------------|-----------| | Checking Access | How to pass the permission bit and the specific permission string | has-permission |
import { hasPermission } from '@/composable/employeePermission'
import { useSiteStore } from '@/stores/site'
export default {
computed: {
canEditProduct() {
const siteStore = useSiteStore()
const permissionsBit = siteStore.site?.site_permission?.permissions
if (!permissionsBit) return false
// Checking a specific string action
return hasPermission(permissionsBit, 'update_product')
}
}
}
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>.