一键导入
setup-ci
Set up CI/CD workflows via interactive questionnaire — unit tests, build, coverage, linting, deploy, and custom actions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up CI/CD workflows via interactive questionnaire — unit tests, build, coverage, linting, deploy, and custom actions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Write personal blog posts with the rhythm, structure, and voice of top-tier essayists (Paul Graham, Dan Luu, Henrik Karlsson, Ben Kuhn, etc.)
Add a new feature with design, TDD, and PR workflow
Audit a codebase for security vulnerabilities, code quality issues, and architecture concerns
Use when the user says "autopilot", "auto mode", "替我回答", or "自动回答". Enables autonomous decision-making by answering Claude's own questions based on the user's personality profile.
Fix a bug with systematic debugging, TDD, and PR workflow
Create a git release — tag, push, and create GitHub release
| name | setup-ci |
| description | Set up CI/CD workflows via interactive questionnaire — unit tests, build, coverage, linting, deploy, and custom actions |
| user_invocable | true |
Generate GitHub Actions CI/CD workflows by collecting project requirements through a questionnaire.
git checkout main && git pull
git worktree add .claude/worktrees/chore-setup-ci -b chore/setup-ci
cd .claude/worktrees/chore-setup-ci
All work happens in the worktree — main stays clean.
Before asking questions, scan the project to pre-fill answers:
package.json (Node.js), pyproject.toml/setup.py/requirements.txt (Python), Cargo.toml (Rust), go.mod (Go), pom.xml/build.gradle (Java), Gemfile (Ruby), etc.scripts.build in package.json, Makefile targets, etc..github/workflows/ already exists — if so, ask if user wants to replace or extendworkspaces, turbo.json, nx.json, lerna.jsonPresent findings: "I detected: [language], [package manager], [test framework], [build tool]. Is this correct?"
Ask the user each section. Use the auto-detected defaults where available. Skip questions that don't apply.
| # | Question | Options |
|---|---|---|
| A1 | Trigger branches — which branches should trigger CI? | main only / main + PR / all branches / custom |
| A2 | Node/Python/Go version(s) — which version(s) to test against? | single version / matrix (e.g., 3.11, 3.12, 3.13) |
| A3 | OS matrix — which OS to run on? | ubuntu-latest only / ubuntu + macos / ubuntu + macos + windows |
| # | Question | Options |
|---|---|---|
| B1 | Unit tests — enable? | yes / no |
| B2 | Test command — what runs your tests? | auto-detected or custom |
| B3 | Coverage check — enable minimum coverage threshold? | no / yes → ask threshold (e.g., 80%) |
| B4 | Coverage tool — which tool? | auto-detect (coverage.py, istanbul/c8, tarpaulin, etc.) or custom |
| B5 | Upload coverage report? — to Codecov, Coveralls, or artifact? | none / codecov / coveralls / artifact |
| # | Question | Options |
|---|---|---|
| C1 | Build step — enable? | yes / no / not applicable |
| C2 | Build command | auto-detected or custom |
| C3 | Linting — enable? | yes / no |
| C4 | Lint command | auto-detected (eslint, ruff, clippy, golangci-lint, etc.) or custom |
| C5 | Type checking — enable? | yes / no (for TS: tsc --noEmit, Python: mypy/pyright, etc.) |
| C6 | Format check — enable? | yes / no (prettier, black, rustfmt, gofmt, etc.) |
| # | Question | Options |
|---|---|---|
| D1 | Dependency audit — check for known vulnerabilities? | yes / no |
| D2 | Secret scanning — add trufflehog or gitleaks? | yes / no |
| D3 | SAST — static analysis (CodeQL, semgrep)? | none / codeql / semgrep / custom |
| # | Question | Options |
|---|---|---|
| E1 | Auto-deploy — deploy on merge to main? | no / yes → ask target |
| E2 | Deploy target | Vercel / Netlify / AWS / GCP / Fly.io / Docker registry / npm publish / PyPI publish / custom |
| E3 | Preview deploys — on PR? | yes / no |
| E4 | Release automation — auto-create GitHub release on tag? | yes / no |
| # | Question | Options |
|---|---|---|
| F1 | Additional workflows — anything else you need? | free text — user describes custom needs |
Examples to suggest if user is unsure:
Based on answers, generate GitHub Actions YAML files:
.github/workflows/ci.yml — main CI pipeline (test, build, lint, coverage).github/workflows/deploy.yml — deployment pipeline (if E1 = yes).github/workflows/security.yml — security checks (if any D section = yes)name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up <runtime>
uses: actions/setup-<runtime>@v5
with:
<runtime>-version: '<version>'
- name: Install dependencies
run: <install-command>
- name: Lint
run: <lint-command>
- name: Type check
run: <typecheck-command>
- name: Test
run: <test-command>
- name: Coverage check
run: <coverage-command>
# fail if below threshold
concurrency group to cancel stale runs on same PRfail-fast: false in matrix builds so one failure doesn't cancel othersShow the user:
Ask for confirmation before writing files.
.github/workflows/gh pr creategh pr merge <number> --mergecd <project-root> && git worktree remove .claude/worktrees/chore-setup-cigit checkout main && git pull && git branch -d chore/setup-ci${{ secrets.XXX }} and tell user what to configure