.claude/skills/pre-deploy-checklist/SKILL.md
# Pre-Deployment Checklist Skill ## Purpose Run comprehensive quality checks before committing code and creating pull requests. This skill ensures code quality, documentation, API specs, and tests are all in order before deployment. ## When to Use This Skill - Before committing significant changes - Before creating a pull request - When user invokes `/ship`, `/pre-deploy`, or `/checklist` - When preparing code for production deployment ## Checklist Items ### 1. TypeScript Compilation **Com
npx skillsauth add adteco/glapi .claude/skills/pre-deploy-checklistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run comprehensive quality checks before committing code and creating pull requests. This skill ensures code quality, documentation, API specs, and tests are all in order before deployment.
/ship, /pre-deploy, or /checklistCommand: pnpm type-check or npx tsc --noEmit
Purpose: Ensure no type errors
Required: Yes
Command: pnpm lint or npx eslint .
Purpose: Code style and best practices
Required: Yes
Command: pnpm build
Purpose: Ensure production build succeeds
Required: Yes (for PRs)
Command: pnpm --filter @glapi/trpc generate-openapi (project-specific)
Purpose: Ensure API documentation matches code
Check: Compare generated spec with committed spec
Required: If API routes changed
Command: Check for apps/docs/scripts/validate-snippets.ts and run if exists
Purpose: Validate code snippets in documentation
Required: If docs exist
Commands:
pnpm test or vitest runpnpm test:e2e or playwright test
Purpose: Ensure tests pass
Required: Tests covering changed codeCheck: CHANGELOG.md modified if user-facing changes Purpose: Document changes for users Required: For features and fixes
Check: New migrations run successfully
Command: source .env && psql "$DATABASE_ADMIN_URL" -f <migration>
Required: If schema changed
Check: New tables have Row Level Security policies Purpose: Multi-tenant data isolation Required: For new database tables
Check: No .env, credentials, API keys in staged files Purpose: Security Required: Always
1. Identify what changed (git status, git diff)
2. Run applicable checks based on changes
3. Report results with pass/fail status
4. Block commit if critical checks fail
5. Warn for advisory checks
The skill auto-detects project capabilities:
| File/Directory | Capability |
|----------------|------------|
| package.json with type-check script | TypeScript checking |
| package.json with lint script | Linting |
| packages/trpc/scripts/generate-openapi.ts | OpenAPI generation |
| apps/docs/ | Documentation |
| CHANGELOG.md | Changelog tracking |
| tests/ or __tests__/ | Test suites |
| packages/database/drizzle/ | Migrations |
| .env.example | Environment variables |
Pre-Deployment Checklist
========================
[PASS] TypeScript Compilation
[PASS] Linting
[PASS] Build
[WARN] OpenAPI Spec - regenerate with: pnpm --filter @glapi/trpc generate-openapi
[FAIL] Tests - 2 failing in contacts.spec.ts
[SKIP] Changelog - no user-facing changes detected
[PASS] No Secrets Detected
Summary: 4 passed, 1 warning, 1 failed, 1 skipped
Action Required:
- Fix failing tests before committing
- Consider regenerating OpenAPI spec
Invoke with /ship or /pre-deploy command
Add to .claude/settings.json:
{
"hooks": {
"PreCommit": {
"command": "claude-code skill pre-deploy-checklist"
}
}
}
Run checks in GitHub Actions or other CI systems
This skill is designed to be portable. Copy the skill to any project's .claude/skills/ directory. It will:
Create .claude/pre-deploy-config.json to customize:
{
"required_checks": ["typescript", "lint", "build"],
"skip_checks": ["changelog"],
"custom_commands": {
"openapi": "pnpm generate:api-spec",
"test": "pnpm test:unit"
},
"paths": {
"changelog": "CHANGELOG.md",
"migrations": "db/migrations"
}
}
tools
Create and manage Claude Code skills following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns, file paths, content patterns), enforcement levels (block, suggest, warn), hook mechanisms (UserPromptSubmit, PreToolUse), session tracking, and the 500-line rule.
development
Row Level Security (RLS) implementation guide for GLAPI multi-tenant database isolation. Covers PostgreSQL RLS policies, session variables, contextual database connections, tRPC middleware, and common troubleshooting. Use when working with RLS, multi-tenancy, organization isolation, database security, or debugging RLS policy violations.
development
Frontend development guidelines for Adteco's React 18/19 + ShadCN/Radix UI + Tailwind stack. Patterns for building accessible, performant components with type safety, TanStack Query data fetching, and modern styling.
development
GLAPI backend development guide for Next.js + TRPC + Drizzle ORM + PostgreSQL + Clerk. TRPC for internal type-safety, REST API exposure via OpenAPI. Covers layered architecture (routers → services → Drizzle), dual TRPC/REST endpoints, Clerk authentication, and testing strategies.