| name | ci |
| description | Generate or update CI/CD pipeline configuration for the current stack. |
/ci
Generate or update CI/CD pipeline configuration for the current stack.
Usage
/ci [action] [--platform <platform>] [--fix]
Arguments
action: generate, update, fix, status (default: generate)
--platform: CI platform — github (default), gitlab, bitbucket
--fix: Diagnose and fix a failing CI pipeline
Instructions
When this skill is invoked:
Agent Behavior
Autonomy:
- Read the tech stack and generate a complete, working pipeline
- Replace all placeholders with actual commands
- Validate the pipeline configuration
Safety:
- Never overwrite existing CI config without showing diff
- Preserve custom jobs the user has added
- Use environment secrets for sensitive values
Actions
Generate (/ci generate)
Create CI/CD pipeline from scratch:
- Read
prd/00_technology.md for commands and tools
- Read
.github/workflows/README.md for pipeline documentation
- Read
ci.yml.example as the base template
- Replace all
{placeholders} with actual commands
- Write
.github/workflows/ci.yml
- Validate YAML syntax
Pipeline stages (required):
jobs:
lint:
typecheck:
test:
security:
build:
Pipeline stages (optional, add if applicable):
deploy-staging:
deploy-production:
e2e:
Update (/ci update)
Update existing pipeline:
- Read current
.github/workflows/ci.yml
- Compare against
prd/00_technology.md for any command changes
- Identify stale placeholders or outdated commands
- Apply updates while preserving custom jobs
- Show diff before writing
Fix (/ci fix)
Diagnose and fix failing CI:
- Check recent CI runs:
gh run list --limit 5
- Get failure details:
gh run view {run_id} --log-failed
- Diagnose the failure:
- Missing dependencies
- Environment variable not set
- Test failures
- Version mismatches
- Apply fix and push
Status (/ci status)
Show current CI pipeline health:
gh run list --limit 10
gh workflow list
Platform-Specific Configuration
GitHub Actions (default)
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: {setup_action}
- run: {install_command}
- run: {lint_check_command}
- run: {format_check_command}
Mobile-Specific Jobs
iOS (Fastlane):
build-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: bundle install
- run: bundle exec fastlane test
- run: bundle exec fastlane build
Android (Gradle):
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- run: ./gradlew test
- run: ./gradlew assembleRelease
Docker Build
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: .
push: false
tags: app:test
cache-from: type=gha
cache-to: type=gha,mode=max
CI Config Checklist
Example Output
$ /ci generate --platform github
Reading tech stack...
Language: Python 3.13
Package Manager: uv
Test: pytest
Lint: ruff
Type Check: mypy
Generating .github/workflows/ci.yml...
Pipeline:
1. lint → uv run ruff check src/ tests/
2. typecheck → uv run mypy src/
3. test → uv run pytest --cov=src --cov-fail-under=66
4. security → uv run pip-audit && uv run bandit -r src/
5. build → docker build -t app:test .
Created .github/workflows/ci.yml
Validated YAML syntax: OK
Next steps:
1. Review the generated pipeline
2. Add repository secrets (if needed): Settings → Secrets
3. Push to trigger first run