github-actions-gen
This skill streamlines GitHub Actions workflow creation by generating or updating CI/CD configurations tailored to your project's needs. Whether you're setting up automated testing, building containers, or deploying applications, it handles the boilerplate and best practices so you can focus on your pipeline logic.
github-actions-gen streamlines workflow creation by generating or updating CI/CD configurations tailored to your project's needs. You provide details about your testing requirements, build steps, and deployment targets, and the skill produces ready-to-use YAML that follows GitHub Actions best practices. This eliminates boilerplate and lets you focus on your pipeline logic rather than syntax.
AI-generated summary based on this skill's SKILL.md
Install
laolaoshiren/claude-code-skills-zh/github-actions-gen · repository language: Python
git clone https://github.com/laolaoshiren/claude-code-skills-zh
cp -r claude-code-skills-zh/skills/github-actions-gen ~/.claude/skills/github-actions-genFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How can I generate a GitHub Actions workflow for my project?
github-actions-gen streamlines workflow creation by generating or updating CI/CD configurations tailored to your project's needs. You provide details about your testing requirements, build steps, and deployment targets, and the skill produces ready-to-use YAML that follows GitHub Actions best practices. This eliminates boilerplate and lets you focus on your pipeline logic rather than syntax.
What security best practices does github-actions-gen help implement?
github-actions-gen helps secure GitHub Actions workflows against untrusted code and credential leaks by guiding you through proper secret management, OIDC authentication setup, and action pinning to specific SHAs. The skill emphasizes environment protection rules and least-privilege credential scoping so your deployments remain safe from compromise.
Can github-actions-gen set up testing matrices and caching in my workflows?
Yes. github-actions-gen handles setup of testing matrices, caching strategies, and artifact management in workflows. It generates matrix configurations for running tests across multiple Node versions, Python releases, or operating systems, and optimizes cache keys so your CI runs stay fast and efficient.
How do I create a CI/CD pipeline with GitHub Actions using this skill?
github-actions-gen helps you create CI/CD pipelines by generating workflow files that automate testing, building, and deployment. You describe your pipeline stages—such as lint, test, build, and deploy—and the skill produces the corresponding GitHub Actions YAML with proper triggers, job dependencies, and environment configurations.
What should I do if my github-actions-gen workflow isn't working as expected?
github-actions-gen supports troubleshooting and validation of existing GitHub Actions configurations. Review the generated YAML for trigger conditions, job dependencies, and secret references. The skill can help you diagnose common issues like incorrect pull request triggers, missing environment protection rules, or misconfigured artifact management.
Does github-actions-gen support release and deployment workflows?
Yes. github-actions-gen can configure release and deployment workflows with environment protection rules. It generates workflows that handle version tagging, artifact publishing, and multi-environment deployments while enforcing approval gates and credential isolation to keep your production deployments secure.
SKILL.md
rendered from the published skill — quoted content, verbatim
GitHub Actions CI/CD 生成器
核心原则
- 先读项目,再生成 workflow。不要凭项目名猜测运行时、包管理器、测试命令或部署目标。
- 默认只生成只读 CI。Release、部署、推送镜像、写回仓库和调用外部 webhook 必须先确认目标、凭据、环境保护与回滚方式。
- 将不可信 PR 代码与 Secrets、写权限、自托管 Runner 隔离。不要为方便而改用
pull_request_target执行 PR 代码。 - 把所有 Action 固定到核验过的完整 40 位 commit SHA,并在旁边保留版本注释。不要使用
@main、@master、@latest或可移动的@vNtag。 - 为每个 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 /
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skills/github-actions-gen/SKILL.md