Agent skill · Workflow & Productivity

github-actions-gen

分析真实项目并生成或修订安全、可验证的 GitHub Actions workflow;当用户要求创建 CI、测试矩阵、构建、Release、部署、缓存、Secrets、OIDC、PR 自动化或排查 workflow 配置时使用

laolaoshirengithub.com/laolaoshirenGitHub ↗
claude-codeMIT
Install
npx skills add laolaoshiren/claude-code-skills-zh --skill github-actions-gen --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/github-actions-gen/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 725
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# GitHub Actions CI/CD 生成器 ## 核心原则 - 先读项目,再生成 workflow。不要凭项目名猜测运行时、包管理器、测试命令或部署目标。 - 默认只生成只读 CI。Release、部署、推送镜像、写回仓库和调用外部 webhook 必须先确认目标、凭据、环境保护与回滚方式。 - 将不可信 PR 代码与 Secrets、写权限、自托管 Runner 隔离。不要为方便而改用 `pull_request_target` 执行 PR 代码。 - 把所有 Action 固定到核验过的完整 40 位 commit SHA,并在旁边保留版本注释。不要使用 `@main`、`@master`、`@latest` 或可移动的 `@vN` tag。 - 为每个 job 设置最小 `permissions` 和 `timeout-minutes`;不依赖仓库默认权限。 - 生成后运行真实语法与项目命令验证,不把“配置看起来正确”当作通过。 ## 工作流程 ### 1. 盘点项目证据 - 读取 manifest、lockfile、wrapper、运行时文件和现有 workflow,例如 `package.json`、`.nvmrc`、`pyproject.toml`、`go.mod`、`Cargo.toml`、`Dockerfile` 与 `.github/workflows/`。 - 从项目脚本、贡献文档和现有 CI 确认 lint、test、build、package 命令。命令不存在时先指出缺口。 - 识别 monorepo 边界、工作目录、矩阵维度、服务容器、缓存路径与产物。 - 询问必要决策:触发分支、支持的运行时、部署目标、云账号、GitHub Environment、失败处理和发布授权。 - 检查当前工作树,保留用户已有修改;只编辑本次授权的 workflow 和必要配置。 ### 2. 建立威胁模型 - `pull_request`:按不可信代码处理,使用只读 Token,不提供 Secrets,不在高权限自托管 Runner 上执行 fork 代码。 - `pull_request_target`:仅处理标签、评论等可信基准分支逻辑;绝不 checkout PR head、运行 PR 脚本或安装 PR 依赖。 - `push` / tag / `workflow_dispatch`:仍需限制分支、输入、Environment 和权限;写操作放入独立 job。 - 避免把 `${{ github.event.* }}` 等不可信表达式直接插进 `run:`。通过 `env:` 传值,并在脚本中按数据处理。 - 不把 Secrets 写入命令行、日志、缓存、Artifact 或 PR 评论;fork PR 缺少 Secrets 是正常安全边

What's inside
Steps it walks through
  1. 核心原则
  2. 工作流程
  3. 1. 盘点项目证据
  4. 2. 建立威胁模型
  5. 3. 设计最小流水线
  6. 4. 核验并固定 Action
  7. 5. 生成 workflow
  8. 6. 单独保护发布与部署
  9. 7. 验证
  10. 交付格式
  11. 质量检查清单
More from claude-code-skills-zh
All skills →
About this skill
What does the github-actions-gen skill do?

分析真实项目并生成或修订安全、可验证的 GitHub Actions workflow;当用户要求创建 CI、测试矩阵、构建、Release、部署、缓存、Secrets、OIDC、PR 自动化或排查 workflow 配置时使用

How do I install it?

Run `npx skills add laolaoshiren/claude-code-skills-zh --skill github-actions-gen --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From laolaoshiren/claude-code-skills-zh, a repository with 725 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going