dotnet/skills✦ 精选0°

authoring-github-workflows

仓库创建 2026年2月4日最近提交 14 小时前SkillHot 收录 20 天前
▸ 精选理由

专注于 workflow 合法性与表达式安全,减少运行时突发错误。

这个 Skill 做什么

安全地编写与审查 GitHub Actions workflow 文件,避免加载失败。

帮你安全地编写和审查 GitHub Actions 的 workflow YAML,避免语法看起来没问题却被 GitHub 拒绝导致“运行失败且无作业启动”的尴尬。适合修改 .github/workflows 下文件、写含 ${{ }} 表达式的字段或诊断加载失败时使用。侧重于 workflow 的结构性与引用、引号与解析细节(可配合 actionlint 校验),不是通用 YAML 指南。

▸ 展开 SKILL.md 英文原文

Author and review GitHub Actions workflow YAML safely so syntactically-valid YAML can't ship a workflow that GitHub Actions refuses to run. USE FOR: editing, adding, or reviewing any file under .github/workflows/, writing run-name/name/if/env/run values that contain ${{ }} expressions, diagnosing a run that fails with 'This run likely failed because of a workflow file issue' and no jobs starting, deciding when a workflow scalar must be quoted, validating workflows with actionlint. DO NOT USE FOR: authoring application YAML unrelated to GitHub Actions, Azure Pipelines, GitLab CI, or non-workflow YAML. SCOPE: this skill covers *syntactic/structural* correctness of workflow YAML (quoting, parsing, actionlint); for *semantic and functional* workflow design (what a workflow should do, agentic-workflow behavior), see .github/agents/agentic-workflows.agent.md — the two are complementary. INVOKES: actionlint (downloaded pinned binary) plus git/grep for inspection.

开发编程GitHub ActionsYAMLCI/CD审查通用
4.8k
Stars
351
Forks
40
仓库内 Skill
+610
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/dotnet/skills/main/.agents/skills/authoring-github-workflows/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/dotnet/skills/main/.agents/skills/authoring-github-workflows/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Authoring GitHub Actions Workflows Safely

GitHub Actions workflow files are YAML, but **valid YAML is not the same as a valid workflow**. A workflow can parse cleanly with `yaml.safe_load` (or a casual review) yet still be rejected by GitHub Actions at load time — producing the opaque failure *"This run likely failed because of a workflow file issue"* with **zero jobs started**. This skill teaches the YAML-vs-Actions traps (the `#`-as-comment trap above all), how to quote expression scalars correctly, and how to validate with `actionlint` before merge.

> **Scope: syntactic vs. semantic.** This skill is about the *syntactic and structural* correctness of workflow YAML — quoting, parsing, 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有