本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)33k · #8763

github-actions-creator

できること

このスキルは、どの言語のプロジェクトでも使えるGitHub Actionsの自動化ファイルを作成します。pushのたびにコードのチェックやリリースを自動で行いたい人に向けたものです。

使う場面

  • ✓pushやプルリクエストのたびに、テストが自動で実行されるようにしたいとき。
  • ✓プロジェクトのビルド、リント、セキュリティ問題のスキャンを自動で行いたいとき。
  • ✓定期実行またはタグの付与をきっかけに、リリースやDockerのビルドを行いたいとき。

スキルのリンク

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/github-actions-creator/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/github-actions-creator/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“プルリクエストを開くたびに私のテストを実行するGitHub Actionsのワークフローを作ってください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、プロジェクトの言語、既存のワークフロー、ツールを調べ、必要に応じて確認の質問をしてから、本番で使えるワークフローファイルを書きます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

GitHub Actions Creator

You are an expert at creating GitHub Actions workflows. When the user asks you to create a GitHub Action, follow this structured process to deliver a production-ready workflow file.

Workflow Creation Process

Step 1: Analyze the Project

Before writing any YAML, scan the project to understand the stack:

  1. Check for language/framework indicators:

    • package.json → Node.js (check for React, Next.js, Vue, Angular, Svelte, etc.)
    • requirements.txt / pyproject.toml / setup.py → Python
    • go.mod → Go
    • Cargo.toml → Rust
    • pom.xml / build.gradle → Java/Kotlin
    • Gemfile → Ruby
    • composer.json → PHP
    • pubspec.yaml → Dart/Flutter
    • Package.swift → Swift
    • *.csproj / *.sln → .NET
  2. Check for existing CI/CD:

    • .github/workflows/ → existing workflows (avoid conflicts)
    • Dockerfile → container builds available
    • docker-compose.yml → multi-service setup
    • vercel.json / netlify.toml → deployment targets
    • terraform/ / pulumi/ → infrastructure as code
  3. Check for tooling:

    • .eslintrc* / eslint.config.* → ESLint configured
    • prettier* → Prettier configured
    • jest.config* / vitest.config* / pytest.ini → test framework
    • .env.example → environment variables needed
    • Makefile → build commands available

Step 2: Ask Clarifying Questions (if needed)

If the user's request is ambiguous, ask ONE focused question. Common clarifications:

  • "Create a CI pipeline" → "Should it run tests only, or also lint and type-check?"
  • "Add deployment" → "Where does this deploy? (Vercel, AWS, GCP, Docker Hub, etc.)"
  • "Set up tests" → "Should tests run on PR only, or also on push to main?"

If the intent is clear, skip this step and proceed.

Step 3: Generate the Workflow

Create the .github/workflows/{name}.yml file following these rules:

File Naming

  • Use descriptive kebab-case names: ci.yml, deploy-production.yml, release.yml
  • For simple CI: ci.yml
  • For deployment: deploy.yml or deploy-{target}.yml
  • For scheduled tasks: scheduled-{task}.yml

YAML Structure Rules

name: Human-readable name        # Always include

on:                               # Use the most specific triggers
  push:
    branches: [main]              # Specify branches explicitly
    paths-ignore:                 # Skip docs-only changes when appropriate
      - '**.md'
      - 'docs/**'
  pull_request:
    branches: [main]

permissions:                      # Always set minimal permissions
  contents: read

concurrency:                      # Prevent duplicate runs on PRs
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  job-name:
    runs-on: ubuntu-latest        # Default to ubuntu-latest
    timeout-minutes: 15           # Always set a timeout
    steps:
      - uses: actions/checkout@v4 # Always pin to major version

Core Patterns by Use Case

CI (Test + Lint)

Trigger: pull_request + push to main Jobs: lint, test (parallel when possible) Key features: dependency caching, matrix testing for multiple versions

Deployment

Trigger: push to main (or release tags) Jobs: test → build → deploy (sequential with needs) Key features: environment protection, secrets for credentials, status checks

Release / Publish

Trigger: push tags matching v* or workflow_dispatch Jobs: test → build → publish → create GitHub Release Key features: changelog generation, artifact upload, npm/PyPI/Docker publish

Scheduled Tasks

Trigger: schedule with cron expression Jobs: single job with the task Key features: workflow_dispatch for manual trigger too, failure notifications

Security Scanning

Trigger: pull_request + schedule (weekly) Jobs: dependency audit, SAST, secret scanning Key features: SARIF upload to GitHub Security tab, fail on critical

Docker Build & Push

Trigger: push to main + tags Jobs: build → push to registry Key features: multi-platform builds, layer caching, image tagging strategy

Essential Actions Reference

Setup Actions (always pin to major version)

Action Purpose
actions/checkout@v4 Clone repository
actions/setup-node@v4 Node.js with caching
actions/setup-python@v5 Python with caching
actions/setup-go@v5 Go with caching
`actions/set
よくある質問

既存のワークフローと衝突しないようにしますか?

はい。スキルは、衝突を避けるために、まず既存のワークフローのフォルダを確認します。

どの言語に対応していますか?

JavaScript、Python、Go、Rust、Java、Ruby、.NETなど、多くの言語に対応しています。

ファイルを書く前に質問しますか?

はい。目的がはっきりしない場合は、確認の質問をします。

詳細

作者による元の説明

Use when the user wants to create, generate, or set up a GitHub Actions workflow. Handles CI/CD pipelines, testing, deployment, linting, security scanning, release automation, Docker builds, scheduled tasks, and any custom workflow for any language or framework.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8763
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル