Check if task is already complete, verify dev server status and port, check TypeScript compilation status, verify required dependencies are installed, and load all required skills upfront. Use at the start of every task to ensure proper environment setup and avoid wasted effort.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Check if task is already complete, verify dev server status and port, check TypeScript compilation status, verify required dependencies are installed, and load all required skills upfront. Use at the start of every task to ensure proper environment setup and avoid wasted effort.
Pre-Flight Checklist
Overview
Systematic checklist to verify environment setup and task status before starting work. Prevents wasted effort on already-complete tasks and ensures proper environment configuration.
Checklist Items
1. Check if Task is Already Complete
Before starting work, verify task status:
Read task file: tasks/next_task.md
Read progress file: tasks/progress.txt
Check completion status: Is task already marked complete?
Check if server is running: Look for process on port
Detect actual port: Check vite.config.ts, package.json, terminal output
: Poll server endpoint
Verify server health
Start server if needed: npm run dev
Reference: See dev-server-port-detection skill for port discovery patterns.
Pattern:
# Check if server is running
lsof -i :3000 || lsof -i :5173
# Check port configuration
grep -A 5 "server:" vite.config.ts
grep -i "port" package.json
# Verify server health
curl -s http://localhost:3000 > /dev/null && echo"Server is running"
Backend / Server (for backend tasks)
Before the first API test:
Check that the target port is free (e.g. lsof -i :PORT) or that a single dev server is listening.
Start command: use an explicit directory (e.g. cd /absolute/path/to/backend && npm run dev).
Optional: short-timeout health check (e.g. curl -f http://localhost:PORT/api/health --max-time 5).
Auth tasks: First register/login may be slow (e.g. bcrypt). Use request timeouts (e.g. 10–15 s) for register/login checks (e.g. curl --max-time 10).
Path convention (monorepos)
Backend library code lives under backend/src/lib/, not backend/lib/.
Confirm the backend app root for the repo before creating API or lib files.
3. Check TypeScript Compilation Status
Before making changes, verify current compilation status:
Run TypeScript check: npx tsc --noEmit
Fix any existing errors: Don't add to broken codebase
Verify compilation passes: Must pass before proceeding
Reference: See typescript-incremental-check skill for compilation patterns.
Pattern:
# Check TypeScript compilation
npx tsc --noEmit
# If errors exist, fix them first# Then proceed with task
4. Verify Required Dependencies are Installed
Before using packages, verify dependencies:
Check package.json: Required packages listed
Check node_modules: Packages installed
Run npm install if needed: Install missing dependencies
Pattern:
# Check if node_modules existsls node_modules
# Install if needed
npm install
# Verify specific package
npm list <package-name>
5. Load All Required Skills Upfront
Before starting implementation, discover and load skills:
Search all skills: search_skills("") to list all
Load relevant skills: Load skills needed for task
Reference skill documentation: Read skill docs before using
Reference: See agent-workflow-guidelines skill for skill discovery workflow.