This skill should be used when creating or configuring CI/CD pipeline files for automated testing, building, and deployment. Use this for generating GitHub Actions workflows, GitLab CI configs, CircleCI configs, or other CI/CD platform configurations. Ideal for setting up automated pipelines for Node.js/Next.js applications, including linting, testing, building, and deploying to platforms like Vercel, Netlify, or AWS.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install cicd-pipeline-generator或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install cicd-pipeline-generator⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/cicd-pipeline-generator/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: cicd-pipeline-generator description: This skill should be used when creating or configuring CI/CD pipeline files for automated testing, building, and deployment. Use this for generating GitHub Actions workflows, GitLab CI configs, CircleCI configs, or other CI/CD platform configurations. Ideal for setting up automated pipelines for Node.js/Next.js applications, including linting, testing, building, and deploying to platforms like Vercel, Netlify, or AWS. ---
Generate production-ready CI/CD pipeline configuration files for various platforms (GitHub Actions, GitLab CI, CircleCI, Jenkins). This skill provides templates and guidance for setting up automated workflows that handle linting, testing, building, and deployment for modern web applications, particularly Node.js/Next.js projects.
Choose the appropriate CI/CD platform based on project requirements:
Refer to references/platform-comparison.md for detailed platform comparisons, pros/cons, and use case recommendations.
Generate pipeline configs following these principles:
Structure pipelines with these standard stages:
- Checkout code from repository - Setup runtime environment (Node.js version) - Restore cached dependencies - Install dependencies with npm ci - Cache dependencies for future runs
- Run ESLint for code quality - Run TypeScript type checking - Fail fast on linting errors
- Execute unit tests - Execute integration tests - Generate code coverage reports - Upload coverage to reporting services (Codecov, Coveralls)
- Create production build - Verify build succeeds - Store build artifacts
- Deploy to staging (develop branch) - Deploy to production (main branch) - Run post-deployment smoke tests
Implement effective caching to speed up builds:
# Cache node_modules based on package-lock.json
cache:
key: ${{ hashFiles('package-lock.json') }}
paths:
- node_modules/
- .npm/
Configure necessary environment variables:
NODE_ENV: Set to production for buildsUse provided templates from assets/ directory:
GitHub Actions Template (assets/github-actions-nodejs.yml):
GitLab CI Template (assets/gitlab-ci-nodejs.yml):
To use a template:
- GitHub Actions: .github/workflows/ci.yml - GitLab CI: .gitlab-ci.yml
For GitHub Actions:
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
Required Secrets:
VERCEL_TOKEN: Get from Vercel account settingsVERCEL_ORG_ID: From Vercel project settingsVERCEL_PROJECT_ID: From Vercel project settings- run: |
npm install -g netlify-cli
netlify deploy --prod --dir=.next
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- run: |
aws s3 sync .next/static s3://${{ secrets.S3_BUCKET }}/static
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_ID }} --paths "/*"
Configure test execution with proper reporting:
Jest Configuration:
- name: Run tests with coverage
run: npm test -- --coverage --coverageReporters=text --coverageReporters=lcov
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: unittests
Fail Fast Strategy:
# Run quick tests first
jobs:
lint: # Fails in ~30 seconds
test: # Fails in ~2 minutes
build: # Fails in ~5 minutes
needs: [lint, test]
deploy:
needs: [build]
Implement different behaviors per branch:
Feature Branches / PRs:
Develop Branch:
Main Branch:
Example:
deploy_staging:
if: github.ref == 'refs/heads/develop'
# Deploy to staging
deploy_production:
if: github.ref == 'refs/heads/main'
environment: production # Requires manual approval
# Deploy to production
Follow this decision tree to generate the appropriate pipeline:
- GitHub → Use assets/github-actions-nodejs.yml - GitLab → Use assets/gitlab-ci-nodejs.yml - CircleCI/Jenkins → Adapt GitHub Actions template - Unsure → Consult references/platform-comparison.md
- Always include: Lint, Test, Build - Optional: Security scanning, E2E tests, performance tests - Add deployment stage if deploying from CI
- Vercel → Use Vercel deployment examples - Netlify → Use Netlify CLI approach - AWS → Use AWS Actions/CLI - Custom → Implement custom deployment script
- On push to main/develop - On pull request - On tag creation - Manual workflow dispatch
- Platform tokens (Vercel, Netlify, AWS) - API keys for external services - Build-time environment variables - Feature flags
*** masking)18.x not just 18)package-lock.json)continue-on-error for non-critical stepsdeploy_staging:
environment: staging
if: github.ref == 'refs/heads/develop'
...安装 Cicd Pipeline Generator 后,可以对 AI 说这些话来触发它
Help me get started with Cicd Pipeline Generator
Explains what Cicd Pipeline Generator does, walks through the setup, and runs a quick demo based on your current project
Use Cicd Pipeline Generator to this skill should be used when creating or configuring CI/CD pipeli...
Invokes Cicd Pipeline Generator with the right parameters and returns the result directly in the conversation
What can I do with Cicd Pipeline Generator in my developer & devops workflow?
Lists the top use cases for Cicd Pipeline Generator, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/cicd-pipeline-generator/ 目录(个人级,所有项目可用),或 .claude/skills/cicd-pipeline-generator/(项目级)。重启 AI 客户端后,用 /cicd-pipeline-generator 主动调用,或让 AI 根据上下文自动发现并使用。
Cicd Pipeline Generator 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Cicd Pipeline Generator 可免费安装使用。请查阅仓库了解许可证信息。
This skill should be used when creating or configuring CI/CD pipeline files for automated testing, building, and deployment. Use this for generating GitHub Actions workflows, GitLab CI configs, CircleCI configs, or other CI/CD platform configurations. Ideal for setting up automated pipelines for Node.js/Next.js applications, including linting, testing, building, and deploying to platforms like Vercel, Netlify, or AWS.
Automate my developer & devops tasks using Cicd Pipeline Generator
Identifies repetitive steps in your workflow and sets up Cicd Pipeline Generator to handle them automatically
Cicd Pipeline Generator 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。