gh-aw AGENTS.md

gh-aw AGENTS.md is an instructions file for Codex, OpenCode from github/gh-aw. It costs 1,954 tokens per session, scanned A, original, MIT.

Repository instructions for gh-aw, a GitHub CLI extension that turns Markdown workflows into GitHub Actions.

In plain words
What is it for?
They are for authoring, compiling, running, auditing, testing, committing, and pushing GitHub agentic workflows.
Why use it?
They prevent confusion between gh-aw and the separate GitHub Copilot CLI and define rules for safely changing and reporting workflow work.

Instructions file for CodexOpenCode

About the project

GitHub Agentic Workflows is a GitHub CLI extension that lets developers define AI-assisted repository automation in Markdown and run it through GitHub Actions. It is intended for tasks requiring interpretation or reasoning, such as issue triage, pull-request review, CI investigation, documentation maintenance, and dependency analysis. The catalogue entries provide skills and agents for working with these workflows.

github/gh-aw · 5,104 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/github/gh-aw/agents-md
Clone the repo
git clone --depth 1 https://github.com/github/gh-aw

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-aw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/github/gh-aw/agents-md.svg)](https://agentmods.dev/instructions/github/gh-aw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/github/gh-aw/agents-md"><img src="https://agentmods.dev/badge/instructions/github/gh-aw/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,954 This file is loaded in full into every session.
When invoked 1,954 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01954 $0.01954
Opus 5 $0.00977 $0.00977
Sonnet 5 $0.00391 $0.00391
Haiku 4.5 $0.00195 $0.00195

Measured yesterday against content hash 040a1f00a853, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gh-aw AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub Agentic Workflows (gh-aw)

GitHub Agentic Workflows (gh-aw) is a GitHub CLI extension that compiles markdown workflows into GitHub Actions.

Important Note: gh-aw vs GitHub Copilot CLI

  • gh-aw is the gh aw CLI extension.
  • copilot is a separate CLI used as one possible runtime engine.
  • Use gh aw commands for workflow authoring/compilation (gh aw compile, gh aw run, gh aw audit).

Ambient Context (First Invocation)

To keep first-turn context small, only these repository root instruction files should be considered ambient:

File Purpose
AGENTS.md Minimal global operating rules and routing
SKILL.md Short repository capability summary

Everything else should be loaded lazily through skills only when needed.

Critical Rules (Always Applicable)

  1. If you changed files, use report_progress to commit and push.
  2. Before intermediate report_progress calls, run make agent-report-progress-no-test (fast, no tests). Before the final report_progress, run make agent-report-progress (includes test-unit).
    • test-unit is impacted-first by default (~30s target). Use TEST_UNIT_RUN_FULL=1 make test-unit or make test-unit-all when full-suite coverage is required.
    • Run test-unit only once per PR — at the final push, not on every intermediate save.
  3. After Go changes, run make fmt.
  4. After workflow markdown changes (.md under .github/workflows/), run make recompile.
  5. Do not add .lock.yml files to .gitignore.
  6. Never attempt to trigger a workflow run (e.g., gh run, gh aw run) as part of a Copilot cloud agent run. The token does not have the required access. Always fail with an error — do not task the user or ask them to run it manually.
  7. Large-file guard: before reading any file with github-mcp-server-get_file_contents, check its size. Files larger than 20 KB must be read with targeted tools (grep, glob, bash, or view with view_range) instead of full-file reads. See token-optimization.md for the full technique.
  8. Never ask the user to confirm the plan. Always execute the plan.
  9. Autopilot mode: Never ask for confirmation before taking action. Never prompt the user with "Should I proceed?", "Do you want me to…?", or any equivalent. Always act immediately and autonomously.

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 149 lines · 1,954 tokens per session scan A 040a1f00a853

Subscribe to this mod's changes

gh-aw AGENTS.md is an instructions file published in the GitHub repository github/gh-aw (5,104 stars, last pushed today), licensed MIT. It adds 1,954 tokens to every session, about $0.0098 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.