create-github-action-workflow-specification
作者: github
为GitHub Actions工作流生成正式的、AI优化的规范,以标准化文档并支持维护。生成结构化的Markdown规范,包含执行流程图、作业依赖矩阵和需求表,专为令牌效率设计。涵盖功能、安全和性能需求,以及输入/输出契约、错误处理策略和质量门禁。包含监控、合规性、边缘情况和变更管理等章节...
npx skills add https://github.com/github/awesome-copilot --skill create-github-action-workflow-specificationCreate 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
| Workflow | Relationship | Trigger Mechanism |
|---|---|---|
| [Workflow] | [Type] | [How triggered] |
Compliance & Governance
Audit Requirements
- Execution Logs: [Retention policy]
- Approval Gates: [Required approvals]
- Change Control: [Update process]
Security Controls
- Access Control: [Permission model]
- Secret Management: [Rotation policy]
- Vulnerability Scanning: [Scan frequency]
Edge Cases & Exceptions
Scenario Matrix
| Scenario | Expected Behavior | Validation Method |
|---|---|---|
| [Edge case] | [Behavior] | [How to verify] |
Validation Criteria
Workflow Validation
- VLD-001: [Validation rule]
- VLD-002: [Validation rule]
Performance Benchmarks
- PERF-001: [Benchmark criteria]
- PERF-002: [Benchmark criteria]
Change Management
Update Process
- Specification Update: Modify this document first
- Review & Approval: [Approval process]
- Implementation: Apply changes to workflow
- Testing: [Validation approach]
- Deployment: [Release process]
Version History
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.0 | [Date] | Initial specification | [Author] |
Related Specifications
- [Link to related workflow specs]
- [Link to infrastructure specs]
- [Link to deployment specs]
## Analysis Instructions
When analyzing the workflow file:
1. **Extract Core Purpose**: Identify the primary business objective
2. **Map Job Flow**: Create dependency graph showing execution order
3. **Identify Contracts**: Document inputs, outputs, and interfaces
4. **Capture Constraints**: Extract timeouts, permissions, and limits
5. **Define Quality Gates**: Identify validation and approval points
6. **Document Error Paths**: Map failure scenarios and recovery
7. **Abstract Implementation**: Focus on behavior, not syntax
## Mermaid Diagram Guidelines
### Flow Types
- **Sequential**: `A --> B --> C`
- **Parallel**: `A --> B & A --> C; B --> D & C --> D`
- **Conditional**: `A --> B{Decision}; B -->|Yes| C; B -->|No| D`
### Styling
```mermaid
style TriggerNode fill:#e1f5fe
style SuccessNode fill:#e8f5e8
style FailureNode fill:#ffebee
style ProcessNode fill:#f3e5f5
Complex Workflows
For workflows with 5+ jobs, use subgraphs:
graph TD
subgraph "Build Phase"
A[Lint] --> B[Test] --> C[Build]
end
subgraph "Deploy Phase"
D[Staging] --> E[Production]
end
C --> D
Token Optimization Strategies
- Use Tables: Dense information in structured format
- Abbreviate Consistently: Define once, use throughout
- Bullet Points: Avoid prose paragraphs
- Code Blocks: Structured data over narrative
- Cross-Reference: Link instead of repeat information
Focus on creating a specification that serves as both documentation and a template for workflow updates.
来自 github 的更多技能
console-rendering
github
在Go中使用基于结构体标签的控制台渲染系统的说明
official
acquire-codebase-knowledge
github
当用户明确要求映射、记录或熟悉现有代码库时使用此技能。触发词如“映射此代码库”、“记录…
official
acreadiness-assess
github
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc…
official
acreadiness-generate-instructions
github
通过AgentRC指令命令生成定制化的AI代理指令文件。生成.github/copilot-instructions.md(默认,推荐用于VS Code中的Copilot…
official
acreadiness-policy
github
帮助用户选择、编写或应用AgentRC策略。策略通过禁用无关检查、覆盖影响/级别、设置…来定制就绪评分。
official
add-educational-comments
github
为代码文件添加教育性注释,将其转化为有效的学习资源。根据三个可配置的知识水平(初级、中级、高级)调整解释深度和语气。若未提供文件,自动请求文件,并附带编号列表以便快速选择。仅通过教育性注释将文件扩展最多125%(硬性限制:新增400行;超过1000行的文件限制为300行)。保留文件编码、缩进风格、语法正确性以及...
official
adobe-illustrator-scripting
github
使用ExtendScript(JavaScript/JSX)编写、调试和优化Adobe Illustrator自动化脚本。在创建或修改操作…的脚本时使用。
official
agent-governance
github
声明式策略、意图分类及审计追踪,用于控制AI代理工具访问与行为。可组合的治理策略定义允许/禁止的工具、内容过滤器、速率限制及审批要求——以配置而非代码形式存储。语义意图分类在执行工具前通过基于模式的信号检测危险提示(数据泄露、权限提升、提示注入)。工具级治理装饰器在函数层面强制执行策略...
official