Prompts Vault
Battle-tested system prompts, .cursorrules, and architectural instructions designed to prevent hallucinations and ship clean code with AI.
The Zero-Hallucination .cursorrules
Paste this directly into your project root .cursorrules to enforce TypeScript strictness, avoid fake imports, and force atomic git diffs.
You are an elite principal engineer pair programming on this codebase.
Follow these unbreakable constraints:
1. NEVER invent packages or imports that do not exist in package.json.
2. Read the existing file before suggesting changes. Never guess file structure.
3. Keep edits atomic and minimal. Do not rewrite unrelated functions.
4. When writing Next.js 15+ code, remember that params and searchParams are Promises.
5. Never expose secrets or hardcode API keys. Use server-only env access.
6. Verify your solution with a TypeScript check or test command before reporting done.Architectural Spec Before Prompting
Forces the AI model to stop and create a comprehensive technical plan and file diff checklist before writing any production code.
Do NOT write implementation code yet.
Analyze the user request and generate a structured Technical Plan:
1. Objective: 2-3 sentences summarizing the exact desired behavior.
2. Schema & State Changes: Database migrations, types, or store changes needed.
3. Affected Files: Exact list of files to create, modify, or delete.
4. Edge Cases & Risks: Security, rate limits, concurrent writes, or breaking changes.
5. Verification Strategy: Step-by-step commands to prove this works.
Wait for my explicit approval before writing the code.Vibe-Code Security & Secret Leak Audit
Examines an AI-generated codebase or pull request for exposed environment variables, open endpoints, and injection risks.
Perform an aggressive security review of the provided code diff:
- Check for leaked secrets or private keys exposed to client bundles.
- Check authentication and authorization: are public routes accidentally accessing protected database records?
- Verify input validation: is Zod or strict typing used on all request bodies?
- Check SQL / NoSQL injection: are queries sanitized or parameterized?
- Check rate limiting and DDoS risks on open serverless functions.
Report findings ranked by Severity (Critical, High, Medium, Low) with exact line remediation.Boring Codebase Cleaner (Dead Code Elimination)
Identifies duplicate helpers, unused dependencies, and redundant state patterns that accumulate during long vibe-coding sessions.
Review this component/module for clean engineering practices:
1. Identify unused imports, dead variables, and redundant state hooks.
2. Eliminate duplicate utility functions by pointing to existing shared helpers.
3. Replace deeply nested conditionals with early return guards.
4. Ensure all async operations have clear error boundaries and loading states.
5. Maintain 100% feature parity with zero regressions.Pixel-Perfect Accessible Tailwind Component
Directs the AI to build high-converting, mobile-friendly UI components following modern typography scale and ARIA accessibility standards.
Create a responsive component matching these strict design specs:
- Palette: Strict contrast ratios >= 4.5:1. No arbitrary hex values unless mapped to design tokens.
- Layout: Mobile-first responsive using container query or safe-area padding (px-safe).
- Accessibility: Valid semantic HTML5, aria-labels for icon buttons, and focus-visible outlines.
- Motion: Smooth transition-colors (180ms ease-out). Respect prefers-reduced-motion.
- Clean Props: Strong TypeScript interface with optional variant and className overrides.Production-Mirror Local Docker Compose
Generates a locked-down, localhost-bound Docker Compose file for local PostgreSQL and Redis with automated volume persistence.
Generate a minimalist, production-aligned docker-compose.yml for local development:
- Services: Postgres 16 Alpine and Redis 7 Alpine.
- Security: Bound strictly to 127.0.0.1 (not 0.0.0.0) to prevent local network exposure.
- Environment: Read credentials from .env.local without hardcoded default passwords.
- Healthchecks: Valid pg_isready and redis-cli ping checks.
- Volumes: Named persistent volumes for data retention across container restarts.