Designs pipeline-as-code flows, runs CI locally with act, and enforces pipeline quality gates with linters and security scanners.
Agentic Workflow: Read -> Reason -> Act (cicd-pipeline)
You are Cicd Pipeline (devops/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — devops context for cicd-pipeline
- Domain: Designs pipeline-as-code flows, runs CI locally with act, and enforces pipeline quality gates with linters and security scanners.
- local-pipeline-runtime: Execute GitHub Actions workflows locally without a runner using nektos/act. —
act -l
- pipeline-quality-gates: Enforce pipeline quality with linting, shell checks, and image scanning in CI. —
actionlint .github/workflows/ci.yml
- Check
knowledge and prerequisites: act, actionlint, hadolint, semgrep
2. Reason — think for cicd-pipeline
- For
local-pipeline-runtime: Execute GitHub Actions workflows locally without a runner using nektos/act. — decide which checks to run
- For
pipeline-quality-gates: Enforce pipeline quality with linting, shell checks, and image scanning in CI. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with cicd-pipeline tools
- Tools:
Glob, Grep, Read, Act, Actionlint (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
cicd-pipeline:5b40f2ba
Pipeline-as-Code Engineering
Build reproducible CI/CD pipelines that run the same way in CI and locally.
What This Skill Does
- Runs GitHub Actions workflows locally with act for fast iteration
- Adds lint/security gates that fail merges early
- Converts ad-hoc build scripts into reusable CI steps
- Validates YAML, shell, and Dockerfile quality in one pass
When to Use
- Iterating on a workflow without pushing dozens of commits
- Adding security scanning (secrets, SAST) to a pipeline
- Standardizing quality gates across repos
Real Commands
# Local workflow runs
act -l # list available jobs
act push -j test # run only 'test' job
act push --secret-file .secrets # provide local secrets
act --reuse # reuse containers between runs
# Quality gates
actionlint .github/workflows/*.yml # workflow syntax + anti-patterns
shellcheck scripts/deploy.sh # bash correctness
hadolint Dockerfile # Dockerfile lint
trufflehog filesystem --only-verified . # leaked secrets
semgrep ci --config auto # SAST on the repo
Standard Gate Order
- actionlint (workflow validity)
- shellcheck (scripts)
- hadolint (containers)
- unit tests
- secret scanning
- SAST/container scan
- deploy (staging) then promote to prod
Best Practices
- Keep the pipeline fast: fail lint in under a minute
- Never interpolate untrusted input directly into a script step (injection)
- Use
$GITHUB_ACTION_PATH and quoting around step scripts
- Run act with the same container image as production runners
- Add
permissions: blocks to least-privilege every job
Capabilities
local-pipeline-runtime
Execute GitHub Actions workflows locally without a runner using nektos/act.
Parameters:
event (string): Event to simulate, e.g. push, pull_request, schedule
job (string): Single job to execute, e.g. -j test
secret-file (string): File containing secrets for local run
Commands:
act -l
act push -j test
act pull_request --container-architecture linux/amd64
act --secret-file .secrets -W .github/workflows
act --reuse
Examples:
- act -l
- act push -j test
- act --secret-file .secrets -W .github/workflows
pipeline-quality-gates
Enforce pipeline quality with linting, shell checks, and image scanning in CI.
Parameters:
config-path (string): Path to workflow or Dockerfile to lint
severity (string): Minimum severity threshold for scanners
Commands:
actionlint .github/workflows/ci.yml
shellcheck scripts/*.sh
hadolint Dockerfile
trufflehog filesystem --only-verified .
semgrep ci --config auto
Examples:
- actionlint .github/workflows/ci.yml
- shellcheck deploy.sh && hadolint Dockerfile
- trufflehog filesystem --only-verified .
References
1---2name: "cicd-pipeline"3description: "Designs pipeline-as-code flows, runs CI locally with act, and enforces pipeline quality gates with linters and security scanners. Use when working with local pipeline runtime, pipeline quality gates, devops or when the user mentions local pipeline runtime, pipeline quality gates, devops."4license: "MIT"5compatibility: "Requires act, actionlint, hadolint, semgrep, shellcheck, trufflehog."6metadata:7 source: https://skillmd.com/skills/opknock/cicd-pipeline8 author: Kdesk9 version: 2.0.010 category: devops11allowed-tools: "Glob Grep Read Bash(act:*) Bash(actionlint:*) Bash(hadolint:*) Bash(semgrep:*) Bash(shellcheck:*) Bash(trufflehog:*)"12---1314Designs pipeline-as-code flows, runs CI locally with act, and enforces pipeline quality gates with linters and security scanners.1516## Agentic Workflow: Read -> Reason -> Act (cicd-pipeline)1718You are **Cicd Pipeline** (devops/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — devops context for `cicd-pipeline`21- Domain: Designs pipeline-as-code flows, runs CI locally with act, and enforces pipeline quality gates with linters and security scanners.22- **local-pipeline-runtime**: Execute GitHub Actions workflows locally without a runner using nektos/act. — `act -l`23- **pipeline-quality-gates**: Enforce pipeline quality with linting, shell checks, and image scanning in CI. — `actionlint .github/workflows/ci.yml`24- Check `knowledge` and `prerequisites: act, actionlint, hadolint, semgrep`2526### 2. Reason — think for `cicd-pipeline`27- For `local-pipeline-runtime`: Execute GitHub Actions workflows locally without a runner using nektos/act. — decide which checks to run28- For `pipeline-quality-gates`: Enforce pipeline quality with linting, shell checks, and image scanning in CI. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `cicd-pipeline` tools32- Tools: `Glob`, `Grep`, `Read`, `Act`, `Actionlint` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `cicd-pipeline:5b40f2ba`3536# Pipeline-as-Code Engineering3738Build reproducible CI/CD pipelines that run the same way in CI and locally.3940## What This Skill Does4142- Runs GitHub Actions workflows locally with act for fast iteration43- Adds lint/security gates that fail merges early44- Converts ad-hoc build scripts into reusable CI steps45- Validates YAML, shell, and Dockerfile quality in one pass4647## When to Use4849- Iterating on a workflow without pushing dozens of commits50- Adding security scanning (secrets, SAST) to a pipeline51- Standardizing quality gates across repos5253## Real Commands5455```bash56# Local workflow runs57act -l # list available jobs58act push -j test # run only 'test' job59act push --secret-file .secrets # provide local secrets60act --reuse # reuse containers between runs6162# Quality gates63actionlint .github/workflows/*.yml # workflow syntax + anti-patterns64shellcheck scripts/deploy.sh # bash correctness65hadolint Dockerfile # Dockerfile lint66trufflehog filesystem --only-verified . # leaked secrets67semgrep ci --config auto # SAST on the repo68```6970## Standard Gate Order71721. actionlint (workflow validity)732. shellcheck (scripts)743. hadolint (containers)754. unit tests765. secret scanning776. SAST/container scan787. deploy (staging) then promote to prod7980## Best Practices8182- Keep the pipeline fast: fail lint in under a minute83- Never interpolate untrusted input directly into a script step (injection)84- Use `$GITHUB_ACTION_PATH` and quoting around step scripts85- Run act with the same container image as production runners86- Add `permissions:` blocks to least-privilege every job8788## Capabilities8990### local-pipeline-runtime91Execute GitHub Actions workflows locally without a runner using nektos/act.9293**Parameters:**94- `event` (string): Event to simulate, e.g. push, pull_request, schedule95- `job` (string): Single job to execute, e.g. -j test96- `secret-file` (string): File containing secrets for local run9798**Commands:**99- `act -l`100- `act push -j test`101- `act pull_request --container-architecture linux/amd64`102- `act --secret-file .secrets -W .github/workflows`103- `act --reuse`104105**Examples:**106- act -l107- act push -j test108- act --secret-file .secrets -W .github/workflows109110### pipeline-quality-gates111Enforce pipeline quality with linting, shell checks, and image scanning in CI.112113**Parameters:**114- `config-path` (string): Path to workflow or Dockerfile to lint115- `severity` (string): Minimum severity threshold for scanners116117**Commands:**118- `actionlint .github/workflows/ci.yml`119- `shellcheck scripts/*.sh`120- `hadolint Dockerfile`121- `trufflehog filesystem --only-verified .`122- `semgrep ci --config auto`123124**Examples:**125- actionlint .github/workflows/ci.yml126- shellcheck deploy.sh && hadolint Dockerfile127- trufflehog filesystem --only-verified .128129## References130- [act - Run GitHub Actions locally](https://github.com/nektos/act)131- [GitHub Actions Security Hardening](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions)132- [Hadolint](https://github.com/hadolint/hadolint)