Project-local Life OS backend and Server Action safety skill. Use when Codex creates, edits, or reviews Server Actions, repository calls, Supabase-backed mutations, Zod schemas, ownership checks, revalidation, user-scoped data access, or data-layer-only work under src/features/real-data/*.
Instal·la
npx skillscat add planton361/life-os/life-os-backend-action-slice Instal·la des del registre de SkillsCat.
Life OS Backend Action Slice
Use this skill for backend, data, and Server Action work. The goal is to keep
mutations inside the Life OS security and data boundary.
Sources
Read the approved GitHub Issue and the relevant sources before changing backend code:
AGENTS.mdARCHITECTURE.mdDATA_MODEL.mdSECURITY.mdACCESSIBILITY.md, if UI states are touchedAI_WORKFLOW.md- feature-specific action, schema, repository, and UI files
Required Boundary
Use the current feature-local Real-Data boundary:
src/features/real-data/actions
src/features/real-data/schemas
src/features/real-data/supabase/repositoriesDo not create a new src/server/* structure unless a separate refactor scope is
explicitly approved.
Backend Gate
Every new or changed mutation must:
- authenticate server-side.
- avoid client-provided
userIdas a Trust Boundary. - validate input with Zod
safeParse. - use a repository or RPC with user-scope.
- verify same-user Ownership for
areaId,projectId,goalId,taskId,resourceId,skillId, and polymorphic targets. - avoid Service Role.
- avoid remote DB actions,
supabase link,supabase db push, andsupabase db reset. - call relevant
revalidatePathtargets. - expose visible Success, Error, and Blocked states when UI is touched.
- avoid leaking secrets through errors, logs, or client code.
Validation
Run or justify:
git diff --checkpnpm typecheckpnpm lintpnpm exec supabase db lint --local --level warning- Browser-Proof or E2E proof when UI flow is affected
Required Report Notes
If only repository, schema, or Server Action work is done, the final report must
include this exact sentence:
Data layer only, not feature complete.Also report Auth, Zod, Ownership, revalidation, and UI state handling.