---
name: cicd-pipeline-config-writer
description: "A production-ready CI/CD pipeline file for your platform and stack, with the stages, triggers, caching, and environment separation you pick. Use when a developer needs a CI/CD config file for a stated tool, stack, and deployment target. Do not use for debugging a failing pipeline or infrastructure provisioning. Related topics: devops, coding, pipeline."
---

# CI/CD Pipeline Config Writer

A production-ready CI/CD pipeline file for your platform and stack, with the stages, triggers, caching, and environment separation you pick.

## When to use

Use this skill when a developer needs a CI/CD config file for a stated tool, stack, and deployment target. Do not use it for debugging a failing pipeline or infrastructure provisioning.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Map the chosen stages to jobs and decide which can run in parallel and which must wait.
3. Write the config in the chosen tool's syntax with dependency caching keyed on the lockfile.
4. Add the trigger rules and restrict production deploys to main or a tag, with approval where supported.
5. Reference secrets by name only and list each one the user must create.
6. Add first-run setup steps, done when someone could commit the file and get a green run.

## Inputs

- **CI/CD tool** (choose one: GitHub Actions, GitLab CI, CircleCI, Bitbucket Pipelines, Jenkins)
- **Project type** (choose one: Node.js or React, Python, Flutter, Docker container, Static site, Ruby on Rails, Go)
- **Stages to include** (choose any: Install dependencies, Lint, Unit tests, Integration tests, Build, Docker build and push, Deploy to staging, Deploy to production, Notify on Slack or Teams)
- **Deployment platform** (choose one: Firebase Hosting, AWS, GCP, Azure, Heroku, Vercel, DigitalOcean, Self-hosted)
- **Environments** (choose any: Development, Staging, Production)
- **Triggers** (choose any: Push to main, Pull request, Tag release, Manual trigger, Scheduled)

## Output

The complete pipeline file with per-job comments, a list of required secrets, and short first-run setup steps.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### CI/CD Pipeline Configuration

Write the pipeline configuration for the setup below.

- CI/CD tool: {{CI/CD tool}}
- Project type: {{Project type}}
- Stages to include: {{Stages to include}}
- Deployment platform: {{Deployment platform}}
- Environments: {{Environments}}
- Triggers: {{Triggers}}

Output the complete config file for the chosen tool with a comment on each job. Cache dependencies keyed on the lockfile, run independent jobs in parallel, and make deploy jobs depend on passing tests. Deploy production only from main or a tag, and gate it behind approval where the tool supports it. Reference secrets by name from the platform secret store and list every secret to create. Never write a credential into the file. End with a short list of first-run setup steps.

## Pitfalls

- Allowing production deploys from pull request branches.
- Embedding tokens or keys in the file instead of referencing the secret store.
- Caching on a key that never changes, which serves stale dependencies.
