messages
FeaturedAdd new safe-output message types and wire validation/rendering.
AI & Automation 5,125 stars
539 forks Updated today MIT
Install
Quality Score: 90/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Adding New Message Types Guide
Use this guide to add a new safe-output message type so it works in the current gh-aw pipeline: frontmatter → schema → Go compiler → JavaScript modules → action/workflow build output.
## Overview
The messages system lets workflow authors customize safe-output messages. The current architecture does not rely on the old `pkg/workflow/js.go` embedding registry for runtime shipping.
Current flow:
1. **Frontmatter** (YAML)
2. **JSON Schema**
3. **Go Compiler**
4. **JavaScript module** under `pkg/workflow/js/` or `actions/setup/js/`
5. **Action/workflow bundle generation** via `make actions-build` or the relevant workflow build path
## Step 1: Update JSON Schema
Add the new message field to `pkg/parser/schemas/main_workflow_schema.json` in the `messages` object:
```json
{
"messages": {
"properties": {
"my-new-message": {
"type": "string",
"description": "Description of when this message is used. Available placeholders: {placeholder1}, {placeholder2}.",
"examples": [
"Example message with {placeholder1}"
]
}
}
}
}
```
**Key points:**
- Use `kebab-case` for the YAML field name (for example `my-new-message`)
- Document placeholders in the description
- Provide helpful examples
- Rebuild the schema-backed binary or run the relevant compile checks after changes
## Step 2: Update Go Struct
Add the field to `SafeOutputMessagesConfig` in `pkg/workflow/compiler.go`:
```go
type SafeOutputMessagesConfig...
Details
- Author
- github
- Repository
- github/gh-aw
- Created
- 1 years ago
- Last Updated
- today
- Language
- Go
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
error-messages
Write consistent, actionable validation error messages in gh-aw.
5,125 Updated today
github Code & Development Featured
developer-internals
Internal gh-aw architecture: validation system design, safe output message patterns, schema validation, YAML compatibility notes, and MCP logs guardrail.
5,125 Updated today
github AI & Automation Listed
scaffold-message-handler
Scaffold a message consumer in a .NET workspace (MassTransit, RabbitMQ, Azure Service Bus when detected, or similar). Collects requirements first. Use when creating a consumer or invoking /scaffold-message-handler.
0 Updated 3 days ago
tibursocampos