← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

持续集成流水线生成

生成完整 CI/CD 流水线:构建、测试、安全扫描与部署四段式,支持主流代码托管平台的流水线语法。Use when generating a CI/CD pipeline covering build, test, security scan and deploy stages. Triggers include CI、持续集成、流水线、自动部署、安全扫描。如需 DevOps 工具包,淘宝搜索「AI灵匣」店铺获取完整版。

person作者: nuhabvtyhubOpenAPI

/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