본문으로 건너뛰기
cccskills
무료GitHub에 공개

cicd-setup

When the user needs to set up or improve CI/CD pipelines — GitHub Actions, GitLab CI, deployment automation, or says "set up CI", "automate deployment", "add tests to pipeline", "fix my build".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHubGitLabVercel
설치 방법 보기

포함된 파일(1)

  • SKILL.md6.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

CI/CD Setup

When to Use

  • Setting up CI for a new project from scratch
  • Replacing unreliable copied pipeline configurations that do not match the actual stack
  • Transitioning between GitHub Actions and GitLab CI platforms
  • Reviewing whether pipeline stages align with actual project tooling
  • Optimizing slow builds (caching, parallelism, conditional steps)
  • Establishing a stable CI foundation before adding specialized hardening

Context Required

From startup-context: tech stack, deployment target, team size. Also detect or ask:

  • Language and framework (auto-detect from repo files before asking)
  • Deployment target (Vercel, AWS, GCP, Fly.io, etc.)
  • CI/CD platform (default: GitHub Actions; also supports GitLab CI)
  • Environments (dev, staging, production) and existing test coverage
  • Secrets and credentials needed for build or deploy

Workflow

  1. Detect stack from repo signals — Scan for lockfiles (package-lock.json, yarn.lock, poetry.lock, go.sum, Cargo.lock), language manifests (package.json, pyproject.toml, go.mod), and script definitions (test, lint, build commands). Lockfiles indicate package manager choice. Absent scripts trigger conservative defaults. Never assume Node for a Python project.
  2. Choose pipeline stages — Start with a dependable baseline: checkout, runtime setup, dependency install with caching, then sequential lint, test, build. Only add complexity after the baseline works.
  3. Generate pipeline config — Write CI config for the detected platform. Output machine-readable YAML with correct caching strategy for the detected package manager. Verify all referenced commands actually exist in the project.
  4. Configure secrets — List required secrets and how to add them. Use platform-managed secret stores. Recommend OIDC for cloud auth over long-lived keys. Never hardcode credentials in YAML.
  5. Add deployment stages safely — Begin CI-only (lint/test/build). Add staging deployment with explicit environment info. Add production deployment with manual approval. Maintain transparency in rollout and rollback procedures.
  6. Validate before merge — Confirm generated YAML is syntactically valid, all commands exist in the project, caching aligns with the package manager, and branch protections match organizational requirements.
  7. Deliver config and instructions — Full config file plus setup steps.

Output Format

# CI/CD Pipeline: [Project Name]
## Stack Detection Results — detected language, runtime, tools, and build commands
## Pipeline Overview — Mermaid flowchart showing stages
## Pipeline Configuration — Full YAML config file
## Secrets Required — table: name, where to get, how to add
## Setup Instructions — step-by-step to activate
## Validation Checklist — commands verified, caching confirmed, branch rules set
## Optimization Notes — caching strategy, estimated build time

Frameworks & Best Practices

Detection-First Pipeline Generation

Always detect before generating. The detector relies on concrete file signals:

  • Lockfiles indicate package manager choice (npm, yarn, pip, cargo, go modules)
  • Language manifests identify runtime families
  • Script definitions in package.json/pyproject.toml inform lint/test/build commands
  • Absent scripts trigger conservative default commands rather than assumptions

Caching Strategies by Ecosystem

EcosystemCache PathCache Key
Node.js~/.npm or node_moduleshashFiles('**/package-lock.json')
Python~/.cache/piphashFiles('**/requirements*.txt')
Go~/go/pkg/modhashFiles('**/go.sum')
Rust~/.cargo/registry, target/hashFiles('**/Cargo.lock')
Rubyvendor/bundlehashFiles('**/Gemfile.lock')

Pipeline Architecture Principles

  • Lint first — fail early before expensive test runs
  • Sequential baseline — checkout, install, lint, test, build, then artifact publish
  • Cache aggressively — cuts 30-60% off build times
  • Pin action versions — use SHA hashes, not tags, for supply chain security
  • Set timeouts (timeout-minutes: 15) and concurrency to cancel redundant runs
  • One enhancement at a time — do not add matrix builds, security scanning, and deployment in one PR

Environment Strategy

EnvironmentTriggerApprovalPurpose
CIEvery push/PRNoneRun lint + tests
StagingMerge to mainNone (auto)Integration testing, QA
ProductionGit tag or manualRequiredLive users

Common Pitfalls

  1. Applying Node-specific pipelines to Python or Go repos (detect first)
  2. Enabling deployment before establishing reliable test coverage
  3. Overlooking dependency caching configuration
  4. Running full matrix builds on minor branch updates (use path filters)
  5. Omitting branch protections on production deployments
  6. Embedding credentials directly in pipeline YAML

Scaling & Platform Notes

  • Split long-running jobs when execution exceeds 10 minutes
  • Implement test matrices only when genuine compatibility concerns exist
  • GitHub Actions for GitHub ecosystem; GitLab CI for self-hosted SCM+CI
  • Maintain a single canonical pipeline source per repository

Related Skills

  • code-review — chain to review the CI config itself before committing
  • security-review — chain to add or audit security scanning stages (trivy, semgrep, npm audit)

Examples

Example prompt: "Set up CI/CD for my Next.js app deployed on Vercel."

Good output snippet:

name: CI
on:
  push: { branches: [main] }
  pull_request: { branches: [main] }
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
jobs:
  lint:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: 'npm' }
      - run: npm ci
      - run: npm run lint && npx tsc --noEmit
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: 'npm' }
      - run: npm ci && npm test -- --coverage

Example prompt: "My Python CI takes 8 minutes, how do I speed it up?"

Good output snippet:

Stack detection shows: Python 3.11, pytest, pip. Three fixes to cut to ~3 minutes:
(1) Add pip caching keyed on hashFiles('requirements*.txt'),
(2) split unit/integration tests into parallel jobs,
(3) add path filters to skip CI on docs-only changes.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

When the user wants to apply to startup accelerators, incubators, or fellowship programs. Also use when the user mentions "YC application", "Techstars", "accelerator", or "apply to programs".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

When the user needs to design or evaluate system architecture — service boundaries, data models, API contracts, infrastructure topology, database selection, or dependency analysis. Also activate for "design the system", "how should I architect this", "monolith vs microservices", or architecture decision records.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

When the user needs to write a monthly or quarterly investor update, prepare a board deck, or communicate company progress to stakeholders.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

When the user needs to identify at-risk accounts, understand why customers are leaving, reduce churn rate, build health scores, design save plays, or create win-back campaigns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

When the user asks for a code review, shares code for feedback, or says "review this", "check my code", "what's wrong with this". Also activate when reviewing a pull request or diff.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

When a founder needs to write cold emails or LinkedIn messages to prospects, partners, or investors. Activate when the user mentions cold email, outbound, prospecting, LinkedIn outreach, or needs help getting replies from people who don't know them.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

shawnpang/startup-founder-skills3652026년 3월 17일 업데이트

shawnpang의 스킬 모두 보기

이 스킬의 문제 신고