Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)33k · #8763

github-actions-creator

Skill này làm gì

Skill này tạo file tự động hóa GitHub Actions cho dự án bằng bất kỳ ngôn ngữ nào. Skill dành cho người muốn code được kiểm tra hoặc phát hành tự động mỗi khi họ push thay đổi.

Khi nào nên dùng

  • ✓Khi bạn muốn test chạy tự động mỗi lần push hoặc mở pull request.
  • ✓Khi bạn muốn một dự án được build, lint hoặc quét lỗi bảo mật tự động.
  • ✓Khi bạn muốn phát hành hoặc build Docker diễn ra theo lịch hoặc khi có tag.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/github-actions-creator/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một workflow GitHub Actions chạy test của tôi mỗi khi tôi mở một pull request.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill quét dự án để tìm ngôn ngữ, workflow hiện có và công cụ đang dùng, hỏi thêm khi cần, rồi viết một file workflow sẵn sàng cho production.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Skill có tránh xung đột với workflow hiện có không?

Có. Skill kiểm tra thư mục workflow trước để tránh trùng lặp.

Skill hỗ trợ những ngôn ngữ nào?

Skill làm việc được với nhiều ngôn ngữ, gồm JavaScript, Python, Go, Rust, Java, Ruby và .NET.

Skill có hỏi trước khi viết file không?

Có. Skill đặt câu hỏi làm rõ khi dự án không nêu rõ mục tiêu.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8763
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự