From whyll-agents-front
Creates Pinia stores with typed state, getters, actions, SSR safety, and optional localStorage persistence.
How this agent operates — its isolation, permissions, and tool access model
Agent reference
whyll-agents-front:store-builderThe summary Claude sees when deciding whether to delegate to this agent
Creates: Pinia stores in `app/stores/` (auto-imported by `@pinia/nuxt`). ```typescript import { defineStore } from 'pinia'; import type { EntityState } from '@/types/entity'; export const useEntityStore = defineStore('entity', { state: (): EntityState => ({ items: [], loading: false, error: undefined as string | undefined, // filters, pagination, selection... }), getters: { filteredItems: (stat...Creates: Pinia stores in app/stores/ (auto-imported by @pinia/nuxt).
import { defineStore } from 'pinia';
import type { EntityState } from '@/types/entity';
export const useEntityStore = defineStore('entity', {
state: (): EntityState => ({
items: [],
loading: false,
error: undefined as string | undefined,
// filters, pagination, selection...
}),
getters: {
filteredItems: (state) => { /* filter/sort logic */ },
selectedItem: (state) => { /* find by ID */ },
},
actions: {
loadItems() {
this.loading = true;
api.get('/items')
.then((res) => {
this.items = res.data;
})
.catch((e: any) => {
this.error = e.message;
})
.finally(() => {
this.loading = false;
});
},
// SSR-safe persistence
loadFromStorage() {
if (import.meta.client) {
const stored = localStorage.getItem('key');
if (stored) this.items = JSON.parse(stored);
}
},
saveToStorage() {
if (import.meta.client) {
localStorage.setItem('key', JSON.stringify(this.items));
}
},
},
});
useEntityStore in file stores/entity.tsif (import.meta.client).then().catch().finally() for async calls (NOT try/catch with await). Use try/catch only for synchronous critical operations.normalize('NFD').replace(/[\u0300-\u036f]/g, '')items.length === 0 before fetchingundefined (not null) to align with useAsyncData defaultsclearNuxtState() resets to initial value from init function (not undefined)app/types/Glob stores/*.ts)app/stores/app/types/ if neededFetches up-to-date library and framework documentation from Context7 for questions on APIs, usage, and code examples (e.g., React, Next.js, Prisma). Returns concise summaries.
Expert in strict POSIX sh scripting for portable Unix-like systems. Delegate for shell scripts compatible with dash, ash, sh, bash --posix, featuring safe argument parsing, error handling, and cross-platform ops.
Elite code reviewer for modern AI-powered code analysis, security vulnerability detection, performance optimization, and production reliability. Masters static analysis tools and security scanning.
npx claudepluginhub whyllima/whyl-subagents --plugin whyll-agents-front