This procedure sets up a repository for GitHub Agentic Workflows and then has a coding agent write, compile and commit a workflow from a plain-language description. GitHub’s tutorial walks it through with an automated pull request reviewer that checks whether changes are adequately tested, and a companion how-to walks through a daily or weekly repository activity report delivered as an issue. GitHub notes that Agentic Workflows are in public preview and subject to change.
Prerequisites
- A repository with GitHub Actions enabled, to which you have write access.
- GitHub CLI 2.0.0 or later, installed and authenticated; the documentation’s login command is
gh auth login --scopes repo,workflow. - Access to a supported coding agent and its credential — the tutorial names Claude Code, OpenAI Codex, Google Gemini CLI and Copilot CLI.
Steps
- Install the Agentic Workflows extension for GitHub CLI:
gh extension install github/gh-aw. From GitHub CLI 2.90.0, running anygh awcommand prompts to install it if it is missing. - Choose the engine that will run the workflow and make its credential available. For
Claude Code, OpenAI Codex or
Gemini CLI, store the corresponding API key (
ANTHROPIC_API_KEY,OPENAI_API_KEYorGEMINI_API_KEY) as a repository secret under Settings → Secrets and variables → Actions. Copilot CLI is the default engine; in an organization-owned repository it needs no separate secret whencopilot-requests: writeis added to the workflow’s frontmatterpermissions, while a personal repository needs aCOPILOT_GITHUB_TOKENsecret holding a fine-grained personal access token with Copilot Requests set to Read. Organization billing also requires an organization administrator to enable the “Allow use of Copilot CLI billed to the organization” policy in the organization’s Copilot policy settings. - From the repository root, run
gh aw init. This adds skills and instructions that help a coding agent create and edit workflows. - Start a coding agent session in the repository — for example Claude Code, OpenAI Codex, Gemini CLI, GitHub Copilot CLI or VS Code agent mode.
- Invoke the
agentic-workflowsskill with a description of the workflow, e.g./agentic-workflows create a pr reviewer that ensure the changes are tested.The agent creates a workflow Markdown file in.github/workflows/, compiles the corresponding.lock.ymlGitHub Actions workflow, and asks you to review and commit both. - Review the generated workflow, then ask the agent to commit and push the files.
- Run it. A workflow can be triggered from the repository’s Actions tab or with
gh aw run YOUR-WORKFLOW-NAME; the example reviewer triggers on pull requests, so opening or updating one runs it, and on completion it leaves a pull request review noting whether the changes include enough tests.
Notes
- The same conversational approach is how the workflow is maintained afterwards: GitHub suggests asking the agent to refine the review criteria, add checks, or debug a failed run in natural language.
- To update a workflow by hand, edit its Markdown file in
.github/workflows/, rungh aw compileto refresh the lock file, commit and push both files, and verify the GitHub Actions checks on a pull request. - Other engines beyond the four above, such as an experimental one called Pi, are listed in the project’s own authentication reference.