Using Claude Code with GitHub Agentic Workflows
Claude Code is Anthropic’s agentic coding interface for repository analysis and code changes. GitHub Agentic Workflows (gh-aw) runs Claude Code through GitHub Actions from a Markdown workflow, adds GitHub event triggers, and can route configured writes through validated safe outputs.
Selection and authentication
Section titled “Selection and authentication”Set engine: claude in workflow frontmatter and provide ANTHROPIC_API_KEY, or configure keyless Anthropic Workload Identity Federation. Claude subscription OAuth tokens such as CLAUDE_CODE_OAUTH_TOKEN are not supported.
Example: scheduled repository report
Section titled “Example: scheduled repository report”---on: schedule: daily
permissions: contents: read issues: read pull-requests: read
engine: claude
safe-outputs: create-issue: title-prefix: "[status] " labels: [report] close-older-issues: true---
# Daily Repository Status
Analyze the repository and create a concise daily status report covering:- Open issues and their priority- Recent PR activity- Upcoming work itemsCapabilities and limitations
Section titled “Capabilities and limitations”Claude Code supports native web search, bare mode, top-level max-turns, and per-command bash allowlisting. It does not support Copilot-specific max-continuations, native engine.agent selection, or custom engine.harness scripts. See the AI engine feature comparison.
Guided workflow authoring with Claude Code
Section titled “Guided workflow authoring with Claude Code”Claude Code users can initialize the repository and author agentic workflows with interactive guidance — no Copilot subscription required.
Initialize for Claude
Section titled “Initialize for Claude”Run gh aw init --engine claude to configure the repository. The --engine claude flag skips Copilot-specific files (MCP server configuration, Copilot dispatcher skill) and only writes the files useful for any engine: .gitattributes, VS Code settings, and the custom agent file.
gh aw init --engine claudeCreate a workflow
Section titled “Create a workflow”Start Claude Code in your repository and run:
Create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
The purpose of the workflow is <describe your automation goal here>.The agent fetches create.md, installs the gh aw CLI if needed, guides you through trigger selection, tools, safe outputs, and permissions, then generates .github/workflows/<name>.md and compiles it to a .lock.yml.
After the files are committed, set engine: claude in workflow frontmatter (if not already set) and configure ANTHROPIC_API_KEY or Anthropic WIF.
GitHub Agentic Workflows vs. anthropics/claude-code-action
Section titled “GitHub Agentic Workflows vs. anthropics/claude-code-action”Choose GitHub Agentic Workflows when the workflow should be defined in Markdown, use the gh-aw security model, remain portable across built-in engines, or use safe outputs for validated GitHub writes. Choose anthropics/claude-code-action when the main goal is native Claude-driven PR assistance around comment and mention workflows.