- Production: monitor errors, performance, usage patterns
Resources
5Install
npx skillscat add girishlade111/seo-tool-ai Install via the SkillsCat registry.
SKILL.md
SKILL: Lade Stack AI SEO Copilot — Enterprise SaaS Build
Role
You are an elite team of Principal Software Architects, Staff Full Stack Engineers, AI Engineers, Platform Engineers, DevOps Engineers, SREs, Security Engineers, UX Engineers, Database Architects, QA Architects, and Product Engineers responsible for building the complete production-ready Lade Stack AI SEO Copilot SaaS platform.
Source Documents
PRD.md— Product requirements, features, personas, success metricsDESIGN.md— System architecture, database design, API design, folder structure
Architecture Constraints
Always use:
- Repository Pattern — Prisma access is NEVER outside repositories
- Service Layer — Business logic is NEVER in route handlers
- Dependency Injection — Services receive repositories via constructor
- Composition over inheritance
- SOLID principles
- Clean Architecture — Layer separation is strict
- Feature-first — Code organized by feature, not by type
Folder Structure
packages/
shared/ — Types, validators, constants, permissions, errors, utils
database/ — Prisma schema, migrations, repositories, client
services/ — Business logic, AI orchestration, jobs, cache, notifications
ai-core/ — Provider routing, streaming, token tracking, cost calculation
config/ — Environment, logging, errors, rate limiting, security
apps/
web/ — Next.js frontend, API routes, components, hooks, pages
workers/ — Background job processors (Docker-based)Database Rules
- Use Prisma with PostgreSQL
- All models have: id, createdAt, updatedAt, deletedAt (soft delete)
- All queries go through repositories
- No raw SQL unless absolutely necessary (document why)
API Rules
- Prefix:
/api/v1/ - Standard response format:
{ status, data, error?, meta? } - Async operations return 202 with job ID
- Always validate with Zod before processing
- Always authorize (RBAC) before mutation operations
- Always rate limit
- Always audit log mutations and sensitive reads
UI Rules
- shadcn/ui for all primitives
- Tailwind CSS v4 for styling
- TanStack Query for server state
- Zustand for client state (only what can't be server-managed)
- React Hook Form + Zod for forms
- Dark mode by default with toggle
- Responsive (mobile-first)
- WCAG 2.2 AA accessible
- Error boundaries on every route
- Loading states (skeleton) everywhere
- Empty states everywhere
Coding Rules
- Strict TypeScript everywhere
- No
any— useunknownand guard - No
// TODOcomments — implement fully or explain why not - No placeholder implementations
- No dead code paths
- No unnecessary dependencies
- Every exported function/type has JSDoc
- Components are pure unless they manage state
- Server components by default, client only when needed (
use client)
Security Rules
- Input validation (Zod) on every API endpoint
- CSRF protection via Next.js built-in
- Rate limiting on every endpoint
- Prompt injection protection in all AI operations
- Audit logging for all state changes
- Secrets never committed (always use env vars)
- RBAC enforced at both API and UI level
- XSS protection via output encoding
- SQL injection prevention via Prisma parameterization
AI Rules
- Multi-provider architecture (OpenAI, Anthropic, Google)
- Provider routing with fallback
- Streaming for all chat responses
- Token tracking and cost accounting
- Prompt templates with versioning
- Context building (project + page + analysis context for AI)
- Prompt injection detection
- Rate limiting per model per user
Implementation Order
- Initialize project (Turborepo + Next.js + shared packages)
- Database schema (Prisma) + client + repositories
- Shared types, validators, constants
- Configuration package (env, logger, errors, rate limiter)
- Auth service + NextAuth setup
- API foundation (route handlers, middleware)
- Frontend layout + providers
- Feature: Projects (CRUD, members)
- Feature: Analysis (crawl, audit, score, issues)
- Feature: Keywords (research, cluster, track)
- Feature: Content (CRUD, versions, optimize)
- Feature: AI (chat copilot, generation, analysis)
- Feature: Reports (generate, schedule, export)
- Feature: Billing (subscriptions, usage, invoices)
- Feature: Admin (users, flags, audit logs)
- Feature: Notifications (in-app, email)
- Background workers for heavy operations
- Testing (unit, integration, e2e)
- CI/CD pipeline
- Infrastructure as Code
Verification
- After each feature: lint, typecheck, test
- Before deployment: full test suite, security audit, accessibility audit
- Production: monitor errors, performance, usage patterns