AGENT SKILL

cicd-pipeline

Generate CI/CD workflows (GitHub Actions, or self-hosted Woodpecker via provider)

License 许可
MIT
所属仓库
cooneycw/skillc
最近更新
2026-11-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
cicd-pipeline
description
Generate CI/CD workflows (GitHub Actions, or self-hosted Woodpecker via provider)

03 SKILL.md 正文

<!-- GENERATED by claude-power-pack - scripts/codex-skill-sync.py; edit .claude/commands/cicd/pipeline.md instead -->

CI/CD Pipeline Generation

Generate CI/CD workflows from your Makefile targets. Defaults to GitHub Actions; set pipeline.provider: woodpecker (or both) in .claude/cicd.yml to emit a self-hosted Woodpecker .woodpecker.yml. For a hardened self-hosted pipeline (secret-scan + image-security + runtime-smoke) and to scaffold the Woodpecker server/agent, use /cicd-woodpecker instead.

Steps

  1. Check for task manifest - if .claude/cicd_tasks.yml exists, use it to inform pipeline generation:
if [ -f ".claude/cicd_tasks.yml" ]; then
    echo "Found cicd_tasks.yml manifest - pipeline will use manifest-defined steps"
    # The manifest defines plan steps (lint, test, deploy, etc.) with exact commands.
    # Pipeline generation should use these commands instead of defaults.
fi

When a manifest is present, the generated pipeline YAML should:

  • Use the exact commands from the manifest's step definitions
  • Include timeout values from the manifest
  • Respect skip_if conditions as conditional steps
  • Fall back to make <target> for steps not in the manifest
  1. Detect framework using lib/cicd:
PYTHONPATH="$PWD:$HOME/Projects/claude-power-pack:$PYTHONPATH" uv run --project "$HOME/Projects/claude-power-pack" python -m lib.cicd detect --quiet
  1. Generate pipeline (dry run first):
PYTHONPATH="$PWD:$HOME/Projects/claude-power-pack:$PYTHONPATH" uv run --project "$HOME/Projects/claude-power-pack" python -m lib.cicd pipeline
  1. Review output with the user. Show the generated workflow YAML.

  2. Check for existing files before writing:

    • If .github/workflows/ci.yml exists, ask before overwriting
  3. Write files if approved:

PYTHONPATH="$PWD:$HOME/Projects/claude-power-pack:$PYTHONPATH" uv run --project "$HOME/Projects/claude-power-pack" python -m lib.cicd pipeline --write
  1. Report results:
## CI Pipeline Generated

Framework: {framework} ({package_manager})

Files created:
  .github/workflows/ci.yml - CI pipeline with lint, test, build

Triggers: push to main, pull requests
Targets:  make lint, make test, make typecheck (if available)

To view: cat .github/workflows/ci.yml

Notes

  • Workflows use make <target> as steps (not direct tool commands)
  • This keeps CI in sync with local development commands
  • Caching is included for package managers (uv, npm, cargo, go)
  • Matrix builds are configured from .claude/cicd.yml if present
  • Configure pipeline settings in .claude/cicd.yml:
    pipeline:
      provider: github-actions   # github-actions | woodpecker | both
      branches:
        main: [lint, test, typecheck, build, deploy]
        pr: [lint, test, typecheck]
      matrix:
        python: ["3.11", "3.12"]
    
  • Self-hosted Woodpecker: set provider: woodpecker (or both) and see /cicd-woodpecker + docs/skills/woodpecker-ci.md for the hardening stages.

04 同仓库更多 Skills