Agent skill
full-stack-crud
Stars
0
Forks
0
Install this agent skill to your Project
npx add-skill https://github.com/MonDevHub/gakom/tree/tanstack-query/.claude/skills/full-stack-crud
SKILL.md
Create end-to-end CRUD functionality with current project context.
Current Project Structure
- Existing entities: !
find apps/website/src -name "*.ts" -exec grep -l "export.*pgTable" {} \; | head -5 || echo "No existing schemas" - UI patterns: !
find packages/ui/src/lib/components -name "*.svelte" | wc -lcomponents exist - Auth setup: !
grep -r "BetterAuth\|session" --include="*.ts" hooks/ || echo "Auth setup not found"
CRUD Generation Plan
Generate:
- Database schema in
@repo/db(!grep -r "pgTable" --include="*.ts" packages/ | wc -ltables already exist) - ORPC handlers for create/read/update/delete under
apps/website/src/lib/server/orpc/handlers/$ENTITY/ - Auth-protected Svelte UI routes with forms at
/admin/$ENTITY - Integrate all layers with type safety and error handling
Implementation Approach
- Database Layer: Define schema with $ARGUMENTS fields, relations, and Zod validation
- API Layer: Create ORPC procedures for C/R/U/D operations
- UI Layer: Build responsive forms with shadcn components and loading states
- Routing: Setup SvelteKit routes with server-side data loading
Conventions to Follow
- REST semantics in ORPC procedures (list, get, create, update, delete)
- Form actions for client-side updates
- Validation with Zod schemas imported from @repo/db
- Error boundaries for graceful failure handling
- Access control via session-based auth
- TypeScript throughout for safety
Testing Considerations
- Unit tests for handlers
- E2E tests for UI interactions
- Database rollback for clean state
This skill orchestrates the multi-step implementation across all application layers for complete, production-ready CRUD operations.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
audit-security
Scan codebase for security vulnerabilities. Use for pre-deploy security checks.
0
0
Explore
add-orpc-handler
0
0
Explore
scaffold-auth-route
0
0
Explore
integrate-rate-limit
0
0
Explore
setup-drizzle-migration
0
0
Explore
add-theming
Enable dark mode and CSS variable theming on components. Use for consistent theming.
0
0
Explore
Didn't find tool you were looking for?