Ci Setup Rapid
Streamline your workflow with this setup, comprehensive, pipeline, automated. Includes structured workflows, validation checks, and reusable patterns for deployment.
Ci Setup Rapid
Set up complete CI/CD pipelines with automated testing, security scanning, Docker builds, and multi-environment deployment.
When to Use This Command
Run this command when you need to:
- Bootstrap a complete CI/CD pipeline for a new project with testing, linting, and deployment stages
- Add security scanning, Docker image building, or multi-environment deployment to an existing pipeline
- Generate platform-specific workflow files for GitHub Actions, GitLab CI, or Jenkins
Consider alternatives when:
- You need to trigger an existing CI pipeline run (use power-ci-invoker)
- You want to test GitHub Actions workflows locally before pushing (use act-action)
Quick Start
Configuration
name: ci-setup-rapid type: command category: deployment
Example Invocation
claude command:run ci-setup-rapid --platform github-actions --stack node --features test,lint,docker,deploy
Example Output
[Detect] Project: Node.js (package.json found)
Framework: Next.js | Package manager: pnpm
Test runner: Jest | Linter: ESLint
[Generate] .github/workflows/ci.yml
Jobs created:
- lint-and-test (matrix: Node 18, 20)
- security-scan (npm audit + Snyk)
- docker-build (multi-stage, cached)
- deploy-staging (on develop branch)
- deploy-production (on main branch, manual approval)
[Configure] Branch protection rules recommended:
- Require lint-and-test to pass before merge
- Require 1 review approval
[Output] Pipeline file written: .github/workflows/ci.yml
Core Concepts
CI/CD Setup Overview
| Aspect | Details |
|---|---|
| Platforms | GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps |
| Stages | Lint, test, security scan, build, Docker, deploy (configurable) |
| Environments | Development, staging, production with gated promotions |
| Optimization | Dependency caching, parallel jobs, matrix builds |
Pipeline Architecture
[Push / PR]
|
[Lint + Format Check]
|
[Unit Tests (matrix)]---[Security Scan]
| |
[Build + Docker Image]-------+
|
[Deploy Staging] (develop branch)
|
[Deploy Production] (main + approval)
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| platform | string | github-actions | CI platform: github-actions, gitlab-ci, jenkins, or circleci |
| stack | string | auto | Technology stack: node, python, go, java, or rust (auto-detected) |
| features | string | test,lint | Comma-separated features: test, lint, security, docker, deploy |
| environments | string | staging,prod | Deployment environments to configure |
| cache | boolean | true | Enable dependency and build caching |
Best Practices
-
Start Minimal and Expand - Begin with
--features test,lintand add more stages as the team matures. A simple pipeline that everyone follows is better than a complex one that gets bypassed. -
Enable Caching from Day One - Dependency installation often takes longer than the actual tests. Enable caching immediately to keep feedback loops under 5 minutes.
-
Use Matrix Builds for Compatibility - Test against multiple runtime versions (e.g., Node 18 and 20) to catch compatibility issues before they reach production. Matrix builds run in parallel at no extra time cost.
-
Gate Production with Manual Approval - Automated deployment to staging is safe, but production deployments should require explicit approval. Configure environment protection rules on your CI platform.
-
Add Security Scanning Early - Integrate dependency vulnerability scanning from the start. Retrofitting security checks into an established pipeline is harder because existing vulnerabilities create noise.
Common Issues
-
Pipeline Fails on First Run Due to Missing Secrets - The generated workflow references secrets (e.g.,
DEPLOY_TOKEN) that must be added to your CI platform settings. Check the output for a list of required secrets. -
Cache Key Mismatch Across Branches - If different branches use different lockfile versions, cache hits will be inconsistent. Use lockfile hash as the cache key to ensure correct restoration.
-
Docker Build Exceeds CI Runner Memory - Multi-stage Docker builds on CI runners with limited memory may OOM. Add
--memorylimits to the Docker build step or use a larger runner instance.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.