.claude/skills/api-orpc/SKILL.md
oRPC API layer patterns for Mana Vault. Use when creating or modifying API routes/procedures, working with oRPC server or client code, adding new endpoints, or debugging API errors. Covers procedure types, Zod validation, error handling, and client-side query/mutation patterns.
npx skillsauth add WonderPanda/mana-vault api-orpcInstall 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.
packages/api/src/publicProcedure for unauthenticated endpointsprotectedProcedure for authenticated endpointsexport const appRouter = {
healthCheck: publicProcedure.handler(() => "OK"),
privateData: protectedProcedure.handler(({ context }) => ({
message: "Private",
user: context.session?.user,
})),
};
ORPCError for API errors with standard codessonner for user-facing errors// API error
throw new ORPCError("UNAUTHORIZED");
// Client-side error handling
onError: (error) => {
toast.error(error.error.message || error.error.statusText);
};
development
Set up worktrunk (git worktree manager) with dynamic port allocation for Better-T-Stack monorepos using Doppler, Alchemy, and Vite. Use when bootstrapping a new project's worktree workflow, or when asked to "set up worktrunk", "configure worktrees", "add worktree support", or "set up dynamic ports for worktrees". Covers: post-create hooks (Doppler setup, dependency install, .env.worktree generation), env-based port overrides in Vite and Alchemy configs, and dev script modification to source worktree-specific env vars after Doppler injection.
tools
TanStack DB client-side reactive data patterns for Mana Vault. Use when working with useLiveQuery hooks, client-side collections, RxDB/Dexie sync, or any reactive data queries in the web app. Covers hook locations, DB setup, and query builder best practices.
development
React Native and Expo patterns for Mana Vault mobile app. Use when working on the native app in apps/native/, modifying Expo Router routes, HeroUI Native components, or Uniwind styling. Covers project structure and key conventions.
development
React component patterns, styling conventions, and UI guidelines for Mana Vault web app. Use when creating or modifying React components, working with TailwindCSS, shadcn/ui, class-variance-authority, or route components in TanStack Router.