소스 정보
- 저장소
- github/gh-aw
- 최근 소스 활동
- 2026년 5월 19일 17:09
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4,937
- 포크
- 497
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/github/gh-aw --skill error-messages명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
GitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension for writing Agentic Workflows in markdown and compiling them to GitHub Actions.
Operate safely and efficiently inside a gh-aw workflow with a restricted tools/bash allowlist, and correctly triage tool-denial events before they exhaust the session's denial budget.
Optional Sergo examples for cache formats and reporting templates.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | error-messages |
| description | Write consistent, actionable validation error messages in gh-aw. |
Use this format for gh-aw validation errors. Keep messages clear, actionable, and example-driven.
[what's wrong]. [what's expected]. [example of correct usage]
Make each error message answer three questions:
Avoid standalone negative wording. Pair it with expected behavior and a concrete fix.
| Avoid only-negative wording | Prefer constructive wording |
|---|---|
invalid | expected + valid format/options |
cannot | requires + precondition |
must | should + example |
failed | action context + recovery step |
❌ invalid repo format: %s
✅ invalid repo format '%s' — expected 'owner/repo' format (for example: 'github/gh-aw')
❌ not in a git repository
✅ not in a git repository — run 'git init' or 'cd' to a git repository
NewValidationError vs fmt.ErrorfNewValidationError(field, value, reason, suggestion) in *_validation.go logic.
field for the exact config pathreason for what failedsuggestion for an actionable fix with an examplefmt.Errorf for operational/wrapping errors (%w) where you are propagating a lower-level failure with context.fmt.Errorf("failed to X: %w", err) unless you add recovery guidance.Every suggestion should:
Example:
Use one supported engine.
✓ Example:
engine: copilot
✗ Avoid:
engine: unknown
These examples follow the template and provide actionable guidance:
return nil, fmt.Errorf("invalid time delta format: +%s. Expected format like +25h, +3d, +1w, +1mo, +1d12h30m", deltaStr)
✅ Why it's good:
return "", fmt.Errorf("manual-approval value must be a string, got %T. Example: manual-approval: \"production\"", val)
✅ Why it's good:
return fmt.Errorf("invalid engine: %s. Valid engines are: copilot, claude, codex, custom. Example: engine: copilot", engineID)
✅ Why it's good:
return fmt.Errorf("tool '%s' mcp configuration must specify either 'command' or 'container'. Example:\ntools:\n %s:\n command: \"npx @my/tool\"", toolName, toolName)
✅ Why it's good:
These examples lack clarity or actionable guidance:
return fmt.Errorf("invalid format")
❌ Problems:
return fmt.Errorf("manual-approval value must be a string")
❌ Problems:
return fmt.Errorf("invalid engine: %s", engineID)
❌ Problems:
Always include examples for:
Format/Syntax Errors - Show the correct syntax
fmt.Errorf("invalid date format. Expected: YYYY-MM-DD HH:MM:SS. Example: 2024-01-15 14:30:00")
Enum/Choice Fields - List all valid options
fmt.Errorf("invalid permission level: %s. Valid levels: read, write, none. Example: permissions:\n contents: read", level)
Type Mismatches - Show expected type and example
fmt.Errorf("timeout-minutes must be an integer, got %T. Example: timeout-minutes: 10", value)
Complex Configurations - Provide complete valid example
fmt.Errorf("invalid MCP server config. Example:\nmcp-servers:\n my-server:\n command: \"node\"\n args: [\"server.js\"]")
Examples can be omitted when:
Error is from wrapped error - When wrapping another error with context
return fmt.Errorf("failed to parse configuration: %w", err)
Error is self-explanatory with clear context
return fmt.Errorf("duplicate unit '%s' in time delta: +%s", unit, deltaStr)
Error points to specific documentation
return fmt.Errorf("unsupported feature. See https://docs.example.com/features")
%s - strings%d - integers%T - type of value%v - general value%w - wrapped errorsFor YAML configuration examples spanning multiple lines:
fmt.Errorf("invalid config. Example:\ntools:\n github:\n mode: \"remote\"")
Use proper YAML syntax in examples:
// Good - shows quotes when needed
fmt.Errorf("Example: name: \"my-workflow\"")
// Good - shows no quotes for simple values
fmt.Errorf("Example: timeout-minutes: 10")
Use the same field names as in YAML:
// Good - matches YAML field name
fmt.Errorf("timeout-minutes must be positive")
// Bad - uses different name
fmt.Errorf("timeout must be positive")
All improved error messages should have corresponding tests:
func TestErrorMessageQuality(t *testing.T) {
err := validateSomething(invalidInput)
require.Error(t, err)
// Error should explain what's wrong
assert.Contains(t, err.Error(), "invalid")
// Error should include expected format or values
assert.Contains(t, err.Error(), "Expected")
// Error should include example
assert.Contains(t, err.Error(), "Example:")
}
When improving existing error messages:
// Time deltas
fmt.Errorf("invalid time delta format: +%s. Expected format like +25h, +3d, +1w, +1mo, +1d12h30m", input)
// Dates
fmt.Errorf("invalid date format: %s. Expected: YYYY-MM-DD or relative like -1w. Example: 2024-01-15 or -7d", input)
// URLs
fmt.Errorf("invalid URL format: %s. Expected: https:// URL. Example: https://api.example.com", input)
// Boolean expected
fmt.Errorf("read-only must be a boolean, got %T. Example: read-only: true", value)
// String expected
fmt.Errorf("workflow name must be a string, got %T. Example: name: \"my-workflow\"", value)
// Object expected
fmt.Errorf("permissions must be an object, got %T. Example: permissions:\n contents: read", value)
// Engine selection
fmt.Errorf("invalid engine: %s. Valid engines: copilot, claude, codex, custom. Example: engine: copilot", id)
// Permission levels
fmt.Errorf("invalid permission level: %s. Valid levels: read, write, none. Example: contents: read", level)
// Tool modes
fmt.Errorf("invalid mode: %s. Valid modes: local, remote. Example: mode: \"remote\"", mode)
// Missing required field
fmt.Errorf("tool '%s' missing required 'command' field. Example:\ntools:\n %s:\n command: \"node server.js\"", name, name)
// Mutually exclusive fields
fmt.Errorf("cannot specify both 'command' and 'container'. Choose one. Example: command: \"node server.js\"")
// Invalid combination
fmt.Errorf("http MCP servers cannot use 'container' field. Example:\ntools:\n my-http:\n type: http\n url: \"https://api.example.com\"")
pkg/workflow/time_delta.gopkg/workflow/*_test.goWhen writing error messages, consider: