taskrunner
Instructions for running project tasks. Use this when you need to run a project-specific command or workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions for running project tasks. Use this when you need to run a project-specific command or workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guidance on using Git. Load this skill always before invoking `git` in the project in anyway
Skill file for working with SASS styling in this project. Use when you need to edit `*.scss` files.
Testing guidance for working with Vitest and Playwright. Use this skill before running tests, writing new
Instructions for managing the Cloudflare infrastructure with Terraform. Use this when you need to work with Terraform or Cloudflare resources.
Instructions for using Playwright to test the blog. Use this when you need to write, run or debug Playwright tests for the blog.
Review blog posts and pages for grammar, style, frontmatter validity, technical accuracy, and SEO. Use this when asked to review, proofread, or validate Markdown content.
| name | taskrunner |
| description | Instructions for running project tasks. Use this when you need to run a project-specific command or workflow. |
Instructions for running project tasks. All commands use Task as the task runner (see Taskfile.yaml).
# Install dependencies (frozen lockfile, runs once per session)
task install
# Start development server with hot reload (cleans cache first)
task dev
# Create new blog post or page interactively
task new
# Generate GraphQL TypeScript types (skipped if src/gatsby-types.d.ts exists)
task typegen
# Lint codebase (tsc --noEmit + biome check)
task lint
# Format and lint codebase (biome check --write + terraform format)
task format
# Run full test suite (lint → unit → component → build → e2e)
task test
# Build for production
task build
# Serve production build locally on port 8000
task serve
# Clear build cache and delete src/gatsby-types.d.ts
task clean
task test:unit always collects coverage (--coverage is baked into the task) and enforces the 100% threshold from vitest.config.ts. Filtering to a single file (as below) scopes the coverage report — and the threshold check — to just the files that test loads, so it stays accurate for one-file runs and won't fail because of unrelated gaps elsewhere in the codebase; it will still fail if the filtered file itself isn't fully covered.
# Run specific unit test file
task test:unit -- src/__tests__/unit/helpers.test.ts
# Run specific component test file
task test:component -- src/__tests__/components/article.test.tsx
# Run unit tests in watch mode
task test:unit:watch
# Run component tests in watch mode
task test:component:watch
# Run specific e2e test
task test:e2e -- src/__tests__/feature/index.test.ts
# Run e2e tests with UI mode
task test:e2e -- --ui
task lint # Verify no type errors or lint violations
task test:unit # Run unit tests
task lint # Verify no type errors or lint violations
task test:component # Run component tests in real browsers
task test # Full suite: lint → unit → component → build → e2e
task build # Verify the site builds successfully with the new content
The Terraform modules are exposed as root-level namespaces — no cd needed (see the terraform skill for details):
# Core infrastructure (runs in infra/cloudflare/)
task terraform:validate
task terraform:plan
task terraform:deploy
# Site deployment (runs in infra/site; needs `task build` first)
task site:validate
task site:plan WORKSPACE=pr-123
task site:deploy WORKSPACE=pr-123
task site:destroy WORKSPACE=pr-123
Gotcha: only pass -- <extra args> to tasks that run a single command. Multi-command tasks (e.g. site:destroy, site:plan) append {{.CLI_ARGS}} to every command they run, so extra flags break intermediate steps like terraform workspace select.
task terraform:validate && task terraform:plan # Validate and preview changes
task site:validate # When infra/site was touched