GitHub Agentic Workflows

Using Claude Code with GitHub Agentic Workflows

Claude Code is Anthropic’s agentic coding interface for repository analysis and code changes. GitHub Agentic Workflows runs Claude Code in GitHub Actions, adding GitHub event triggers and guardrails.

To select Claude Code as the AI engine, with inference hosted and and billed through an Anthropic subscription, add this to the workflow frontmatter:

engine: claude

To authenticate, either

  1. Provide ANTHROPIC_API_KEY as a GitHub Actions repository secret, or

  2. Use keyless Anthropic Workload Identity Federation.

Claude subscription OAuth tokens such as CLAUDE_CODE_OAUTH_TOKEN are not supported.

.github/workflows/daily-status.md
---
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 items

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.

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.

Terminal window
gh aw init --engine claude

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. Claude Code in Actions

Section titled “GitHub Agentic Workflows vs. Claude Code in Actions”

Running coding agent CLIs such as claude directly in GitHub Actions without an adequate security architecture is not recommended. GitHub Agentic Workflows gives an appropriate security architecture and workflow portability across AI engines.

The anthropics/claude-code-action workflow has a security model with fewer guardrails. It is not recommended for use in GitHub Actions if GitHub Agentic Workflows are available for use.