I Built an AI Skill That Writes GitHub Actions Workflows — With Zero Config Errors
Stop hand-crafting YAML. Let any AI agent generate production-ready workflows with 12 quality gates, 5 decision templates, and 3 mandatory security configs.
The Problem
Hand-writing GitHub Actions YAML is error-prone. Did you remember permissions? Did you pin action versions? Did you configure caching? Is concurrency set?
Every omitted config is either slower builds, security holes, or wasted billable minutes.
The Solution
I built an AI Skill — an executable instruction set, not a vague prompt. It forces any AI agent to follow a strict pipeline:
Decision Tree → Mandatory Config Injection → Cache Matching → 12 Quality Gates → Production YAML
Enter fullscreen mode Exit fullscreen mode
One sentence, instant result:
“Add CI for my Node.js project — run eslint and jest on PRs”
What the AI generates under the hood:
- ✅ Detects
package.json→ Node.js - ✅ Template A (CI) selected
- ✅
permissions: contents: readinjected - ✅
concurrencywith auto-cancel - ✅
cache: 'npm'→ ~70% faster installs - ✅ All actions SHA-1 pinned (
@11bd71...not@v4) - ✅ 12-point checklist validated
5 seconds. Zero omissions.
What Sets It Apart
Approach Universal Security Check Caching Quality Gates GitHub templates ✅ ❌ ❌ ❌ Manual YAML ✅ ❌ ❌ ❌ Raw ChatGPT prompt ✅ ❌ ❌ ❌ This Skill ✅ All agents ✅ 5 red lines ✅ 6 langs ✅ 12 gatesRaw LLM chats miss configs every time. This Skill makes them mandatory, not optional.
5 Decision Paths Cover 95% of Use Cases
- “lint / test / PR” → CI Workflow
- “Tag / Release / publish” → Release Workflow
- “cron / scheduled / Dependabot” → Scheduled Workflow
- “security / CodeQL / scan” → Security Workflow
- “Issue / triage / auto-label” → Automation Workflow
Every template enforces least-privilege permissions, concurrency control, and SHA-1 pinned actions — no exceptions.
5 Security Red Lines
- ❌ Hardcoded tokens → blocked
- ❌
pull_request_targetmisuse → blocked - ❌ Overwriting workflows without confirmation → blocked
- ❌
@main/@masteraction refs → blocked - ❌
permissions: write-all→ blocked
Universal — Works With ANY AI Agent
Agent How Claude CodeSKILL.md → .claude/skills/
Cursor
PROMPT.md → .cursor/rules/
GitHub Copilot
PROMPT.md → .github/copilot-instructions.md
Windsurf / Aider / Cline
Paste into System Prompt
International users
PROMPT.en.md (English)
Before/After
# ❌ Without Skill — typical raw LLM output
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # unpinned
- run: npm install # no cache
- run: npm test # no permissions, no concurrency
# ✅ With Skill — production-grade
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@cd063736c72066a58f36dd95fb0460484b220fb7 # v4.3.0
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npx eslint .
test:
needs: lint
# ... full pipeline
Enter fullscreen mode Exit fullscreen mode
Try It
git clone https://github.com/2B0748/github-actions-skill.git
Enter fullscreen mode Exit fullscreen mode
👉 Star the repo if you find it useful. PRs welcome for new language templates and edge cases.
답글 남기기