Command Palette

Search for a command to run...

Назад к скиллам
скилл № 34734

github-actions-ci

Generate GitHub Actions CI workflows for taw-kit Next.js / Expo projects. Detection-first — reads package.json scripts and existing .github/workflows/ to…

БесплатноБез исполняемых скриптов
nghiahsgsот nghiahsgs★ 31 звезда на GitHub

Установить github-actions-ci в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

github-actions-ci — Workflow Generator

Step 0 — Detect

# existing workflows?
ls .github/workflows/ 2>/dev/null

# available scripts to run in CI
node -e "console.log(Object.keys(require('./package.json').scripts||{}).join('\n'))"

# mobile (Expo) or web?
test -f app.json && echo "mobile (Expo)" || echo "web (Next.js)"

If .github/workflows/ci.yml already exists → read, show user, ask before overwriting. Never clobber silently.

If directory missing → mkdir -p .github/workflows.

Step 1 — Pick workflow flavour

Based on detected scripts:

Scripts present Include in CI
lint (any — next lint, eslint) lint job
test unit test job
test:e2e E2E job (needs Playwright browsers)
test:rls RLS pgTAP job (needs Supabase start)
build always include
typecheck or tsc exists typecheck job

Step 2 — Core workflow template

.github/workflows/ci.yml:

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  # ──────────────── Install + cache ────────────────
  setup:
    name: Setup
    runs-on: ubuntu-latest
    outputs:
      cache-hit: ${{ steps.cache.outputs.cache-hit }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci

  # ──────────────── Lint ────────────────
  lint:
    name: Lint
    needs: setup
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npm run lint

  # ──────────────── Typecheck ────────────────
  typecheck:
    name: Typecheck
    needs: setup
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npx tsc --noEmit

  # ──────────────── Unit tests ────────────────
  test:
    name: Unit tests
    needs: setup
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npm test

  # ──────────────── Build ────────────────
  build:
    name: Build
    needs: [lint, typecheck, test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npm run build
        env:
          NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
          NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
          # add any build-time env vars here — NEVER hardcode secrets

Step 3 — Add-on jobs (include if relevant scripts exist)

E2E (Playwright)

  e2e:
    name: E2E
    needs: setup
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - run: npm ci
      - run: npx playwright install --with-deps chromium
      - run: npm run test:e2e
        env:
          NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
          NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
      - if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: playwright-report
          path: playwright-report/
          retention-days: 7

RLS tests (Supabase + pgTAP)

  rls:
    name: Supabase RLS
    needs: setup
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: supabase/setup-cli@v1
        with: { version: latest }
      - run: supabase start
      - run: supabase test db

Expo mobile (EAS build preview on PR)

  eas-preview:
    name: EAS Preview (PR)
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20', cache: 'npm' }
      - uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}
      - run: npm ci
      - run: eas build --platform all --profile preview --non-interactive

Vercel preview deploy

Actually Vercel handles this automatically via its GitHub app — don't add a workflow for it unless user has NO Vercel GitHub integration. If self-managing:

  deploy-preview:
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    needs: [build]
    steps:
      - uses: actions/checkout@v4
      - run: npm install -g vercel
      - run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
      - run: vercel bui
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Write
  3. 03Edit
  4. 04Bash
  5. 05Grep

FAQ

Что делает скилл github-actions-ci?

Generate GitHub Actions CI workflows for taw-kit Next.js / Expo projects. Detection-first — reads package.json scripts and existing .github/workflows/ to avoid overwriting user's custom CI. Covers lint/type/test/build matrix, Playwright browsers, Supabase schema checks, and optional preview deploys. Trigger phrases (EN + VN): "github actions", "ci cd", "set up ci", "gen workflow", "tao ci", "chay test tren github", "workflow yaml".

Как установить скилл github-actions-ci?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-actions-ci запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-actions-ci с