create-github-action-workflow-specification
github/awesome-copilot
Create formal, AI-optimized specifications for GitHub Actions workflows to improve maintainability and AI consumption.
What is create-github-action-workflow-specification?
This skill generates comprehensive, structured specifications for existing GitHub Actions CI/CD workflows. It abstracts implementation details into a semantic specification focused on behavior, requirements, and constraints—designed for efficient AI processing and workflow evolution. Use it when you need to document workflow intent, dependencies, and quality gates independently of syntax.
- Extract workflow purpose, trigger events, and execution flow into structured diagrams
- Map job dependencies and create execution flow visualizations using Mermaid
- Document input/output contracts, secrets, variables, and environmental constraints
- Define functional, security, and performance requirements with acceptance criteria
- Specify error handling strategies, quality gates, and validation criteria
- Create token-efficient specifications optimized for AI consumption and maintenance
How to install create-github-action-workflow-specification
npx skills add https://github.com/github/awesome-copilot --skill create-github-action-workflow-specificationHow to use create-github-action-workflow-specification
- 1.Identify the GitHub Actions workflow file you want to specify (e.g., `.github/workflows/ci.yml`)
- 2.Run the skill and provide the workflow file path when prompted
- 3.The skill analyzes the workflow to extract purpose, jobs, dependencies, and constraints
- 4.Review the generated specification template and fill in missing details (requirements, error handling, monitoring)
- 5.Save the specification to `/spec/spec-process-cicd-[workflow-name].md` in your repository
- 6.Use the specification as the source of truth for workflow updates and AI-assisted modifications
Use cases
- Document a complex multi-job CI/CD pipeline before refactoring to improve clarity for AI agents
- Generate a specification for a deployment workflow to establish quality gates and approval requirements
- Create a formal spec for a security-scanning workflow to define compliance and audit requirements
- Establish a specification template for a build-test-deploy workflow to standardize across teams
- Document edge cases and error recovery paths in an existing workflow for better maintainability
- DevOps engineers managing complex CI/CD workflows
- Platform teams standardizing workflow documentation across repositories
- AI agents (Claude Code, Cursor) analyzing or modifying workflows
- Technical leads establishing workflow governance and change control
- Teams transitioning workflows to AI-assisted maintenance
create-github-action-workflow-specification FAQ
The specification is implementation-agnostic and focuses on *what* the workflow accomplishes (purpose, requirements, constraints) rather than *how* it's implemented (syntax, tool versions, commands). This makes it more durable and AI-friendly.
Yes. The skill extracts behavior and intent from any GitHub Actions workflow file, making it useful for understanding and documenting workflows across your organization.
The specification includes a change management section with a version history table. Update the specification first, then apply changes to the workflow, following the documented approval and testing process.
The specification is intentionally system-agnostic. While optimized for GitHub Actions, the structure (jobs, requirements, constraints, error handling) translates to other CI/CD platforms.
Include enough detail for an AI agent or new team member to understand workflow intent, dependencies, and constraints without reading YAML syntax. Use tables and structured data to maximize token efficiency.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: create-github-action-workflow-specification description: 'Create a formal specification for an existing GitHub Actions CI/CD workflow, optimized for AI consumption and workflow maintenance.'
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
| 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.
Related skills
More from github/awesome-copilot and the wider catalog.
git-commit
Execute semantic git commits with conventional message analysis and intelligent staging.
excalidraw-diagram-generator
Generate Excalidraw diagrams from natural language descriptions.
documentation-writer
Create structured technical documentation using the Diátaxis framework for tutorials, how-to guides, references, and explanations.
gh-cli
GitHub CLI comprehensive reference for repositories, issues, PRs, Actions, projects, releases, and all GitHub operations from the command line.
prd
Generate comprehensive Product Requirements Documents with executive summaries, user stories, technical specs, and risk analysis.
refactor
Surgical code refactoring to improve maintainability without changing behavior.