From 458d3c5bfddca9fe8d8b00a1994b5997c2f590bf Mon Sep 17 00:00:00 2001 From: lvzhaobo Date: Sat, 11 Apr 2026 21:49:00 +0800 Subject: [PATCH] feat: add generate-github-workflow skill (en + zh) --- .../skills-zh/generate-github-workflow.md | 65 +++++++++++++++++++ .../skills/generate-github-workflow.md | 65 +++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 src/content/skills-zh/generate-github-workflow.md create mode 100644 src/content/skills/generate-github-workflow.md diff --git a/src/content/skills-zh/generate-github-workflow.md b/src/content/skills-zh/generate-github-workflow.md new file mode 100644 index 0000000..4cf5676 --- /dev/null +++ b/src/content/skills-zh/generate-github-workflow.md @@ -0,0 +1,65 @@ +--- +name: generate-github-workflow +title: 生成 GitHub 工作流 +description: 交互式生成 GitHub Actions 工作流文件。支持 AI 代码审查(Qoder Action)、CI 测试、ECS 部署三大模板,并提供 GitHub 配置指引。 +source: community +author: Lv Zhaobo +githubUrl: https://github.com/lvzhaobo/ai-coding-skills/tree/main/skills/generate-github-workflow +category: automation +tags: + - GitHub Actions + - CI/CD + - 工作流 + - 自动化部署 + - 代码审查 + - DevOps +roles: + - developer + - architect +featured: false +popular: false +isOfficial: false +installCommand: | + git clone https://github.com/lvzhaobo/ai-coding-skills + cp -r ai-coding-skills/skills/generate-github-workflow ~/.qoder/skills/ +date: 2026-04-11 +--- + +## 使用场景 + +- 新项目需要配置 CI/CD 流水线 +- 为 PR 添加 AI 代码审查(Qoder Action) +- 自动化部署到 ECS/云服务器 +- 配置代码质量检查(lint/test/security) +- Workshop 教学中演示 GitHub Actions + +## 核心能力 + +- **3 大内置模板**:AI 代码审查、CI 测试、ECS 部署 +- **交互式问答**:根据技术栈、分支、路径等信息定制生成 +- **Qoder Action 集成**:PR 触发 AI 审查,支持大小检测和语言配置 +- **GitHub 配置指引**:输出 Secrets 配置、Permissions 设置和验证方法 +- **灵活扩展**:模板之外的需求,描述后按相同流程生成 + +## 示例 + +``` +用户:帮我配置 GitHub Actions 做 AI 代码审查 + +Agent:几个确认问题: + 1. 主分支?→ main + 2. 审查语言?→ Chinese + 3. 大型 PR 跳过阈值?→ 1000 行 + + [生成 .github/workflows/ai-code-review.yml] + + ✅ 工作流已生成! + 下一步:在 GitHub Secrets 中配置 QODER_PERSONAL_ACCESS_TOKEN +``` + +## 注意事项 + +- 纯知识型 SKILL,生成 YAML 文件,不调用外部 API +- 使用 `actions/checkout@v4` 等最新版 Action +- YAML 中禁止硬编码密钥/Token,统一使用 `${{ secrets.* }}` +- 部署工作流同时支持自动触发和手动 `workflow_dispatch` diff --git a/src/content/skills/generate-github-workflow.md b/src/content/skills/generate-github-workflow.md new file mode 100644 index 0000000..285729e --- /dev/null +++ b/src/content/skills/generate-github-workflow.md @@ -0,0 +1,65 @@ +--- +name: generate-github-workflow +title: Generate GitHub Workflow +description: Interactively generate GitHub Actions workflow files. Supports AI code review (Qoder Action), CI testing, and ECS deployment templates with GitHub configuration guidance. +source: community +author: Lv Zhaobo +githubUrl: https://github.com/lvzhaobo/ai-coding-skills/tree/main/skills/generate-github-workflow +category: automation +tags: + - github-actions + - ci-cd + - workflow + - deployment + - code-review + - devops +roles: + - developer + - architect +featured: false +popular: false +isOfficial: false +installCommand: | + git clone https://github.com/lvzhaobo/ai-coding-skills + cp -r ai-coding-skills/skills/generate-github-workflow ~/.qoder/skills/ +date: 2026-04-11 +--- + +## Use Cases + +- Set up CI/CD pipelines for new projects +- Add AI code review (Qoder Action) to pull requests +- Automate deployment to ECS/cloud servers +- Configure code quality checks (lint/test/security) +- Demonstrate GitHub Actions in workshops + +## Core Capabilities + +- **3 Built-in Templates**: AI Code Review, CI Tests, Deploy to ECS +- **Interactive Q&A**: Collects project info (tech stack, branches, paths) before generation +- **Qoder Action Integration**: PR-based AI code review with size check and language config +- **GitHub Config Guide**: Outputs Secrets setup, Permissions config, and verification steps +- **Flexible Extension**: Describe any workflow need beyond templates for custom generation + +## Example + +``` +User: Help me set up GitHub Actions for AI code review + +Agent: A few questions: + 1. Main branch? → main + 2. Review language? → Chinese + 3. Skip threshold for large PRs? → 1000 lines + + [Generates .github/workflows/ai-code-review.yml] + + ✅ Workflow generated! + Next: Configure QODER_PERSONAL_ACCESS_TOKEN in GitHub Secrets +``` + +## Notes + +- Pure knowledge skill — generates YAML files, no external API calls +- Uses `actions/checkout@v4` and latest Action versions +- Never hardcodes secrets/tokens in YAML — always uses `${{ secrets.* }}` +- Deployment workflows include both auto-trigger and manual `workflow_dispatch`