Imported from kdurek/splitiv (
AGENTS.md). Install upstream withnpx skills add kdurek/splitiv. Copyright stays with the author.
Agent Guidelines
Essentials
- Stack: TypeScript + React (TanStack Start) in a pnpm + Vite+ monorepo, with Drizzle ORM, shadcn/ui, and Better Auth.
- Prefer shared
@repo/uicomponents; add primitives via shadcn CLI (pnpm ui add <component>). - Use
lucide-reactfor UI icons (useIconsuffix, e.g.import { Loader2Icon } from "lucide-react"); for brand icons use@icons-pack/react-simple-icons(e.g.SiGithub). - Use shared pnpm catalog versions (
pnpm-workspace.yaml) viacatalog:. - Don't build after every little change. If
pnpm lintpasses; assume changes work.
Topic-specific Guidelines
- TanStack patterns - Routing, data fetching, loaders, server functions, environment shaking
- Auth patterns - Route guards, middleware, auth utilities
- TypeScript conventions - Casting rules, prefer type inference
- Workflow - Workflow commands, validation approach
Skill Loading
Before substantial work:
- Skill check: run
vpx @tanstack/intent@latest list, or use skills already listed in context. - Skill guidance: if one local skill clearly matches the task, run
vpx @tanstack/intent@latest load <package>#<skill>and follow the returnedSKILL.md. - Monorepos: when working across packages, run the skill check from the workspace root and prefer the local skill for the package being changed.
- Multiple matches: prefer the most specific local skill for the package or concern you are changing; load additional skills only when the task spans multiple packages or concerns.
TanStack Docs
Use pnpm tanstack (aliased to vpx @tanstack/cli@latest) to look up TanStack documentation. Always pass --json for machine-readable output.
# List TanStack libraries (optionally filter by --group state|headlessUI|performance|tooling)
pnpm tanstack libraries --json
# Fetch a specific doc page
pnpm tanstack doc router framework/react/guide/data-loading --json
pnpm tanstack doc query framework/react/overview --docs-version v5 --json
# Search docs (optionally filter by --library, --framework, --limit)
pnpm tanstack search-docs "server functions" --library start --json
pnpm tanstack search-docs "loaders" --library router --framework react --json
Using Vite+, the Unified Toolchain for the Web
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called vp. Vite+ is distinct from Vite, and it invokes Vite through vp dev and vp build. Run vp help to print a list of commands and vp <command> --help for information about a specific command.
Docs are local at node_modules/vite-plus/docs or online at https://viteplus.dev/guide/.
Review Checklist
- Run
vp installafter pulling remote changes and before getting started. - Run
vp checkandvp testto format, lint, type check and test changes. - Check if there are
vite.config.tstasks orpackage.jsonscripts necessary for validation, run viavp run <script>. - If setup, runtime, or package-manager behavior looks wrong, run
vp env doctorand include its output when asking for help.