# CI

> Generate a CI/CD pipeline — build, test, security scan, deploy. Supports GitHub Actions, GitLab CI, Bitbucket Pipelines.

- Skill: `khaitrang1995/ci` (Agent Skill)
- Install (CLI): `npx skillmds@latest add khaitrang1995/ci`
- Raw SKILL.md: https://api.skillmd.com/api/skills/khaitrang1995/ci/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: KhaiTrang1995 (https://skillmd.com/u/khaitrang1995)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/khaitrang1995/ci

---


# /ci — Generate a CI/CD Pipeline

## Input examples
```
/ci .NET 10 --platform bitbucket --with-scan
/ci Angular + .NET fullstack --platform github --with-deploy
/ci Python FastAPI --platform gitlab --with-scan --with-deploy
```

## Pipeline stages

### 1. Build
- Restore dependencies
- Compile/build
- Build the Docker image (if containerized)

### 2. Test
- Unit tests + coverage report
- Lint (dotnet format / eslint / ruff)

### 3. Security Scan (if `--with-scan`)
- Dependency audit (dotnet list --vulnerable / npm audit / pip audit)
- Source code security scan
- Container image scan (Trivy)

### 4. Deploy (if `--with-deploy`)
- Push image to registry
- Deploy to staging (automatic)
- Deploy to production (manual approval)

## Output
```
.github/workflows/ci.yml          ← (GitHub Actions)
bitbucket-pipelines.yml            ← (Bitbucket)
.gitlab-ci.yml                     ← (GitLab)
```

## Rules
- Cache dependencies between runs
- Fail fast: a failed test skips deploy
- Secrets via CI/CD variables, NEVER hardcoded
- Production deploy requires manual approval

## References
- @.claude/rules/docker-conventions.md

