gh-aw
AGENTS.md5.3k starsChanged 6 months agoMITView on GitHub
GitHub Agentic Workflows (gh-aw) is a GitHub CLI extension that compiles markdown workflows into GitHub Actions. To keep first-turn context small, only these repository root instruction files should be considered ambient: Everything else should be loaded lazily through skills only when needed. Workflows that declare a source: frontmatter entry (for example source: githubnext/agentic-ops@<ref>) are provenance-managed from an upstream bundle. Use skills only when the task requires specialized guidance. Do not pre-load every skill. All skills are local to this repository…
Trending
Quiet since March.thin dataabout the whole repository
Who's talking about github/gh-aw
- A Hacker News story“GitHub Agentic Workflows”Hacker News · Feb 11, 2026 · 2 points
- @kcieslak.io“We see that a lot in our OSSed AW repository which uses fully agentic development - github.com/github/gh-aw …”Bluesky · Mar 24, 2026 · 1 likes
- @github-trending.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 github / gh-aw ⭐ 2,482 (+213) 🗒 Go GitHub Agentic Workflows”Bluesky · Feb 15, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository108 other files it gives its agents.
- docs/src/content/docs/engines/claude.mdCLAUDE.md
- pkg/workflow/data/engines/claude.mdCLAUDE.md
- .squad/templates/copilot-instructions.mdCopilot instructions
- playwright-cliSkill
- agentic-workflowsSkill
- awf-release-integratorSkill
- checkout-credential-reviewSkill
- console-renderingSkill
- copilot-reviewSkill
- create-canvasSkill
- custom-agentsSkill
- custom-engine-implementationSkill
- debugging-workflowsSkill
- developer-code-organizationSkill
- developer-internalsSkill
- developer-releaseSkill
- developer-securitySkill
- developerSkill
- documentationSkill
- error-messagesSkill
- error-pattern-safetySkill
- error-recovery-patternsSkill
- gh-agent-sessionSkill
- gh-agent-taskSkill
- github-copilot-agent-tips-and-tricksSkill
- github-discussion-querySkill
- github-issue-querySkill
- github-labels-querySkill
- github-mcp-serverSkill
- github-pr-querySkill
- github-scriptSkill
- github-workflows-querySkill
- go-codemodSkill
- go-lintersSkill
- http-mcp-headersSkill
- javascript-refactoringSkill
- jqschemaSkill
- messagesSkill
- npmSkill
- open-pull-requestSkill
- operational-value-designerSkill
- optimize-agentic-workflowSkill
- otel-queriesSkill
- pr-finisherSkill
- prompt-token-efficiencySkill
- pr-to-go-linterSkill
- reportingSkill
- resolve-merge-conflictsSkill
- restricted-tool-triageSkill
- review-agentic-workflowsSkill
- security-advisory-compat-enforcerSkill
- sergo-examplesSkill
- skillz-integrationSkill
- ssl-skill-normalizerSkill
- temporary-id-safe-outputSkill
- workflow-step-summariesSkill
- GitHub Agentic WorkflowsSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 5 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 9
Use gh aw commands for workflow authoring/compilation (gh aw compile, gh aw run, gh aw audit).
- Very specific: line 24
If you changed files, use report_progress to commit and push.
- Very specific: line 25
Before intermediate report_progress calls, run make agent-report-progress-no-test (fast, no tests).
- Very specific: line 27
Run test-unit only once per PR — at the final push, not on every intermediate save.
- Very specific: line 28
After Go changes, run make fmt.
- Very specific: line 29
After workflow markdown changes (.md under .github/workflows/), run make recompile.
- Very specific: line 30
Do not add .lock.yml files to .gitignore.
- Very specific: line 31
Never attempt to trigger a workflow run (e.g., gh run, gh aw run) as part of a Copilot cloud agent run.
- Very specific: line 32
Large-file guard: before reading any file with github-mcp-server-get_file_contents, check its size.
- Distinctive: line 33
Never ask the user to confirm the plan.
- Distinctive: line 34
Autopilot mode: Never ask for confirmation before taking action.
- Very specific: line 41
Treat those workflow source files (for example .github/workflows/agentic-token-audit.md and .github/workflows/agentic-token-optimizer.md) …
- Very specific: line 42
Do not manually edit their generated .lock.yml files.
- Very specific: line 44
run gh aw update to refresh from source, and/or
- Very specific: line 45
update the pinned source/version (source: ...@...), and/or
- Distinctive: line 50
Use skills only when the task requires specialized guidance.
- Very specific: line 52
All skills are local to this repository under .github/skills/.
- Distinctive: line 54
When the relevant skill is not obvious, first discover candidates locally and then load only the minimal guidance needed:
- Distinctive: line 57
Use skill fusion after discovery: read only the specific skill sections or fragments needed instead of loading full skills broadly.
- Very specific: line 115
When adding new debug instrumentation to Go code, use pkg/logger — never fmt.Println, log.Printf, or other ad-hoc output:
- Very specific: line 131
All output is gated by DEBUG at runtime — no user-visible noise in normal operation.
- Very specific: line 135
When ACTIONS_RUNNER_DEBUG=true is set (enabled automatically on re-run with debug logging in the GitHub UI), all loggers are activated — …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 awCLI extension. - copilot is a separate CLI used as one possible runtime engine.
- Use
gh awcommands 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)
- If you changed files, use
report_progressto commit and push. - Before intermediate
report_progresscalls, runmake agent-report-progress-no-test(fast, no tests). Before the finalreport_progress, runmake agent-report-progress(includestest-unit).test-unitis impacted-first by default (~30s target). UseTEST_UNIT_RUN_FULL=1 make test-unitormake test-unit-allwhen full-suite coverage is required.- Run
test-unitonly once per PR — at the final push, not on every intermediate save.
- After Go changes, run
make fmt. - After workflow markdown changes (
.mdunder.github/workflows/), runmake recompile. - Do not add
.lock.ymlfiles to.gitignore. - 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. - 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, orviewwithview_range) instead of full-file reads. See token-optimization.md for the full technique. - Never ask the user to confirm the plan. Always execute the plan.
- 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.
- Operational-value contract: Do not edit an enabled evaluator independently of its workflow. Any necessary evaluator change must be made through
.github/skills/operational-value-designer/SKILL.md. Semantic changes update both at the same path and commit; evaluator-only corrections are prospective, and prior results are never rewritten. Validate changes with.github/skills/operational-value-designer/scripts/verify-operational-value-contract-change.sh <base-ref>; reserve--correctionfor explicit defect fixes.
Upstream-managed workflow sources (read-only in this repo)
Workflows that declare a source: frontmatter entry (for example source: githubnext/agentic-ops@<ref>) are provenance-managed from an upstream bundle.
- Treat those workflow source files (for example
.github/workflows/agentic-token-audit.mdand.github/workflows/agentic-token-optimizer.md) as read-only in this repository. - Do not manually edit their generated
.lock.ymlfiles. - To change these workflows, use the approved update path:
- run
gh aw updateto refresh from source, and/or - update the pinned source/version (
source: ...@...), and/or - make the change upstream first, then pull it in via
gh aw update.
- run
Lazy Skill Loading Policy
Use skills only when the task requires specialized guidance. Do not pre-load every skill.
All skills are local to this repository under .github/skills/. NEVER use GitHub Agent Finder (agentfinder.github.com) or any other remote skill discovery service to look for skills.
When the relevant skill is not obvious, first discover candidates locally and then load only the minimal guidance needed:
- Discover skills by listing or searching
.github/skills/*/SKILL.mdin this repository. - Use skill fusion after discovery: read only the specific skill sections or fragments needed instead of loading full skills broadly.
Use these skills by intent
- Workflow create/update/debug/upgrade tasks →
.github/skills/agentic-workflows/SKILL.md - Core engineering conventions, validation flow, and command playbooks →
.github/skills/developer/SKILL.md - Code organization, file structure, WASM stubs, string patterns →
.github/skills/developer-code-organization/SKILL.md - Security best practices, template injection, shell script safety, supply chain →
.github/skills/developer-security/SKILL.md - Compiler internals, validation architecture, safe outputs, schema, MCP logs →
.github/skills/developer-internals/SKILL.md - Adding or extending declarative agentic engines →
.github/skills/custom-engine-implementation/SKILL.md - Release management, breaking CLI change rules, firewall log parsing →
.github/skills/developer-release/SKILL.md - Error handling design/patterns →
.github/skills/error-recovery-patterns/SKILL.md - GitHub MCP usage patterns →
.github/skills/github-mcp-server/SKILL.md - Query helpers for issues/PRs/workflows/discussions/labels → matching
.github/skills/github-*-query/SKILL.md - Security-focused reviews of agentic workflow changes (compile/scans/audit/optimization) →
.github/skills/review-agentic-workflows/SKILL.md - Doc-writing conventions →
.github/skills/documentation/SKILL.md - Reviewing or writing
git/gh/remote operations against checkouts (per-checkout credentials, sparse/shallow monorepos, safe-outputs MCP runs without credentials) →.github/skills/checkout-credential-review/SKILL.md - Authoring, validating, or debugging canvas extensions (loopback servers, actions, iframe rendering, state model, theme tokens) →
.github/skills/create-canvas/SKILL.md
Debugging & Logging
The Go codebase uses a namespace-based debug logger (pkg/logger) modelled after the debug npm package. All debug output goes to stderr and is gated by the DEBUG environment variable.
Enable logging for a gh aw run
# All namespaces (most verbose)
DEBUG=* gh aw compile workflow.md
# Only CLI-layer namespaces
DEBUG=cli:* gh aw compile workflow.md
# Specific namespaces
DEBUG=cli:run_workflow_execution,cli:retry gh aw run workflow.md
# All except one namespace
DEBUG=*,-cli:ci gh aw compile workflow.md
# Disable colors (useful when capturing logs to a file)
DEBUG_COLORS=0 DEBUG=* gh aw compile workflow.md 2>debug.logKey namespaces
| Pattern | What it covers |
cli:* | All CLI command implementations (pkg/cli/) |
workflow:* | Workflow compiler and related logic |
parser:* | Frontmatter / markdown parsing |
mcp:* | MCP gateway and server interactions |
agentdrain:* | Agent drain / log mining pipeline |
repoutil:* | Git/repo utility helpers |
* | Everything |
To discover the exact namespace for a package, look for logger.New(...) at the top of the relevant .go file (e.g. var log = logger.New("cli:run_workflow_execution")).
Adding debug logs
When adding new debug instrumentation to Go code, use pkg/logger — never fmt.Println, log.Printf, or other ad-hoc output:
import "github.com/github/gh-aw/pkg/logger"
var log = logger.New("cli:my_package") // one per file/package, at package scope
func doSomething() {
log.Debug("starting operation", "key", value)
// ...
log.Debug("operation complete", "result", result)
}- Pick a namespace that matches the existing hierarchy (e.g.
cli:,workflow:,mcp:). - Pass structured key/value pairs after the message for queryable context.
- All output is gated by
DEBUGat runtime — no user-visible noise in normal operation.
GitHub Actions debug runs
When ACTIONS_RUNNER_DEBUG=true is set (enabled automatically on re-run with debug logging in the GitHub UI), all loggers are activated — equivalent to DEBUG=*. No extra configuration is needed.
Output format
Each line shows: namespace (coloured in the terminal), message, and +elapsed time since the previous log in that namespace.
cli:run_workflow_execution Starting run +0ms
cli:retry Retrying request attempt=2 +125ms
cli:run_workflow_execution Run complete +2.5sWhy this file is intentionally short
This file is loaded at first invocation and affects every task. Keep it concise and move detailed or domain-specific guidance into skills so that context is fetched only when relevant.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

