github-actions-pipeline-creator — скилл для Claude Code: CI
Скилл github-actions-pipeline-creator для Claude Code собирает GitHub Actions workflow для линтинга, тестов, сборки и деплоя. Описывает CI с кэшем, матрицей и артефактами.
MIT 288 установок ★ 64 обновлён 2026-01-12
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a claude-codeЧто делает github-actions-pipeline-creator
Скилл помогает создать workflow для .github/workflows/ci.yml: отдельные job проверяют код, запускают тесты и собирают проект. В примерах используются actions/checkout@v4, actions/setup-node@v4, npm ci, ESLint, Prettier, TypeScript и загрузка покрытия через codecov/codecov-action@v3. Сборка зависит от успешных lint и test, а результат сохраняется как артефакт dist.
Внутри есть варианты с матрицей для ubuntu-latest, macos-latest и windows-latest, кэшем npm и сборки, Docker Buildx, публикацией образа и деплоем через amondnet/vercel-action@v25. Отдельные фрагменты показывают composite action и сбор диагностик при падении тестов. Для публикации в Docker Hub нужны секреты DOCKER_USERNAME и DOCKER_PASSWORD; без них шаг входа в реестр не пройдёт.
Какие задачи решает
- собрать CI для линтинга, тестов и TypeScript
- проверить проект на разных ОС и версиях Node.js
- кэшировать зависимости и результаты сборки
- сохранить coverage и тестовые результаты как артефакты
- собрать и отправить Docker-образ
Примеры запросов агенту
- Создай
.github/workflows/ci.ymlдля линтинга, тестов, сборки и загрузки артефактаdist. - Добавь матрицу GitHub Actions для
ubuntu-latest,macos-latestиwindows-latestс версиями Node.js18,20и21, исключив Windows с Node.js18. - Настрой деплой из
.github/workflows/deploy.ymlчерезamondnet/vercel-action@v25дляstagingиproduction.
Как установить github-actions-pipeline-creator
1Через Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a claude-code2Вручную: положить файлы
~/.claude/skills/github-actions-pipeline-creator/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/github-actions-pipeline-creator/
1Через Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a codex2Вручную: положить файлы
.agents/skills/github-actions-pipeline-creator/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a cursor2Вручную: положить файлы
.cursor/skills/github-actions-pipeline-creator/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install patricio0312rev/skills ci-cd/github-actions-pipeline-creator/SKILL.md2Вручную: положить файлы
.github/skills/github-actions-pipeline-creator/SKILL.md1Через Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a gemini-cli2Командой платформы
gemini skills install https://github.com/patricio0312rev/skills --path ci-cd/github-actions-pipeline-creatorВручную: положить файлы
.devin/skills/github-actions-pipeline-creator/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о github-actions-pipeline-creator
Как установить github-actions-pipeline-creator в Claude Code?
Выполните npx skills add patricio0312rev/skills --skill github-actions-pipeline-creator -a claude-code, затем проверьте файл ~/.claude/skills/github-actions-pipeline-creator/SKILL.md.
Что делает github-actions-pipeline-creator?
Скилл создаёт GitHub Actions workflow для линтинга, тестов, сборки и деплоя. Он также описывает кэширование, матрицу окружений, артефакты и диагностику ошибок.
Какие окружения поддерживает матрица тестов?
В примере используются ubuntu-latest, macos-latest и windows-latest, а также Node.js 18, 20 и 21. Комбинацию Windows с Node.js 18 можно исключить.
Исходный текст
SKILL.md · MIT
---
name: github-actions-pipeline-creator
description: Creates comprehensive GitHub Actions CI/CD workflows for linting, testing, building, and deploying. Includes caching strategies, matrix builds, artifact handling, and failure diagnostics. Use for "GitHub Actions", "CI pipeline", "workflow automation", or "continuous integration".
---
# GitHub Actions Pipeline Creator
Build production-ready GitHub Actions workflows with best practices.
## Basic CI Workflow
```yaml
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
# Cancel in-progress runs for same workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Run Prettier
run: npm run format:check
- name: Run TypeScript
run: npm run type-check
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage-final.json
flags: unittests
fail_ci_if_error: true
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
NODE_ENV: production
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
```
## Matrix Strategy
```yaml
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18, 20, 21]
exclude:
# Skip Windows + Node 18 (slow)
- os: windows-latest
node-version: 18
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test
```
## Advanced Caching
```yaml
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
.next/cache
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Cache build
uses: actions/cache@v3
with:
path: |
dist
.cache
key: build-${{ github.sha }}
restore-keys: |
build-
```
## Docker Build & Push
```yaml
docker:
name: Build & Push Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: mycompany/myapp
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=mycompany/myapp:buildcache
cache-to: type=registry,ref=mycompany/myapp:buildcache,mode=max
```
## Deployment Workflow
```yaml
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to"
required: true
type: choice
options:
- staging
- production
jobs:
deploy:
name: Deploy to ${{ github.event.inputs.environment || 'staging' }}
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.environment || 'staging' }}
url: https://${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Deploy to Vercel
id: deploy
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: ${{ github.event.inputs.environment == 'production' && '--prod' || '' }}
```
## Failure Diagnostics
```yaml
- name: Run tests
id: test
run: npm test
continue-on-error: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
test-results/
coverage/
- name: Comment PR with results
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ Tests failed. Check the [test results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
})
- name: Fail if tests failed
if: steps.test.outcome == 'failure'
run: exit 1
```
## Composite Actions
```yaml
# .github/actions/setup-node/action.yml
name: "Setup Node.js with Cache"
description: "Setup Node.js and restore cache"
inputs:
node-version:
description: "Node.js version"
required: false
default: "20"
runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: "npm"
- name: Install dependencies
shell: bash
run: npm ci
# Usage in workflow:
# - uses: ./.github/actions/setup-node
# with:
# node-version: '20'
```
## Conditional Jobs
```yaml
lint:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps: [...]
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [build, test]
runs-on: ubuntu-latest
steps: [...]
```
## Best Practices
1. **Cache dependencies**: Speeds up 3-5x
2. **Parallel jobs**: Run lint/test/build concurrently
3. **Matrix strategy**: Test multiple versions/platforms
4. **Fail fast**: Stop on first failure (or not)
5. **Upload artifacts**: Debug failures
6. **Concurrency control**: Cancel outdated runs
7. **Secrets management**: Never log secrets
8. **Status checks**: Require passing CI
## Output Checklist
- [ ] Lint job configured
- [ ] Test job with coverage
- [ ] Build job with artifacts
- [ ] Deploy job with environments
- [ ] Caching strategy implemented
- [ ] Matrix builds (if needed)
- [ ] Failure diagnostics
- [ ] PR comments on failure
- [ ] Docker build (if needed)
- [ ] Status badges in README
© patricio0312rev · MIT · patricio0312rev/skills