infrastructure-ci-cd-game
Use when setting up CI/CD pipelines, GitHub Actions workflows, deployment automation, migration safety, or staging environments for game projects. Triggers: CI/CD, GitHub Actions, deployment, pipeline, staging.
Best use case
infrastructure-ci-cd-game is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when setting up CI/CD pipelines, GitHub Actions workflows, deployment automation, migration safety, or staging environments for game projects. Triggers: CI/CD, GitHub Actions, deployment, pipeline, staging.
Teams using infrastructure-ci-cd-game should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ci-cd-game/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How infrastructure-ci-cd-game Compares
| Feature / Agent | infrastructure-ci-cd-game | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when setting up CI/CD pipelines, GitHub Actions workflows, deployment automation, migration safety, or staging environments for game projects. Triggers: CI/CD, GitHub Actions, deployment, pipeline, staging.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# CI/CD for Games
## Purpose
GitHub Actions pipelines, test strategies, migration safety, and staging environments for game projects.
## When to Use
Trigger: CI/CD, GitHub Actions, deployment, pipeline, testing, staging, migration, continuous integration, continuous deployment, build pipeline, release
## Prerequisites
- `postgres-game-schema` — migration safety
- `game-backend-architecture` — what we're deploying
## Core Principles
1. **Never deploy without tests** — automated tests gate every deployment
2. **Migrations are one-way** — never run destructive migrations in production without backup
3. **Staging mirrors production** — test with real data shapes, real Redis, real PostgreSQL
4. **Feature flags over branches** — deploy dark features, enable via config
5. **Rollback plan always** — every deployment has a revert strategy
6. **Monitor after deploy** — `monitoring-game-ops` alerts catch post-deploy issues
## Pipeline Stages
```
Push → Lint → Type Check → Unit Tests → Build → Integration Tests → Deploy Staging → Smoke Tests → Deploy Production
```
## Step-by-Step: CI Pipeline
Set up CI with Bun + GitHub Actions:
1. **Use `oven-sh/setup-bun@v2`** — not `actions/setup-node`. Bun is the runtime.
2. **Cache bun install**:
```yaml
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
```
3. **Steps in order**:
- `bun install --frozen-lockfile` — reproducible installs
- `bunx biome check .` — lint and format check
- `bun run typecheck` — TypeScript strict mode
- `bun test` — unit and integration tests
4. **Environment variables for tests**:
- `DATABASE_URL` — Neon test branch connection string
- `REDIS_URL` — test Redis instance
See `boilerplate/ci.yml` for the complete workflow.
## Step-by-Step: Deploy Pipeline
1. **Drizzle migration job** (runs before deploy):
- Separate job that runs `bunx drizzle-kit migrate` with production `DATABASE_URL`
- Deploy job declares `needs: migrate` so it only runs after migrations succeed
2. **Deploy to Fly.io**:
- Use `superfly/flyctl-actions/setup-flyctl@master` to install flyctl
- Run `flyctl deploy --remote-only` — builds on Fly's infrastructure, no local Docker required
- Auth via `FLY_API_TOKEN` secret
3. **Post-deploy health check**:
```bash
APP_NAME=$(flyctl info --json | jq -r '.Name')
curl --retry 5 --retry-delay 10 -f "https://${APP_NAME}.fly.dev/health"
```
4. **Rollback strategy**:
- Fly.io machines support instant rollback: `flyctl releases rollback`
- Every deploy creates a new release — previous release is always available
- Combine with feature flags to disable broken features without a full rollback
See `boilerplate/deploy.yml` for the complete workflow.
## Neon Database Branching
For preview environments (per-PR Neon branching):
- Neon supports database branches — each PR gets its own isolated database branch
- Use `neondatabase/create-branch-action@v5` in GitHub Actions:
```yaml
- uses: neondatabase/create-branch-action@v5
id: create_branch
with:
project_id: ${{ secrets.NEON_PROJECT_ID }}
branch_name: preview/pr-${{ github.event.number }}
api_key: ${{ secrets.NEON_API_KEY }}
```
- Branch connection string available as `${{ steps.create_branch.outputs.db_url }}`
- Delete branch on PR close with `neondatabase/delete-branch-action@v3`
- This gives each PR a real isolated database — no shared test state pollution
## boilerplate/ci.yml and boilerplate/deploy.yml
See `boilerplate/ci.yml` for a complete, production-ready CI workflow and `boilerplate/deploy.yml` for the deployment workflow with migration safety. Both files are ready to copy into `.github/workflows/`.
## Cross-References
- `postgres-game-schema` — migration safety in deployments
- `monitoring-game-ops` — post-deployment monitoring
- `game-backend-architecture` — server deployment targets
## Sources
- GitHub Actions documentation
- "Continuous Delivery for Games" — GDC DevOps talksRelated Skills
game-lore
Adds or updates a single world lore entry (faction, location, NPC, or event) — validates against existing lore for consistency, applies the right template, and updates docs/world-lore.md. Extract the entry type (faction/location/npc/event) and name from the user's message.
game-expand
Adds a new feature to an existing MVP plan — scoped architect interview, scope validation against original plan, and integration into the build sequence. Extract the feature name or description from the user's message. Requires docs/mvp-first-draft.md — run game-architect first.
game-build
Builds a game component from the MVP plan — production TypeScript + Vitest tests + mock dependencies + build registry tracking. Extract the component name from the user's message (or "status" to check progress). Requires docs/mvp-first-draft.md — run game-architect first.
game-balance
Analyzes a game system against design principles — economy health metrics, difficulty curve, reward schedules, and progression cost curves. Flags imbalances with severity levels. Use after creating an MVP plan with game-architect. Extract the analysis scope (economy/difficulty/progression/rewards/all) from the user's message.
game-architect
Comprehensive game MVP interviewer and planner. Interviews you in progressive groups, researches genre conventions and reference games, then produces an actionable MVP First Draft with starter project files. Use when starting a new game project from scratch.
narrative-story-structure-game
Use when designing interactive narratives, branching storylines, player agency systems, non-linear story structures, or act frameworks for games. Triggers: branching narrative, player agency, story arc, interactive story, dialogue.
infrastructure-monitoring-game-ops
Use when implementing game monitoring, structured logging, player telemetry, alerting rules, or performance budgets. Triggers: monitoring, logging, telemetry, alerts, observability, metrics.
infrastructure-cursor-codex-integration
Use when configuring Cursor IDE or OpenAI Codex for game development — .cursorrules files, prompt conventions, context injection. Triggers: cursor, .cursorrules, codex, IDE setup.
infrastructure-claude-code-game-workflow
Use when starting a game project, choosing which skill to read, or navigating the game-dev skill ecosystem. Entry point for AI agents working on game development. Triggers: workflow, which skill, how to start, game project setup.
engineering-stripe-game-payments
Use when implementing game payments, in-app purchases, subscriptions, Stripe webhooks, or monetization flows. Triggers: payments, IAP, subscription, Stripe, checkout, webhooks, monetization.
engineering-redis-game-patterns
Use when implementing Redis patterns for games — caching, leaderboards, pub/sub messaging, session storage, rate limiting, or ephemeral game state. Triggers: Redis, cache, leaderboard, pub/sub, rate limit, session.
engineering-postgres-game-schema
Use when designing game database schemas, player data models, inventory systems, or working with Drizzle ORM and PostgreSQL for games. Triggers: database, schema, Drizzle, players, inventory, leaderboards, game data.