跳到正文
Skillpedia
部署与云(DevOps)40k · #7135

create-github-action-workflow-specification

它能做什么

这个工具可以创建一份详细的文档,用来描述自动化流程(称为“工作流”)是如何运作的。文档会说明它做什么、如何被触发、有哪些要求,以及如何处理错误,但不涉及具体的编程细节。

适用场景

  • ✓当你想了解一个已有的自动化流程时。
  • ✓当你需要记录一个自动化流程应该如何运作时。
  • ✓当你计划对某个自动化流程进行修改时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/create-github-action-workflow-specification/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/create-github-action-workflow-specification/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为名为 'build-and-deploy' 的 GitHub Actions 工作流创建一份规格说明。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会读取工作流的配置文件,提取其中关于触发条件、执行步骤、依赖项、运行要求和预期行为的信息,然后把这些内容整理成一份结构清晰的文档。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Create GitHub Actions Workflow Specification

Create a comprehensive specification for the GitHub Actions workflow: ${input:WorkflowFile}.

This specification serves as a specification for the workflow's behavior, requirements, and constraints. It must be implementation-agnostic, focusing on what the workflow accomplishes rather than how it's implemented.

AI-Optimized Requirements

  • Token Efficiency: Use concise language without sacrificing clarity
  • Structured Data: Leverage tables, lists, and diagrams for dense information
  • Semantic Clarity: Use precise terminology consistently throughout
  • Implementation Abstraction: Avoid specific syntax, commands, or tool versions
  • Maintainability: Design for easy updates as workflow evolves

Specification Template

Save as: /spec/spec-process-cicd-[workflow-name].md

---
title: CI/CD Workflow Specification - [Workflow Name]
version: 1.0
date_created: [YYYY-MM-DD]
last_updated: [YYYY-MM-DD]
owner: DevOps Team
tags: [process, cicd, github-actions, automation, [domain-specific-tags]]
---

## Workflow Overview

**Purpose**: [One sentence describing workflow's primary goal]
**Trigger Events**: [List trigger conditions]
**Target Environments**: [Environment scope]

## Execution Flow Diagram

```mermaid
graph TD
    A[Trigger Event] --> B[Job 1]
    B --> C[Job 2]
    C --> D[Job 3]
    D --> E[End]
    
    B --> F[Parallel Job]
    F --> D
    
    style A fill:#e1f5fe
    style E fill:#e8f5e8

Jobs & Dependencies

Job Name Purpose Dependencies Execution Context
job-1 [Purpose] [Prerequisites] [Runner/Environment]
job-2 [Purpose] job-1 [Runner/Environment]

Requirements Matrix

Functional Requirements

ID Requirement Priority Acceptance Criteria
REQ-001 [Requirement] High [Testable criteria]
REQ-002 [Requirement] Medium [Testable criteria]

Security Requirements

ID Requirement Implementation Constraint
SEC-001 [Security requirement] [Constraint description]

Performance Requirements

ID Metric Target Measurement Method
PERF-001 [Metric] [Target value] [How measured]

Input/Output Contracts

Inputs

# Environment Variables
ENV_VAR_1: string  # Purpose: [description]
ENV_VAR_2: secret  # Purpose: [description]

# Repository Triggers
paths: [list of path filters]
branches: [list of branch patterns]

Outputs

# Job Outputs
job_1_output: string  # Description: [purpose]
build_artifact: file  # Description: [content type]

Secrets & Variables

Type Name Purpose Scope
Secret SECRET_1 [Purpose] Workflow
Variable VAR_1 [Purpose] Repository

Execution Constraints

Runtime Constraints

  • Timeout: [Maximum execution time]
  • Concurrency: [Parallel execution limits]
  • Resource Limits: [Memory/CPU constraints]

Environmental Constraints

  • Runner Requirements: [OS/hardware needs]
  • Network Access: [External connectivity needs]
  • Permissions: [Required access levels]

Error Handling Strategy

Error Type Response Recovery Action
Build Failure [Response] [Recovery steps]
Test Failure [Response] [Recovery steps]
Deployment Failure [Response] [Recovery steps]

Quality Gates

Gate Definitions

Gate Criteria Bypass Conditions
Code Quality [Standards] [When allowed]
Security Scan [Thresholds] [When allowed]
Test Coverage [Percentage] [When allowed]

Monitoring & Observability

Key Metrics

  • Success Rate: [Target percentage]
  • Execution Time: [Target duration]
  • Resource Usage: [Monitoring approach]

Alerting

Condition Severity Notification Target
[Condition] [Level] [Who/Where]

Integration Points

External Systems

System Integration Type Data Exchange SLA Requirements
[System] [Type] [Data format] [Requirements]

Dependent Workflows

…

常见问题

GitHub Actions 中的“工作流”是什么?

它是在 GitHub 上运行的自动化流程,用来完成构建代码、执行测试或部署应用等任务。

为什么需要“规格说明”?

规格说明就像一份详细的说明手册,帮助所有人了解工作流做什么、如何运作以及遵循哪些规则,从而更容易维护和协作。

这个工具会编写工作流代码吗?

不会。它只会生成描述工作流的文档,不会编写或修改自动化代码本身。

详情

作者的原始描述

Create a formal specification for an existing GitHub Actions CI/CD workflow, optimized for AI consumption and workflow maintenance.

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7135
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能