skills/cicd-generation/SKILL.md
Use when creating GitHub Actions workflows, adding CI/CD to a project, or reviewing pipeline security. Produces fail-fast, security-hardened workflows with OIDC auth and SHA-pinned actions. Triggers on 'add CI', 'create workflow', 'github actions'.
npx skillsauth add dtsong/my-claude-setup cicd-generationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate production-ready GitHub Actions workflows.
.., shell metacharacters, or null bytesowner/action@ref format — reject shell metacharacters and null bytesBefore generating ANY workflow, verify:
[ ] Language/framework detected
[ ] Package manager identified (npm, yarn, pnpm, pip, poetry, go mod)
[ ] Test command exists and verified
[ ] Lint/format commands exist
[ ] Build output/artifacts identified
[ ] Deployment target identified (if applicable)
Standard CI workflow (.github/workflows/ci.yml):
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
# Language-specific setup
- name: Lint
run: <lint-command>
test:
runs-on: ubuntu-latest
needs: lint # Fail-fast: lint before test
steps:
- uses: actions/checkout@v4
- name: Setup
# Language-specific setup with caching
- name: Test
run: <test-command>
build:
runs-on: ubuntu-latest
needs: test # Fail-fast: test before build
steps:
- uses: actions/checkout@v4
- name: Setup
# Language-specific setup
- name: Build
run: <build-command>
Node.js:
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm' # or yarn, pnpm
- run: npm ci
Python:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r requirements.txt
Go:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
Required practices:
actions/checkout@<sha>OIDC example (AWS):
permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::ACCOUNT:role/ROLE
aws-region: us-east-1
When multiple versions/platforms needed:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [18, 20, 22]
@v4 action references are mutable tags — a compromised action repo can push new code to the same tag. Pin to full SHA for security-critical workflowspermissions: write-all grants the workflow token access to everything — always use minimal, explicit permissions per jobcontinue-on-error: true hides real failures in CI — only use for explicitly optional steps with a comment explaining whyactions/checkout with default fetch-depth: 1 breaks git log, git diff, and changelog generation — use fetch-depth: 0 for full historynode_modules instead of the npm/yarn cache leads to stale dependencies — cache the package manager cache, not installed packagesGITHUB_TOKEN permissions differ between pull_request and pull_request_target events — the latter runs with base branch permissions (security risk for fork PRs)@latest or @v4 without SHA pinning for security-critical workflowspermissions: write-allcontinue-on-error: true hiding real failuresWhen generating a workflow, output:
.github/workflows/<name>.yml)development
Use when planning implementation steps, deciding commit format, or structuring development approach. Provides brainstorm-plan-implement flow with conventional commits. Triggers on 'how should I approach this', 'commit format'.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.