AINow
📢 赞助位招租 · 月访问 XXXX · 联系 weixin_xxx
了解详情
返回 Skill 列表
GitHub进阶

GitHub Actions 自动化 Skill

自动测试、自动构建、自动部署。代码一推送,剩下全自动。

📋 SKILL.md 完整代码

---
name: github-actions
description: >-
  自动测试、自动构建、自动部署。代码一推送,剩下全自动。
  Use when working on github actions tasks.
allowed-tools: Read,Write,Bash
---

# GitHub Actions 自动化 Skill

## Quick Start
1. Save as `~/.claude/skills/github-actions/SKILL.md`
2. Restart Claude Code
3. Type `/github-actions` or describe your task naturally
4. Claude auto-triggers when your task matches the description

## Instructions
- Understand the user's specific context and needs
- Apply domain best practices consistently
- Provide actionable, specific guidance with examples
- Verify all outputs before presenting to user

## Gotchas
- Test with a fresh Claude instance after changes
- Keep SKILL.md under 500 lines; use references/ for details
- Description is the trigger key — make it specific and keyword-rich

🚀 怎么用

1. 复制上面的 SKILL.md 代码
2. 保存为 ~/.claude/skills/github-actions/SKILL.md
3. 重启 Claude Code
4. 输入 /github-actions 或直接描述任务触发
5. AI 自动按 Skill 流程执行

GitHub Actions 是什么

GitHub 自带的 CI/CD 工具。每次你推送代码,Actions 可以自动:运行测试→如果测试通过了→自动构建→自动部署到服务器。全程不需要人工干预。相当于雇了一个 24 小时待命的机器人。

常用场景

自动运行测试(每次 push 触发)、自动构建部署(main 分支更新时触发)、定时任务(每天早上 7 点发日报)、自动打标签发布版本。所有配置写在一个 YAML 文件里,放在 .github/workflows/ 目录。