gh-aw: Instructions file for Codex

AGENTS.md

gh-aw AGENTS.md is an instructions file for Codex, OpenCode from github/gh-aw. It costs 2,215 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 ✓ vendor

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: positional $N argument; mentions AGENTS.md.

This is github/gh-aw's own configuration. It tells Codex and OpenCode how to work on gh-aw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gh-aw configures →

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,469 stars · on GitHub · gh.io

Reuse

Borrowing it

Nothing to install: this file belongs to github/gh-aw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/github/gh-aw/main/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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-aw AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,215 This file is loaded in full into every session.
When invoked 2,215 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02215 $0.02215
Opus 5.5 $0.00886 $0.00886
Sonnet 5.5 $0.00443 $0.00443
Haiku 4.5 $0.00221 $0.00221

Measured 4d ago against content hash 65be9366de0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 4d ago.

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 · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 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. Copilot cloud agents may dispatch a workflow only when the user explicitly requests a dry-run test and the exact published source and lock revision has passed the review, compilation, and live-execution gates in .github/aw/debug-agentic-workflow.md. Compile with --dry-run and dispatch that reviewed revision; compilation alone does not start a run, and dispatch alone does not enable dry-run protections. Dry-run suppresses compiler-managed mutations, not arbitrary script effects. Non-dry-run dispatch remains prohibited. On an authorization error, stop and report it; never retry with different credentials, bypass protections, or ask the user 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.
  10. Grading contract: Follow .github/skills/operational-value-designer/SKILL.md. Built-ins compute over the in-memory unified session in conclusion; custom graders.<distinct-id>.script JavaScript and repository-owned graders.operational-value.run Bash run only in the separate graders job. Bash reads session JSONL from $1 / GH_AW_SESSION_FILE, config JSON from GH_AW_GRADER_CONFIG, and returns legacy metric arrays; detected file writes are rejected. Shell is trusted code, not yet microVM-isolated. Never add user code or steps to conclusion. Adopt workflow semantics and grader acceptance rules together at the same workflow path and commit; corrections are prospective and prior results are never rewritten.

Read the full file on GitHub · 151 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. 4d ago Changed · +72 tokens per session 65be9366de0e
  2. 6d ago Changed · +51 tokens per session 141f18c6835e
  3. 16d ago Changed · +1 lines · +34 tokens per session 614c0117340f
  4. 1mo ago Changed · +1 lines · +104 tokens per session 95a1ca6fd533
  5. 1mo ago 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,469 stars, last pushed today), licensed MIT. It adds 2,215 tokens to every session, about $0.0089 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens