This prompt guides you, a coding agent, to create, debug, update or do other actions related to GitHub Agentic Workflows (gh-aw) in a repository.
Check if gh aw is installed by running
gh aw versionIf it is installed, run:
gh extension upgrade awto upgrade to latest. If it is not installed, run the installation script from the main branch of the gh-aw repository:
curl -sL https://raw.githubusercontent.com/github/gh-aw/main/install-gh-aw.sh | bashWhat this does: Downloads and installs the gh-aw binary to ~/.local/share/gh/extensions/gh-aw/
Verify installation:
gh aw versionYou should see version information displayed. If you encounter an error, check that:
- GitHub CLI (
gh) is installed and authenticated - The installation script completed without errors
~/.local/share/gh/extensionsis in your PATH
Fetch (download) the full content of the appropriate prompt file based on the user's request, then follow its instructions carefully. Read ALL the instructions in the prompt file before taking any action.
Below, ROOT is the location where you found this file. Always use the main branch, regardless of the URL you fetched this file from:
- ROOT is
https://raw.githubusercontent.com/github/gh-aw/main
Prompt files under ROOT/.github/aw/ may reference other files in that same directory using relative links (e.g. [designer.md](designer.md)). Resolve those links against ROOT/.github/aw/ as well, and fetch and read them before proceeding if they are relevant to the task.
Here are the common actions you may be asked to do, with links to the appropriate prompt files:
Load when: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
Prompt file: ROOT/.github/aw/create-agentic-workflow.md
Use cases:
- "Create a workflow that triages issues"
- "I need a workflow to label pull requests"
- "Design a weekly research automation"
Load when: User wants to modify, improve, or refactor an existing workflow
Prompt file: ROOT/.github/aw/update-agentic-workflow.md
Use cases:
- "Add web-fetch tool to the issue-classifier workflow"
- "Update the PR reviewer to use discussions instead of issues"
- "Improve the prompt for the weekly-research workflow"
Load when: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
Prompt file: ROOT/.github/aw/debug-agentic-workflow.md
Use cases:
- "Why is this workflow failing?"
- "Analyze the logs for workflow X"
- "Investigate missing tool calls in run #12345"
Load when: User wants to upgrade workflows to a new gh-aw version or fix deprecations
Prompt file: ROOT/.github/aw/upgrade-agentic-workflows.md
Use cases:
- "Upgrade all workflows to the latest version"
- "Fix deprecated fields in workflows"
- "Apply breaking changes from the new release"
Load when: User wants to create a reusable workflow component or wrap an MCP server
Prompt file: ROOT/.github/aw/create-shared-agentic-workflow.md
Use cases:
- "Create a shared component for Notion integration"
- "Wrap the Slack MCP server as a reusable component"
- "Design a shared workflow for database queries"
If you need to clarify requirements or discuss options, and you are working in an interactive agent chat system, do so interactively with the user. If running non-interactively, make reasonable assumptions based on the repository context.
Check what files were changed or created:
git statusIf creating a workflow, the actual files you created will be under .github/workflows/. There should be at least one workflow file and one lock file.
.github/workflows/<workflow-name>.md.github/workflows/<workflow-name>.lock.yml
If creating a workflow, check the .gitattributes file and make sure it exists and contains at least the following line:
.github/workflows/*.lock.yml linguist-generated=true
You do not need to run gh aw init as part of your workflow creation. However if you did run this you may also see:
.github/skills/agentic-workflows/SKILL.md.vscode/settings.json.github/mcp.json- And several other configuration files
Don't remove these but don't add them if not already present in the repo. Unless instructed otherwise do NOT commit the changes to ANY files except the gitattributes file and workflow files.
.gitattributes.github/workflows/<workflow-name>.md.github/workflows/<workflow-name>.lock.yml
Commit the changes, e.g.
git add .gitattributes .github/workflows/<workflow-name>.md .github/workflows/<workflow-name>.lock.yml
git commit -m "Initialize repository for GitHub Agentic Workflows"
git pushIf there is branch protection on the default branch, create a pull request instead and report the link to the pull request.
- For errors while creating, updating, or compiling a workflow, re-check the relevant prompt file loaded in Step 2 (e.g.
ROOT/.github/aw/create-agentic-workflow.md). - For failing or unexpected workflow runs, use
ROOT/.github/aw/debug-agentic-workflow.md. - For CLI installation or general usage errors, see
ROOT/docs/src/content/docs/troubleshooting/common-issues.md.
When a user interacts with you:
- Identify the task type from the user's request
- Fetch and read the appropriate prompt
- Follow the loaded prompt's instructions exactly
- If uncertain, ask clarifying questions to determine the right prompt
# Create a new workflow (bare template; prefer the guided interview in Step 2 for full support)
gh aw new <workflow-name>
# Compile workflows
gh aw compile [workflow-name]
# Debug workflow runs
gh aw logs [workflow-name]
gh aw audit <run-id>
# Upgrade workflows
gh aw fix --write
gh aw compile --validate- Natural Language Workflows: Write workflows in markdown with YAML frontmatter
- AI Engine Support: Copilot, Claude, Codex, or custom engines
- MCP Server Integration: Connect to Model Context Protocol servers for tools
- Safe Outputs: Structured communication between AI and GitHub API
- Strict Mode: Security-first validation and sandboxing
- Shared Components: Reusable workflow building blocks
- Repo Memory: Persistent git-backed storage for agents
- Workflows must be compiled to
.lock.ymlfiles before running in GitHub Actions - Follow security best practices: minimal permissions, explicit network access, no template injection