taskfile
Execute Taskfile commands for the Summerhouse project. Use for terraform operations (init, plan, apply, destroy, output), backend/frontend development, testing, and linting. Terraform uses environments (dev, prod) in infrastructure/environments/.
When & Why to Use This Skill
This Claude skill serves as a comprehensive automation interface for the Summerhouse project, utilizing Taskfile to streamline infrastructure management and full-stack development. It specializes in orchestrating complex Terraform operations across multiple environments (dev, prod) while providing a unified command set for backend FastAPI and frontend Next.js workflows, ensuring consistent deployment and development standards.
Use Cases
- Automating Terraform Infrastructure-as-Code (IaC) lifecycles, including secure initialization, planning, and execution of resource changes in specific environments like dev or prod.
- Streamlining local full-stack development by managing dependency installations and launching concurrent development servers for both Next.js and FastAPI projects.
- Enforcing CI/CD best practices through automated linting, type checking, and comprehensive testing suites (Pytest, Vitest, and Playwright E2E).
- Managing environment-specific configurations and database seeding to ensure parity between local development and cloud-deployed infrastructure.
- Implementing safety guardrails for destructive cloud operations by requiring plan reviews and preventing direct, unmanaged CLI commands.
| name | taskfile |
|---|---|
| description | Execute Taskfile commands for the Summerhouse project. Use for terraform operations (init, plan, apply, destroy, output), backend/frontend development, testing, and linting. Terraform uses environments (dev, prod) in infrastructure/environments/. |
Taskfile Commands
This skill helps execute Taskfile.yaml commands for the Summerhouse booking platform.
CRITICAL RULE
NEVER run terraform or terragrunt commands directly. ALL infrastructure commands MUST use the Taskfile.
Terraform Commands
Command Pattern
task tf:<action>:<env>
Where:
<action>is: init, plan, apply, destroy, output<env>is a directory name ininfrastructure/environments/(e.g., dev, prod)
Available Terraform Commands
| Command | Description |
|---|---|
tf:init:<env> |
Initialize Terraform with backend config |
tf:plan:<env> |
Preview changes |
tf:apply:<env> |
Apply changes |
tf:destroy:<env> |
Destroy all resources |
tf:output:<env> |
Show output values |
tf:fmt |
Format all Terraform files |
tf:validate |
Validate configuration syntax (run after init) |
tf:envs |
List available environments |
Discovering Environments
# List all available environments
task tf:envs
# Or directly check the directory
ls infrastructure/environments/
Environments are defined by directories in infrastructure/environments/<name>/. Each has:
backend.hcl- S3 backend configurationterraform.tfvars.json- Environment-specific variables
Typical Terraform Workflow
# 1. List available environments
task tf:envs
# 2. Initialize Terraform
task tf:init:dev
# 3. Preview changes
task tf:plan:dev
# 4. Apply changes (after review)
task tf:apply:dev
# 5. View outputs
task tf:output:dev
Backend Commands (Python/FastAPI)
| Command | Description |
|---|---|
backend:install |
Install Python deps with uv |
backend:dev |
Run FastAPI dev server on :3001 |
backend:test |
Run pytest |
backend:test:coverage |
Run pytest with coverage |
backend:lint |
Run ruff linter |
backend:typecheck |
Run mypy type checker |
Frontend Commands (Next.js)
| Command | Description |
|---|---|
frontend:install |
Install deps with Yarn |
frontend:dev |
Run Next.js dev server on :3000 |
frontend:build |
Build static export |
frontend:test |
Run Vitest unit tests |
frontend:test:e2e |
Run Playwright E2E tests |
frontend:lint |
Run eslint |
Combined Commands
| Command | Description |
|---|---|
install |
Install all dependencies (backend + frontend) |
dev |
Run both dev servers |
test |
Run all tests |
lint |
Lint all code |
Other Commands
| Command | Description |
|---|---|
types:generate |
Generate TypeScript types from Pydantic models |
seed:<env> |
Seed database with test data |
Instructions
When the user asks to run infrastructure or development operations:
- Terraform operations: ALWAYS use
task tf:<action>:<env>pattern - Identify environment: Ask which environment if not specified, or run
task tf:envs - Destructive operations: For
applyanddestroy, showplanoutput first and confirm - Never bypass: If a task command fails, report the error - do NOT run raw terraform
Examples
User: "Initialize terraform for dev"
Action: Run task tf:init:dev
User: "Plan changes for production"
Action: Run task tf:plan:prod
User: "Deploy to dev"
Action: Run task tf:plan:dev, show output, then task tf:apply:dev after confirmation
User: "What environments are available?"
Action: Run task tf:envs
User: "Run backend tests"
Action: Run task backend:test
User: "Start the dev servers"
Action: Run task dev
User: "Validate terraform syntax"
Action: Run task tf:init:dev first (if needed), then task tf:validate