用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hpsgd/turtlestack --skill write-pipeline命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Review staged or recent changes — native Claude Code review for mechanics, layered with team conventions and the team verdict contract
Perform a security-focused audit of code changes or a specific area of the codebase.
Propose a change to a marketplace repo based on learned patterns — new rules, updated skills, evolved regex patterns. Infers which upstream marketplace the learning belongs to, confirms with the user, then creates a branch, applies changes, shows diff for review, and raises a PR on approval. Use when patterns have enough evidence to share upstream.
基于 SOC 职业分类
正在显示 SKILL.md
| name | write-pipeline |
| description | Write a CI/CD pipeline configuration — build, test, lint, deploy stages. |
| argument-hint | [service or project to create pipeline for, and platform e.g. 'GitHub Actions'] |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
Write a CI/CD pipeline for $ARGUMENTS.
Before writing any pipeline configuration:
.github/workflows/, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.ymlpackage.json scripts, Makefile, Taskfile, scripts/ directoryEvery pipeline follows this ordering principle: fail fast — cheapest checks first.
Lint/Format → Build → Unit Tests → Integration Tests → Security Scan → Deploy
If any stage fails, subsequent stages do not run. Total pipeline time budget: under 10 minutes for the fast path (lint + build + unit tests).
# Purpose: catch style and type errors in <30 seconds
- name: Lint
run: |
npm run lint
npm run typecheck
npm run format:check # --check flag, never auto-fix in CI
Rules:
# Purpose: compile/bundle and verify the artifact is producible
- name: Build
run: npm run build
Rules:
- name: Unit Tests
run: CI=true npm test -- --coverage
Rules:
CI=true or explicit --run flag)- name: Integration Tests
run: CI=true npm run test:integration
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: test
Rules:
- name: Security Scan
run: |
npm audit --audit-level=high
# or: trivy fs . --severity HIGH,CRITICAL
Rules:
- name: Deploy
if: github.ref == 'refs/heads/main' && success()
run: ./scripts/deploy.sh
Rules:
Cache aggressively to reduce pipeline time:
# Node.js
- uses: actions/cache@v4
with:
path: node_modules
key: node-${{ hashFiles('package-lock.json') }}
# .NET
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/*.csproj') }}
# Python
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements*.txt') }}
# Docker layers
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Rules:
Use matrix builds for multi-version or multi-project testing:
# Multi-version testing
strategy:
matrix:
node-version: [20, 22]
fail-fast: true # Stop all jobs if one fails
# Monorepo auto-discovery
strategy:
matrix:
project: ${{ fromJson(needs.detect-changes.outputs.projects) }}
Rules:
fail-fast: true — no point running other versions if one failsFor monorepo projects:
git diffmoon ci) or similar task runners that resolve the dependency graph automaticallyIf using Moon:
# Moon handles change detection + dependency graph resolution
- name: Run affected checks
run: moon ci # builds/tests all projects affected by changes, in dependency order
Without a task runner, use path filters as a fallback:
# GitHub Actions path filter (manual, no dependency graph awareness)
on:
push:
paths:
- 'services/api/**'
- 'packages/shared/**' # shared dependency — must be listed manually
# Pin action versions to full SHA (not tags)
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Pin tool versions
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc' # or package.json engines
Rules:
.nvmrc, global.json, .python-version)CI=true or --runPipeline design affects all four DORA metrics: deployment frequency (how often the pipeline runs), lead time for changes (pipeline duration), change failure rate (test/gate effectiveness), and time to restore service (rollback speed).
Deliver:
.github/workflows/*.yml or equivalent).dockerignore or equivalent if building containers/devops:write-dockerfile — pipelines that build containers need a Dockerfile. Ensure the pipeline's build stage matches the Dockerfile's target.