[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EXF0A08D6QYVTGSJ0NQ9F5":3,"skill-same:01M7EXF0A08D6QYVTGSJ0NQ9F5":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":14,"repositoryHtmlUrl":54,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M7EXF0A08D6QYVTGSJ0NQ9F5","vibecode-production-qa-validator",null,"13-phase production QA for fullstack Next.js apps: build verification, SEO tags, OG images, favicon, route regression, API auth, page speed, lazy load, vulnerability scan, UI\u002FUX cards, error boundaries, database, secure rendering, and cleanup.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevops\u002Fvibecode-production-qa-validator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vibecode-production-qa-validator\ndescription: \"13-phase production QA for fullstack Next.js apps: build verification, SEO tags, OG images, favicon, route regression, API auth, page speed, lazy load, vulnerability scan, UI\u002FUX cards, error boundaries, database, secure rendering, and cleanup.\"\ncategory: devops\nrisk: safe\nsource: self\nsource_type: self\ndate_added: \"2026-05-31\"\nauthor: Whoisabhishekadhikari\ntags: [qa, nextjs, production, deployment, seo, authentication, api, performance, favicon, cleanup, lighthouse, database, security, ui-ux]\ntools: [claude, cursor, gemini, claude-code, opencode]\nversion: 2.0.0\n---\n\n# Production QA Validator\n\nRun phases in order. Fix failures before moving to next.\n\n## When to Use\n\n- Use before shipping or promoting a fullstack Next.js app to production.\n- Use after large UI, SEO, auth, API, database, or dependency changes need a concrete launch-readiness pass.\n- Use when you need a compact command-driven checklist for build, route, metadata, performance, security, and cleanup checks.\n\n```bash\nexport PROD_URL=\"https:\u002F\u002Fyourdomain.com\"\nexport QA_AUTH_HEADER=\"\"       # optional: \"Bearer eyJ...\"\nexport PAGESPEED_API_KEY=\"\"    # optional: for auto PageSpeed API\n```\n\n---\n\n## Consolidated Runner\n\n```bash\nqa:all() { qa:code && qa:build && qa:routes \u002F \u002Fabout \u002Fcontact \u002Fprivacy \u002Fterms \u002Ffaq \u002Fsitemap.xml \u002Frobots.txt \u002Fapi\u002Fhealth && qa:seo && qa:api \u002Fapi\u002Fhealth \u002Fapi\u002Ftools && qa:git && qa:smoke; }\nqa:full() { qa:all && qa:auth && qa:auth:cookies && qa:lazyload && qa:heavyload && qa:vulns && qa:cleanup && qa:ux:cards && qa:ux:boundaries && qa:ux:animation && qa:database && qa:secure; }\n```\n\n---\n\n### Phase 1: Code Integrity\n\n- [ ] `npx tsc --noEmit`\n- [ ] `npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0`\n- [ ] `npm test -- --runInBand --passWithNoTests`\n\n```bash\nqa:code() { npx tsc --noEmit && npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 && npm test -- --runInBand --passWithNoTests; }\n```\n\n---\n\n### Phase 2: Build Verification\n\n- [ ] `npm run build` succeeds\n- [ ] SEO pages show `○`\u002F`●` not `λ`\n- [ ] Build log has no errors\n\n```bash\nqa:build() { local log; log=\"$(mktemp \"${TMPDIR:-\u002Ftmp}\u002Fqa-build.XXXXXX.log\")\" || return 1; set -o pipefail; npm run build 2>&1 | tee \"$log\"; local rc=$?; set +o pipefail; [ \"$rc\" -eq 0 ] && ! grep -qi \"error\\|failed\" \"$log\"; local ok=$?; rm -f \"$log\"; return \"$ok\"; }\n```\n\n| Symbol | Meaning |\n|--------|---------|\n| `○` | Static |\n| `●` | SSG |\n| `λ` | Dynamic\u002Fserverless |\n| `⊕` | Partial prerender |\n\n---\n\n### Phase 3: API Session & Authentication\n\n- [ ] Auth endpoints respond (login, session, logout)\n- [ ] Protected routes return 401\u002F403\n- [ ] Session cookie: HttpOnly + Secure + SameSite\n- [ ] Cookie not expired, Path\u002FDomain correct\n- [ ] No rate limiting bypass\n\n```bash\nqa:auth() {\n  local F=0\n  for ep in \u002Fapi\u002Fauth\u002Flogin \u002Fapi\u002Fauth\u002Fsession \u002Fapi\u002Fauth\u002Flogout; do\n    curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL$ep\" | grep -q \"200\\|401\" || { echo \"  ✗ $ep unreachable\"; ((F++)); }\n  done\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL\u002Fapi\u002Fprotected\" | grep -q \"401\\|403\" || echo \"  ⚠ Protected route not denying unauthenticated\"\n  return $F\n}\nqa:auth:cookies() {\n  for ep in \u002Fapi\u002Fauth\u002Fsession \u002Fapi\u002Fauth\u002Flogin; do\n    curl -sI \"$PROD_URL$ep\" | grep -i \"^set-cookie:\" | while IFS= read -r c; do\n      echo \"  $ep: $(echo \"$c\" | cut -d= -f1)\"\n      echo \"$c\" | grep -qi \"HttpOnly\" || echo \"    ✗ Missing HttpOnly\"\n      echo \"$c\" | grep -qi \"Secure\" || echo \"    ✗ Missing Secure\"\n      echo \"$c\" | grep -qi \"SameSite\" || echo \"    ⚠ Missing SameSite\"\n    done\n  done\n}\n```\n\n---\n\n### Phase 4: Route Regression\n\n- [ ] Core pages, sitemap, robots.txt all 200\n- [ ] URLs use kebab-case, no duplicate slugs\n- [ ] robots.txt allows indexing\n- [ ] Sitemap XML valid, all URLs resolve 200\n\n```bash\nqa:routes() { local F=0; for p; do local C=$(curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL$p\"); echo \"$C $p\"; [ \"$C\" = \"200\" ] || ((F++)); done; return $F; }\nqa:robots() { curl -s \"$PROD_URL\u002Frobots.txt\" | grep -qi \"Disallow: \u002F$\" && echo \"  ✗ Blocks all crawlers\" || echo \"  ✓ OK\"; }\nqa:sitemap() { curl -s \"$PROD_URL\u002Fsitemap.xml\" | python3 -c \"import sys,xml.etree.ElementTree as ET; ET.parse(sys.stdin); print('✓ Valid XML')\"; }\n```\n\n---\n\n### Phase 5: SEO — Tags, Images, Favicon, Slugs\n\n- [ ] `\u003Ctitle>` 30–60 chars, unique per page\n- [ ] `\u003Cmeta name=\"description\">` in raw HTML\n- [ ] og:title matches `\u003Ctitle>`, og:url matches canonical\n- [ ] og:image ≥ 1200×630px, absolute URL, loads 200\n- [ ] twitter:card = summary_large_image\n- [ ] Canonical self-referencing, no duplicates\n- [ ] `\u002Ffavicon.ico` 200, apple-touch-icon present\n- [ ] `hreflang` tags if multilingual\n- [ ] JSON-LD structured data present\n- [ ] Slugs: kebab-case, \u003C 80 chars, no stop words\n\n```bash\nqa:seo() {\n  local H=$(curl -s \"$PROD_URL\"); local F=0\n  for t in \"og:title\" \"og:description\" \"og:image\" \"twitter:card\" \"canonical\" \"description\"; do echo \"$H\" | grep -qi \"$t\" || { echo \"  ✗ $t\"; ((F++)); }; done\n  echo \"$H\" | grep -qi \"\u003Ctitle>\" || { echo \"  ✗ \u003Ctitle>\"; ((F++)); }\n  local T=$(echo \"$H\" | grep -oP '\u003Ctitle>\\K[^\u003C]+'); local L=${#T}; [ $L -ge 30 -a $L -le 60 ] || echo \"  ⚠ Title ${L}chars (target 30-60)\"\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL\u002Ffavicon.ico\" | grep -q 200 || echo \"  ⚠ No favicon.ico\"\n  return $F\n}\nqa:seo:ogimage() {\n  local I=$(curl -s \"$PROD_URL\" | grep -oP 'og:image\" content=\"\\K[^\"]+'); [[ \"$I\" =~ ^http ]] || I=\"$PROD_URL$I\"\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$I\" | grep -q 200 || { echo \"  ✗ og:image returns non-200\"; return 1; }\n  command -v identify &>\u002Fdev\u002Fnull && curl -s \"$I\" | identify -format \"%wx%h\" - 2>\u002Fdev\u002Fnull | grep -qP \"12\\d{2}x6\\d{2}\" && echo \"  ✓ ≥ 1200x630\" || echo \"  ⚠ Install imagemagick to check dimensions\"\n}\n```\n\n---\n\n### Phase 6: API Route Behavior\n\n- [ ] Correct status codes + Content-Type\n- [ ] Errors return consistent JSON `{ error, message }`\n- [ ] Response times \u003C 200ms\n- [ ] CORS headers correct (if cross-origin)\n\n```bash\nqa:api() {\n  for p; do\n    local R=$(curl -so \u002Fdev\u002Fnull -w \"%{http_code} %{content_type}\" \"$PROD_URL$p\")\n    echo \"  $p → $R\"\n  done\n  local E=$(curl -s \"$PROD_URL\u002Fapi\u002Fnonexistent\")\n  echo \"$E\" | python3 -c \"import sys,json; d=json.load(sys.stdin); assert 'error' in d; print('✓ Consistent errors')\" 2>\u002Fdev\u002Fnull || echo \"  ⚠ Inconsistent error shape\"\n}\n```\n\n---\n\n### Phase 7: Git Hygiene\n\n- [ ] No secrets\u002Fcredentials in diff\n- [ ] No `.next`\u002F`node_modules` staged\n- [ ] Commit: `type(scope): message`\n\n```bash\nqa:git() {\n  local S=$(git diff HEAD 2>\u002Fdev\u002Fnull | grep -i \"password\\|secret\\|api_key\\|localhost:3000\" | grep \"^+\")\n  [ -n \"$S\" ] && { echo \"  ✗ Secrets in diff!\"; echo \"$S\"; return 1; } || echo \"  ✓ No secrets\"\n  local A=$(git status --short 2>\u002Fdev\u002Fnull | grep -E \"\\.next|node_modules\" | head -3)\n  [ -n \"$A\" ] && echo \"  ⚠ Build artifacts:\" && echo \"$A\" || echo \"  ✓ No artifacts\"\n}\n```\n\n---\n\n### Phase 8: Post-Deployment Smoke Test\n\n- [ ] Homepage 200, key pages 200\n- [ ] OG image loads 200\n- [ ] No console errors (manual)\n- [ ] Auth flow works (manual)\n\n```bash\nqa:smoke() {\n  curl -sI \"$PROD_URL\" | head -1 | grep -q \"200\" && echo \"  ✓ Homepage\" || echo \"  ✗ Homepage\"\n  curl -sI \"$PROD_URL\u002Fsitemap.xml\" | head -1 | grep -q \"200\" && echo \"  ✓ Sitemap\" || echo \"  ✗ Sitemap\"\n}\n```\n\n---\n\n### Phase 9: Page Speed, Lazy Load & Bundles\n\n- [ ] Lighthouse ≥ 90 (Perf, A11y, SEO)\n- [ ] FCP \u003C 2.5s, LCP \u003C 4.0s, CLS \u003C 0.1\n- [ ] Images lazy-loaded (`loading=\"lazy\"`), WebP\u002FAVIF\n- [ ] Dynamic imports for heavy components\n- [ ] Largest JS chunk \u003C 200KB gzipped\n- [ ] `font-display: swap`, no FOIT\n- [ ] Total page weight \u003C 1MB\n\n```bash\nqa:lazyload() {\n  local N=$(grep -r \"loading=\" app\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -c \"lazy\" || true)\n  echo \"  Lazy images: $N\"\n  grep -rn \"next\u002Fdynamic\\|dynamic((\" app\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5 | grep . || echo \"  ⚠ No dynamic imports\"\n}\nqa:heavyload() {\n  ls -lhS .next\u002Fstatic\u002Fchunks\u002F*.js 2>\u002Fdev\u002Fnull | head -5\n  local W=$(curl -so \u002Fdev\u002Fnull -w \"%{size_download}\" \"$PROD_URL\" 2>\u002Fdev\u002Fnull || echo 0)\n  echo \"  HTML weight: ~$((W\u002F1024))KB\"\n  echo \"  ⚠ Run 'npx lighthouse $PROD_URL --view' for full weight analysis\"\n}\n# PageSpeed: open \"https:\u002F\u002Fpagespeed.web.dev\u002F?url=$PROD_URL\"\n```\n\n---\n\n### Phase 10: Cleanup & Vulnerability Scan\n\n- [ ] `npm prune`, `depcheck` — no unused deps\n- [ ] No console.log\u002Fdebugger in staged code\n- [ ] `npm audit` — zero critical\u002Fhigh vulnerabilities\n- [ ] No eval\u002Fnew Function\u002Fdocument.write\n- [ ] TODOs resolved\n\n```bash\nqa:vulns() {\n  npm audit 2>\u002Fdev\u002Fnull | grep -E \"critical|high\" | grep . && echo \"  ✗ Vulnerabilities!\" || echo \"  ✓ No critical\u002Fhigh vulns\"\n  npm outdated 2>\u002Fdev\u002Fnull | head -5 | grep . || echo \"  ✓ All up to date\"\n  local D=$(grep -rn \"eval(\\|new Function(\\|document.write(\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5) # security-allowlist: defensive source scan\n  [ -n \"$D\" ] && echo \"  ⚠ Dangerous patterns:\" && echo \"$D\" || echo \"  ✓ No dangerous patterns\"\n}\nqa:cleanup() {\n  local D=$(git diff --cached 2>\u002Fdev\u002Fnull | grep \"^+\" | grep -i \"console\\.log\\|debugger\" | head -5)\n  [ -n \"$D\" ] && echo \"  ✗ Debug artifacts:\" && echo \"$D\" || echo \"  ✓ No debug artifacts\"\n  local T=$(git diff --cached 2>\u002Fdev\u002Fnull | grep \"^+\" | grep -i \"TODO\\|FIXME\\|HACK\" | head -5)\n  [ -n \"$T\" ] && echo \"  ⚠ TODOs remain:\" && echo \"$T\"\n}\n```\n\n---\n\n### Phase 11: UI\u002FUX — Cards, Animation, Error Boundaries\n\n- [ ] Cards: equal height grid, no overlap, text ellipsis, responsive (1→2→3 col)\n- [ ] No horizontal scroll at any viewport (320–1440px)\n- [ ] Images: consistent `aspect-ratio` + `object-fit: cover`\n- [ ] Touch targets ≥ 44×44px\n- [ ] Animations use `transform`+`opacity` only (not layout props)\n- [ ] `prefers-reduced-motion` respected\n- [ ] Error boundaries at root + route level (`app\u002Ferror.tsx`, `app\u002Fglobal-error.tsx`)\n- [ ] `app\u002Fnot-found.tsx` and `app\u002Floading.tsx` exist\n- [ ] All client fetches show loading + error + empty states\n- [ ] Buttons: hover, focus-visible, active, disabled, loading states\n- [ ] Forms disable submit on click (no double-submit)\n\n```bash\nqa:ux:cards() {\n  local E=$(grep -rn \"text-overflow\\|line-clamp\\|truncate\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$E\" ] && echo \"  ✓ Text overflow handling\" || echo \"  ⚠ No text overflow handling\"\n  local A=$(grep -rn \"aspect-\\|object-fit\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$A\" ] && echo \"  ✓ aspect-ratio\u002Fobject-fit used\" || echo \"  ⚠ No aspect-ratio set\"\n}\nqa:ux:boundaries() {\n  for f in app\u002Ferror.tsx app\u002Fglobal-error.tsx app\u002Fnot-found.tsx app\u002Floading.tsx; do\n    [ -f \"$f\" ] && echo \"  ✓ $f\" || echo \"  ⚠ Missing $f\"\n  done\n}\nqa:ux:animation() {\n  local A=$(grep -rn \"animation.*width\\|transition.*height\\|@keyframes.*top\\|@keyframes.*margin\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$A\" ] && echo \"  ⚠ Layout-triggering animations:\" && echo \"$A\" || echo \"  ✓ No layout-triggering animations\"\n  local P=$(grep -r \"@media.*prefers-reduced-motion\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$P\" ] && echo \"  ✓ prefers-reduced-motion found in CSS\" || echo \"  ⚠ No prefers-reduced-motion in CSS\"\n}\n```\n\n---\n\n### Phase 12: Database & Data Layer\n\n- [ ] Connection pool configured (no starvation)\n- [ ] Schema in sync with migrations\n- [ ] Indexes on all queried columns, no N+1\n- [ ] No hardcoded DB credentials in source\n- [ ] No raw SQL injection risk\n- [ ] No sensitive data leaked in API responses\n- [ ] Migrations are idempotent\n\n```bash\nqa:database() {\n  local H=$(grep -rn \"postgres:\u002F\u002F\\|mysql:\u002F\u002F\\|mongodb:\u002F\u002F\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -v \".env\" | head -5)\n  [ -n \"$H\" ] && { echo \"  ✗ Hardcoded DB URL:\"; echo \"$H\"; } || echo \"  ✓ No hardcoded DB URLs\"\n  local R=$(grep -rn \"\\$queryRaw\\|\\.raw(\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$R\" ] && echo \"  ⚠ Raw SQL:\" && echo \"$R\" || echo \"  ✓ No raw SQL\"\n  local N=$(grep -rn \"\\.findMany\\|\\.findUnique\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -v \"include:\" | head -5)\n  [ -n \"$N\" ] && echo \"  ⚠ Possible N+1:\" && echo \"$N\" || echo \"  ✓ No N+1 patterns\"\n}\nqa:db:migrations() {\n  [ -d \"prisma\u002Fmigrations\" ] && echo \"  ✓ Prisma: $(ls prisma\u002Fmigrations 2>\u002Fdev\u002Fnull | wc -l) migrations\" || echo \"  - No prisma migrations dir\"\n  local M=$(ls db\u002Fmigrations\u002F*.sql 2>\u002Fdev\u002Fnull | head -5); [ -n \"$M\" ] && echo \"  ✓ SQL migrations:\" && echo \"$M\" || echo \"  - No SQL migration files\"\n}\n```\n\n---\n\n### Phase 13: Secure Data Rendering\n\n- [ ] No secrets\u002Ftokens in client source or localStorage\n- [ ] No `dangerouslySetInnerHTML` without DOMPurify\n- [ ] API errors don't leak stack traces\n- [ ] Internal IDs use UUIDs not auto-increment\n- [ ] User emails masked in UI\n- [ ] NEXT_PUBLIC_ vars contain no secrets\n\n```bash\nqa:secure() {\n  local S=$(git grep -n \"api_key\\|API_KEY\\|secret_key\\|PRIVATE_KEY\" -- ':!*.env*' ':!*test*' 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$S\" ] && echo \"  ✗ Secrets in source:\" && echo \"$S\" || echo \"  ✓ No hardcoded secrets\"\n  local D=$(grep -rn \"dangerouslySetInnerHTML\" app\u002F src\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$D\" ] && echo \"  ⚠ XSS risk — use DOMPurify:\" && echo \"$D\" || echo \"  ✓ No dangerouslySetInnerHTML\"\n  local T=$(grep -rn \"localStorage\\|sessionStorage\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -i \"token\\|jwt\\|secret\" | head -5)\n  [ -n \"$T\" ] && echo \"  ⚠ Tokens in storage — use httpOnly cookies:\" && echo \"$T\" || echo \"  ✓ No tokens in storage\"\n  curl -s \"$PROD_URL\u002Fapi\u002Fnonexistent\" 2>\u002Fdev\u002Fnull | grep -qi \"stack\\|Error:\" && echo \"  ✗ Stack trace leak\" || echo \"  ✓ No stack leak\"\n}\n```\n\n---\n\n## Pre-Commit Hook\n\n```bash\ncat > .git\u002Fhooks\u002Fpre-commit \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fsh\nnpx tsc --noEmit || exit 1\nnpx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 || exit 1\nEOF\nchmod +x .git\u002Fhooks\u002Fpre-commit\n```\n\n---\n\n## CI\u002FCD (GitHub Actions)\n\n```yaml\nname: QA\non: [push, pull_request]\njobs:\n  qa:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n      - run: npm ci\n      - run: npx tsc --noEmit\n      - run: npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0\n      - run: npm test -- --runInBand --passWithNoTests\n      - run: npm run build\n```\n\n---\n\n## Best Practices\n\n| ✅ Do | ❌ Don't |\n|-------|----------|\n| Run full 13-phase flow before deploy | Skip typecheck or lint |\n| Set `PROD_URL` in profile\u002F.envrc | Hardcode URLs in scripts |\n| OG images ≥ 1200×630 | Use small OG images |\n| Animate with `transform`+`opacity` | Animate width\u002Fheight\u002Ftop |\n| Show loading\u002Ferror\u002Fempty states | Leave users on blank screens |\n| `prefers-reduced-motion` for animations | Force motion on all users |\n| HttpOnly + Secure cookies for tokens | localStorage for auth tokens |\n| Error boundaries at all levels | White screen on crash |\n| Database indexes + include\u002Fpopulate | N+1 queries in loops |\n| `npm audit` before deploy | Deploy with known vulns |\n\n---\n\n## Common Pitfalls\n\n| Problem | Solution |\n|---------|----------|\n| OG tags missing in raw HTML | Use `export const metadata` in Next.js |\n| `Disallow: \u002F` in robots.txt | Blocks all crawlers — use specific paths |\n| Cards different heights in grid | Use `display: grid` with equal-height rows, not flex |\n| Text overflows card | Add `text-overflow: ellipsis` + `overflow: hidden` |\n| Animation jank | Animate `transform` not `width`\u002F`height` |\n| Form submits twice | Disable button on first click |\n| Console errors in prod | Add `no-console` ESLint rule |\n| DB connection timeout | Add connection pooling (PgBouncer\u002FPrisma Accelerate) |\n| Sensitive data in API | Strip `passwordHash`\u002F`secret` in response transformer |\n| App crashes on error | Add `app\u002Ferror.tsx` error boundary |\n| Large JS bundles | Dynamic import heavy components, analyze with `next\u002Fbundle-analyzer` |\n| Images load slowly | Add `loading=\"lazy\"`, use WebP\u002FAVIF, resize to display size |\n\n---\n\n## Security Notes\n\n- All `qa:*` functions are read-only (tsc, lint, test, build, curl, grep)\n- `PROD_URL` and `QA_AUTH_HEADER` only for environments you own\n- Basic secret scanning in `git diff` — for prod, use `trufflehog`\u002F`git-secrets`\n- Auth tests with real credentials against prod is destructive — use staging\n\n---\n\n## Limitations\n\n- Passing all phases reduces risk but doesn't eliminate production bugs\n- Some checks depend on project-specific tooling (Prisma, NextAuth, etc.)\n- Manual UX testing still required for critical user journeys\n- SEO checks verify raw HTML only — not social preview rendering\n- Route checks verify status codes, not content correctness\n\n---\n\n## Master Checklist\n\n### Phase 1: Code\n- [ ] `tsc --noEmit`, `eslint`, `npm test` pass\n\n### Phase 2: Build\n- [ ] `npm run build` succeeds, no errors, pages static\n\n### Phase 3: Auth\n- [ ] Endpoints respond, protected routes denied, secure cookies\n\n### Phase 4: Routes\n- [ ] All core pages 200, sitemap valid, robots.txt correct\n\n### Phase 5: SEO\n- [ ] title, description, og:*, twitter:card, canonical, favicon, slugs\n\n### Phase 6: API\n- [ ] Status, Content-Type, consistent errors, timing\n\n### Phase 7: Git\n- [ ] No secrets, no artifacts, conventional commit\n\n### Phase 8: Smoke\n- [ ] Homepage + key pages 200, og:image loads\n\n### Phase 9: Speed\n- [ ] Lighthouse ≥ 90, lazy images, dynamic imports, font-display: swap\n\n### Phase 10: Clean\n- [ ] No vulns, no debug artifacts, unused deps pruned\n\n### Phase 11: UI\u002FUX\n- [ ] Cards responsive, error boundaries, button states, reduced-motion\n\n### Phase 12: Database\n- [ ] Indexes, no N+1, no hardcoded URLs, no sensitive leaks\n\n### Phase 13: Secure Rendering\n- [ ] No secrets in client, no XSS, no stack leaks, UUIDs\n","# Production QA Validator\n\nRun phases in order. Fix failures before moving to next.\n\n## When to Use\n\n- Use before shipping or promoting a fullstack Next.js app to production.\n- Use after large UI, SEO, auth, API, database, or dependency changes need a concrete launch-readiness pass.\n- Use when you need a compact command-driven checklist for build, route, metadata, performance, security, and cleanup checks.\n\n```bash\nexport PROD_URL=\"https:\u002F\u002Fyourdomain.com\"\nexport QA_AUTH_HEADER=\"\"       # optional: \"Bearer eyJ...\"\nexport PAGESPEED_API_KEY=\"\"    # optional: for auto PageSpeed API\n```\n\n---\n\n## Consolidated Runner\n\n```bash\nqa:all() { qa:code && qa:build && qa:routes \u002F \u002Fabout \u002Fcontact \u002Fprivacy \u002Fterms \u002Ffaq \u002Fsitemap.xml \u002Frobots.txt \u002Fapi\u002Fhealth && qa:seo && qa:api \u002Fapi\u002Fhealth \u002Fapi\u002Ftools && qa:git && qa:smoke; }\nqa:full() { qa:all && qa:auth && qa:auth:cookies && qa:lazyload && qa:heavyload && qa:vulns && qa:cleanup && qa:ux:cards && qa:ux:boundaries && qa:ux:animation && qa:database && qa:secure; }\n```\n\n---\n\n### Phase 1: Code Integrity\n\n- [ ] `npx tsc --noEmit`\n- [ ] `npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0`\n- [ ] `npm test -- --runInBand --passWithNoTests`\n\n```bash\nqa:code() { npx tsc --noEmit && npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 && npm test -- --runInBand --passWithNoTests; }\n```\n\n---\n\n### Phase 2: Build Verification\n\n- [ ] `npm run build` succeeds\n- [ ] SEO pages show `○`\u002F`●` not `λ`\n- [ ] Build log has no errors\n\n```bash\nqa:build() { local log; log=\"$(mktemp \"${TMPDIR:-\u002Ftmp}\u002Fqa-build.XXXXXX.log\")\" || return 1; set -o pipefail; npm run build 2>&1 | tee \"$log\"; local rc=$?; set +o pipefail; [ \"$rc\" -eq 0 ] && ! grep -qi \"error\\|failed\" \"$log\"; local ok=$?; rm -f \"$log\"; return \"$ok\"; }\n```\n\n| Symbol | Meaning |\n|--------|---------|\n| `○` | Static |\n| `●` | SSG |\n| `λ` | Dynamic\u002Fserverless |\n| `⊕` | Partial prerender |\n\n---\n\n### Phase 3: API Session & Authentication\n\n- [ ] Auth endpoints respond (login, session, logout)\n- [ ] Protected routes return 401\u002F403\n- [ ] Session cookie: HttpOnly + Secure + SameSite\n- [ ] Cookie not expired, Path\u002FDomain correct\n- [ ] No rate limiting bypass\n\n```bash\nqa:auth() {\n  local F=0\n  for ep in \u002Fapi\u002Fauth\u002Flogin \u002Fapi\u002Fauth\u002Fsession \u002Fapi\u002Fauth\u002Flogout; do\n    curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL$ep\" | grep -q \"200\\|401\" || { echo \"  ✗ $ep unreachable\"; ((F++)); }\n  done\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL\u002Fapi\u002Fprotected\" | grep -q \"401\\|403\" || echo \"  ⚠ Protected route not denying unauthenticated\"\n  return $F\n}\nqa:auth:cookies() {\n  for ep in \u002Fapi\u002Fauth\u002Fsession \u002Fapi\u002Fauth\u002Flogin; do\n    curl -sI \"$PROD_URL$ep\" | grep -i \"^set-cookie:\" | while IFS= read -r c; do\n      echo \"  $ep: $(echo \"$c\" | cut -d= -f1)\"\n      echo \"$c\" | grep -qi \"HttpOnly\" || echo \"    ✗ Missing HttpOnly\"\n      echo \"$c\" | grep -qi \"Secure\" || echo \"    ✗ Missing Secure\"\n      echo \"$c\" | grep -qi \"SameSite\" || echo \"    ⚠ Missing SameSite\"\n    done\n  done\n}\n```\n\n---\n\n### Phase 4: Route Regression\n\n- [ ] Core pages, sitemap, robots.txt all 200\n- [ ] URLs use kebab-case, no duplicate slugs\n- [ ] robots.txt allows indexing\n- [ ] Sitemap XML valid, all URLs resolve 200\n\n```bash\nqa:routes() { local F=0; for p; do local C=$(curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL$p\"); echo \"$C $p\"; [ \"$C\" = \"200\" ] || ((F++)); done; return $F; }\nqa:robots() { curl -s \"$PROD_URL\u002Frobots.txt\" | grep -qi \"Disallow: \u002F$\" && echo \"  ✗ Blocks all crawlers\" || echo \"  ✓ OK\"; }\nqa:sitemap() { curl -s \"$PROD_URL\u002Fsitemap.xml\" | python3 -c \"import sys,xml.etree.ElementTree as ET; ET.parse(sys.stdin); print('✓ Valid XML')\"; }\n```\n\n---\n\n### Phase 5: SEO — Tags, Images, Favicon, Slugs\n\n- [ ] `\u003Ctitle>` 30–60 chars, unique per page\n- [ ] `\u003Cmeta name=\"description\">` in raw HTML\n- [ ] og:title matches `\u003Ctitle>`, og:url matches canonical\n- [ ] og:image ≥ 1200×630px, absolute URL, loads 200\n- [ ] twitter:card = summary_large_image\n- [ ] Canonical self-referencing, no duplicates\n- [ ] `\u002Ffavicon.ico` 200, apple-touch-icon present\n- [ ] `hreflang` tags if multilingual\n- [ ] JSON-LD structured data present\n- [ ] Slugs: kebab-case, \u003C 80 chars, no stop words\n\n```bash\nqa:seo() {\n  local H=$(curl -s \"$PROD_URL\"); local F=0\n  for t in \"og:title\" \"og:description\" \"og:image\" \"twitter:card\" \"canonical\" \"description\"; do echo \"$H\" | grep -qi \"$t\" || { echo \"  ✗ $t\"; ((F++)); }; done\n  echo \"$H\" | grep -qi \"\u003Ctitle>\" || { echo \"  ✗ \u003Ctitle>\"; ((F++)); }\n  local T=$(echo \"$H\" | grep -oP '\u003Ctitle>\\K[^\u003C]+'); local L=${#T}; [ $L -ge 30 -a $L -le 60 ] || echo \"  ⚠ Title ${L}chars (target 30-60)\"\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$PROD_URL\u002Ffavicon.ico\" | grep -q 200 || echo \"  ⚠ No favicon.ico\"\n  return $F\n}\nqa:seo:ogimage() {\n  local I=$(curl -s \"$PROD_URL\" | grep -oP 'og:image\" content=\"\\K[^\"]+'); [[ \"$I\" =~ ^http ]] || I=\"$PROD_URL$I\"\n  curl -so \u002Fdev\u002Fnull -w \"%{http_code}\" \"$I\" | grep -q 200 || { echo \"  ✗ og:image returns non-200\"; return 1; }\n  command -v identify &>\u002Fdev\u002Fnull && curl -s \"$I\" | identify -format \"%wx%h\" - 2>\u002Fdev\u002Fnull | grep -qP \"12\\d{2}x6\\d{2}\" && echo \"  ✓ ≥ 1200x630\" || echo \"  ⚠ Install imagemagick to check dimensions\"\n}\n```\n\n---\n\n### Phase 6: API Route Behavior\n\n- [ ] Correct status codes + Content-Type\n- [ ] Errors return consistent JSON `{ error, message }`\n- [ ] Response times \u003C 200ms\n- [ ] CORS headers correct (if cross-origin)\n\n```bash\nqa:api() {\n  for p; do\n    local R=$(curl -so \u002Fdev\u002Fnull -w \"%{http_code} %{content_type}\" \"$PROD_URL$p\")\n    echo \"  $p → $R\"\n  done\n  local E=$(curl -s \"$PROD_URL\u002Fapi\u002Fnonexistent\")\n  echo \"$E\" | python3 -c \"import sys,json; d=json.load(sys.stdin); assert 'error' in d; print('✓ Consistent errors')\" 2>\u002Fdev\u002Fnull || echo \"  ⚠ Inconsistent error shape\"\n}\n```\n\n---\n\n### Phase 7: Git Hygiene\n\n- [ ] No secrets\u002Fcredentials in diff\n- [ ] No `.next`\u002F`node_modules` staged\n- [ ] Commit: `type(scope): message`\n\n```bash\nqa:git() {\n  local S=$(git diff HEAD 2>\u002Fdev\u002Fnull | grep -i \"password\\|secret\\|api_key\\|localhost:3000\" | grep \"^+\")\n  [ -n \"$S\" ] && { echo \"  ✗ Secrets in diff!\"; echo \"$S\"; return 1; } || echo \"  ✓ No secrets\"\n  local A=$(git status --short 2>\u002Fdev\u002Fnull | grep -E \"\\.next|node_modules\" | head -3)\n  [ -n \"$A\" ] && echo \"  ⚠ Build artifacts:\" && echo \"$A\" || echo \"  ✓ No artifacts\"\n}\n```\n\n---\n\n### Phase 8: Post-Deployment Smoke Test\n\n- [ ] Homepage 200, key pages 200\n- [ ] OG image loads 200\n- [ ] No console errors (manual)\n- [ ] Auth flow works (manual)\n\n```bash\nqa:smoke() {\n  curl -sI \"$PROD_URL\" | head -1 | grep -q \"200\" && echo \"  ✓ Homepage\" || echo \"  ✗ Homepage\"\n  curl -sI \"$PROD_URL\u002Fsitemap.xml\" | head -1 | grep -q \"200\" && echo \"  ✓ Sitemap\" || echo \"  ✗ Sitemap\"\n}\n```\n\n---\n\n### Phase 9: Page Speed, Lazy Load & Bundles\n\n- [ ] Lighthouse ≥ 90 (Perf, A11y, SEO)\n- [ ] FCP \u003C 2.5s, LCP \u003C 4.0s, CLS \u003C 0.1\n- [ ] Images lazy-loaded (`loading=\"lazy\"`), WebP\u002FAVIF\n- [ ] Dynamic imports for heavy components\n- [ ] Largest JS chunk \u003C 200KB gzipped\n- [ ] `font-display: swap`, no FOIT\n- [ ] Total page weight \u003C 1MB\n\n```bash\nqa:lazyload() {\n  local N=$(grep -r \"loading=\" app\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -c \"lazy\" || true)\n  echo \"  Lazy images: $N\"\n  grep -rn \"next\u002Fdynamic\\|dynamic((\" app\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5 | grep . || echo \"  ⚠ No dynamic imports\"\n}\nqa:heavyload() {\n  ls -lhS .next\u002Fstatic\u002Fchunks\u002F*.js 2>\u002Fdev\u002Fnull | head -5\n  local W=$(curl -so \u002Fdev\u002Fnull -w \"%{size_download}\" \"$PROD_URL\" 2>\u002Fdev\u002Fnull || echo 0)\n  echo \"  HTML weight: ~$((W\u002F1024))KB\"\n  echo \"  ⚠ Run 'npx lighthouse $PROD_URL --view' for full weight analysis\"\n}\n# PageSpeed: open \"https:\u002F\u002Fpagespeed.web.dev\u002F?url=$PROD_URL\"\n```\n\n---\n\n### Phase 10: Cleanup & Vulnerability Scan\n\n- [ ] `npm prune`, `depcheck` — no unused deps\n- [ ] No console.log\u002Fdebugger in staged code\n- [ ] `npm audit` — zero critical\u002Fhigh vulnerabilities\n- [ ] No eval\u002Fnew Function\u002Fdocument.write\n- [ ] TODOs resolved\n\n```bash\nqa:vulns() {\n  npm audit 2>\u002Fdev\u002Fnull | grep -E \"critical|high\" | grep . && echo \"  ✗ Vulnerabilities!\" || echo \"  ✓ No critical\u002Fhigh vulns\"\n  npm outdated 2>\u002Fdev\u002Fnull | head -5 | grep . || echo \"  ✓ All up to date\"\n  local D=$(grep -rn \"eval(\\|new Function(\\|document.write(\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5) # security-allowlist: defensive source scan\n  [ -n \"$D\" ] && echo \"  ⚠ Dangerous patterns:\" && echo \"$D\" || echo \"  ✓ No dangerous patterns\"\n}\nqa:cleanup() {\n  local D=$(git diff --cached 2>\u002Fdev\u002Fnull | grep \"^+\" | grep -i \"console\\.log\\|debugger\" | head -5)\n  [ -n \"$D\" ] && echo \"  ✗ Debug artifacts:\" && echo \"$D\" || echo \"  ✓ No debug artifacts\"\n  local T=$(git diff --cached 2>\u002Fdev\u002Fnull | grep \"^+\" | grep -i \"TODO\\|FIXME\\|HACK\" | head -5)\n  [ -n \"$T\" ] && echo \"  ⚠ TODOs remain:\" && echo \"$T\"\n}\n```\n\n---\n\n### Phase 11: UI\u002FUX — Cards, Animation, Error Boundaries\n\n- [ ] Cards: equal height grid, no overlap, text ellipsis, responsive (1→2→3 col)\n- [ ] No horizontal scroll at any viewport (320–1440px)\n- [ ] Images: consistent `aspect-ratio` + `object-fit: cover`\n- [ ] Touch targets ≥ 44×44px\n- [ ] Animations use `transform`+`opacity` only (not layout props)\n- [ ] `prefers-reduced-motion` respected\n- [ ] Error boundaries at root + route level (`app\u002Ferror.tsx`, `app\u002Fglobal-error.tsx`)\n- [ ] `app\u002Fnot-found.tsx` and `app\u002Floading.tsx` exist\n- [ ] All client fetches show loading + error + empty states\n- [ ] Buttons: hover, focus-visible, active, disabled, loading states\n- [ ] Forms disable submit on click (no double-submit)\n\n```bash\nqa:ux:cards() {\n  local E=$(grep -rn \"text-overflow\\|line-clamp\\|truncate\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$E\" ] && echo \"  ✓ Text overflow handling\" || echo \"  ⚠ No text overflow handling\"\n  local A=$(grep -rn \"aspect-\\|object-fit\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$A\" ] && echo \"  ✓ aspect-ratio\u002Fobject-fit used\" || echo \"  ⚠ No aspect-ratio set\"\n}\nqa:ux:boundaries() {\n  for f in app\u002Ferror.tsx app\u002Fglobal-error.tsx app\u002Fnot-found.tsx app\u002Floading.tsx; do\n    [ -f \"$f\" ] && echo \"  ✓ $f\" || echo \"  ⚠ Missing $f\"\n  done\n}\nqa:ux:animation() {\n  local A=$(grep -rn \"animation.*width\\|transition.*height\\|@keyframes.*top\\|@keyframes.*margin\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$A\" ] && echo \"  ⚠ Layout-triggering animations:\" && echo \"$A\" || echo \"  ✓ No layout-triggering animations\"\n  local P=$(grep -r \"@media.*prefers-reduced-motion\" app\u002F --include=\"*.css\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -3)\n  [ -n \"$P\" ] && echo \"  ✓ prefers-reduced-motion found in CSS\" || echo \"  ⚠ No prefers-reduced-motion in CSS\"\n}\n```\n\n---\n\n### Phase 12: Database & Data Layer\n\n- [ ] Connection pool configured (no starvation)\n- [ ] Schema in sync with migrations\n- [ ] Indexes on all queried columns, no N+1\n- [ ] No hardcoded DB credentials in source\n- [ ] No raw SQL injection risk\n- [ ] No sensitive data leaked in API responses\n- [ ] Migrations are idempotent\n\n```bash\nqa:database() {\n  local H=$(grep -rn \"postgres:\u002F\u002F\\|mysql:\u002F\u002F\\|mongodb:\u002F\u002F\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -v \".env\" | head -5)\n  [ -n \"$H\" ] && { echo \"  ✗ Hardcoded DB URL:\"; echo \"$H\"; } || echo \"  ✓ No hardcoded DB URLs\"\n  local R=$(grep -rn \"\\$queryRaw\\|\\.raw(\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$R\" ] && echo \"  ⚠ Raw SQL:\" && echo \"$R\" || echo \"  ✓ No raw SQL\"\n  local N=$(grep -rn \"\\.findMany\\|\\.findUnique\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -v \"include:\" | head -5)\n  [ -n \"$N\" ] && echo \"  ⚠ Possible N+1:\" && echo \"$N\" || echo \"  ✓ No N+1 patterns\"\n}\nqa:db:migrations() {\n  [ -d \"prisma\u002Fmigrations\" ] && echo \"  ✓ Prisma: $(ls prisma\u002Fmigrations 2>\u002Fdev\u002Fnull | wc -l) migrations\" || echo \"  - No prisma migrations dir\"\n  local M=$(ls db\u002Fmigrations\u002F*.sql 2>\u002Fdev\u002Fnull | head -5); [ -n \"$M\" ] && echo \"  ✓ SQL migrations:\" && echo \"$M\" || echo \"  - No SQL migration files\"\n}\n```\n\n---\n\n### Phase 13: Secure Data Rendering\n\n- [ ] No secrets\u002Ftokens in client source or localStorage\n- [ ] No `dangerouslySetInnerHTML` without DOMPurify\n- [ ] API errors don't leak stack traces\n- [ ] Internal IDs use UUIDs not auto-increment\n- [ ] User emails masked in UI\n- [ ] NEXT_PUBLIC_ vars contain no secrets\n\n```bash\nqa:secure() {\n  local S=$(git grep -n \"api_key\\|API_KEY\\|secret_key\\|PRIVATE_KEY\" -- ':!*.env*' ':!*test*' 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$S\" ] && echo \"  ✗ Secrets in source:\" && echo \"$S\" || echo \"  ✓ No hardcoded secrets\"\n  local D=$(grep -rn \"dangerouslySetInnerHTML\" app\u002F src\u002F --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | head -5)\n  [ -n \"$D\" ] && echo \"  ⚠ XSS risk — use DOMPurify:\" && echo \"$D\" || echo \"  ✓ No dangerouslySetInnerHTML\"\n  local T=$(grep -rn \"localStorage\\|sessionStorage\" app\u002F src\u002F --include=\"*.ts\" --include=\"*.tsx\" 2>\u002Fdev\u002Fnull | grep -i \"token\\|jwt\\|secret\" | head -5)\n  [ -n \"$T\" ] && echo \"  ⚠ Tokens in storage — use httpOnly cookies:\" && echo \"$T\" || echo \"  ✓ No tokens in storage\"\n  curl -s \"$PROD_URL\u002Fapi\u002Fnonexistent\" 2>\u002Fdev\u002Fnull | grep -qi \"stack\\|Error:\" && echo \"  ✗ Stack trace leak\" || echo \"  ✓ No stack leak\"\n}\n```\n\n---\n\n## Pre-Commit Hook\n\n```bash\ncat > .git\u002Fhooks\u002Fpre-commit \u003C\u003C 'EOF'\n#!\u002Fbin\u002Fsh\nnpx tsc --noEmit || exit 1\nnpx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 || exit 1\nEOF\nchmod +x .git\u002Fhooks\u002Fpre-commit\n```\n\n---\n\n## CI\u002FCD (GitHub Actions)\n\n```yaml\nname: QA\non: [push, pull_request]\njobs:\n  qa:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n      - run: npm ci\n      - run: npx tsc --noEmit\n      - run: npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0\n      - run: npm test -- --runInBand --passWithNoTests\n      - run: npm run build\n```\n\n---\n\n## Best Practices\n\n| ✅ Do | ❌ Don't |\n|-------|----------|\n| Run full 13-phase flow before deploy | Skip typecheck or lint |\n| Set `PROD_URL` in profile\u002F.envrc | Hardcode URLs in scripts |\n| OG images ≥ 1200×630 | Use small OG images |\n| Animate with `transform`+`opacity` | Animate width\u002Fheight\u002Ftop |\n| Show loading\u002Ferror\u002Fempty states | Leave users on blank screens |\n| `prefers-reduced-motion` for animations | Force motion on all users |\n| HttpOnly + Secure cookies for tokens | localStorage for auth tokens |\n| Error boundaries at all levels | White screen on crash |\n| Database indexes + include\u002Fpopulate | N+1 queries in loops |\n| `npm audit` before deploy | Deploy with known vulns |\n\n---\n\n## Common Pitfalls\n\n| Problem | Solution |\n|---------|----------|\n| OG tags missing in raw HTML | Use `export const metadata` in Next.js |\n| `Disallow: \u002F` in robots.txt | Blocks all crawlers — use specific paths |\n| Cards different heights in grid | Use `display: grid` with equal-height rows, not flex |\n| Text overflows card | Add `text-overflow: ellipsis` + `overflow: hidden` |\n| Animation jank | Animate `transform` not `width`\u002F`height` |\n| Form submits twice | Disable button on first click |\n| Console errors in prod | Add `no-console` ESLint rule |\n| DB connection timeout | Add connection pooling (PgBouncer\u002FPrisma Accelerate) |\n| Sensitive data in API | Strip `passwordHash`\u002F`secret` in response transformer |\n| App crashes on error | Add `app\u002Ferror.tsx` error boundary |\n| Large JS bundles | Dynamic import heavy components, analyze with `next\u002Fbundle-analyzer` |\n| Images load slowly | Add `loading=\"lazy\"`, use WebP\u002FAVIF, resize to display size |\n\n---\n\n## Security Notes\n\n- All `qa:*` functions are read-only (tsc, lint, test, build, curl, grep)\n- `PROD_URL` and `QA_AUTH_HEADER` only for environments you own\n- Basic secret scanning in `git diff` — for prod, use `trufflehog`\u002F`git-secrets`\n- Auth tests with real credentials against prod is destructive — use staging\n\n---\n\n## Limitations\n\n- Passing all phases reduces risk but doesn't eliminate production bugs\n- Some checks depend on project-specific tooling (Prisma, NextAuth, etc.)\n- Manual UX testing still required for critical user journeys\n- SEO checks verify raw HTML only — not social preview rendering\n- Route checks verify status codes, not content correctness\n\n---\n\n## Master Checklist\n\n### Phase 1: Code\n- [ ] `tsc --noEmit`, `eslint`, `npm test` pass\n\n### Phase 2: Build\n- [ ] `npm run build` succeeds, no errors, pages static\n\n### Phase 3: Auth\n- [ ] Endpoints respond, protected routes denied, secure cookies\n\n### Phase 4: Routes\n- [ ] All core pages 200, sitemap valid, robots.txt correct\n\n### Phase 5: SEO\n- [ ] title, description, og:*, twitter:card, canonical, favicon, slugs\n\n### Phase 6: API\n- [ ] Status, Content-Type, consistent errors, timing\n\n### Phase 7: Git\n- [ ] No secrets, no artifacts, conventional commit\n\n### Phase 8: Smoke\n- [ ] Homepage + key pages 200, og:image loads\n\n### Phase 9: Speed\n- [ ] Lighthouse ≥ 90, lazy images, dynamic imports, font-display: swap\n\n### Phase 10: Clean\n- [ ] No vulns, no debug artifacts, unused deps pruned\n\n### Phase 11: UI\u002FUX\n- [ ] Cards responsive, error boundaries, button states, reduced-motion\n\n### Phase 12: Database\n- [ ] Indexes, no N+1, no hardcoded URLs, no sensitive leaks\n\n### Phase 13: Secure Rendering\n- [ ] No secrets in client, no XSS, no stack leaks, UUIDs\n",{"name":5,"risk":24,"tags":25,"tools":40,"author":46,"source":47,"version":48,"category":49,"date_added":50,"description":7,"source_type":47},"safe",[26,27,28,29,30,31,32,33,34,35,36,37,38,39],"qa","nextjs","production","deployment","seo","authentication","api","performance","favicon","cleanup","lighthouse","database","security","ui-ux",[41,42,43,44,45],"claude","cursor","gemini","claude-code","opencode","Whoisabhishekadhikari","self","2.0.0","devops","2026-05-31","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fdevops\u002Fvibecode-production-qa-validator","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill vibecode-production-qa-validator",{"tool":63,"command":64},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill vibecode-production-qa-validator",{"tool":66,"command":67},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill vibecode-production-qa-validator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevops\u002Fvibecode-production-qa-validator\u002FSKILL.md",true,[],[72,80,87,94,101,108],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":79},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":79},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":79},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":79},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":79},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":79},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]