| description | Create new agentic workflows using GitHub Agentic Workflows (gh-aw) with concise guidance on triggers, tools, and security. |
|---|---|
| disable-model-invocation | true |
Create new workflow files under .github/workflows/ using the installed gh aw CLI.
- github-agentic-workflows.md
- workflow-editing.md
- workflow-constraints.md
- workflow-patterns.md
- safe-outputs.md
- syntax.md
- mcp-clis.md
Load these topic files only when relevant:
- campaign.md for campaign, KPI, pacing, cadence, or
stop-after - experiments.md for experiments, A/B tests, variants, or prompt comparisons
- visual-regression.md for screenshot comparison workflows
- deployment-status.md for external deployment monitoring
- charts.md for chart-generation workflows
Start with exactly:
What do you want to automate today?
Then ask only the next question needed.
When triggered from a workflow-creation issue form, read the form fields and generate the workflow without further conversation.
- Keep the conversation short and iterative.
- Translate user intent into workflow structure.
- Ask about the trigger, desired action, and required write outputs.
- Do not overwhelm the user with long option dumps unless they ask.
- If the request exceeds the single-job model, explain the constraint and recommend traditional GitHub Actions.
- Derive kebab-case from the workflow name.
- Before creating the file, check whether
.github/workflows/<workflow-id>.mdalready exists. - If it exists, choose a more specific ID instead of overwriting.
Use the smallest trigger that matches the request.
Common mappings:
- issue automation →
on: issues: - pull request automation →
on: pull_request: - scheduled reporting → fuzzy
schedule:such asdaily on weekdays - on-demand comments →
slash_command - UI-driven actions →
label_command - GitHub Actions pipeline monitoring →
workflow_run - external deployment monitoring →
deployment_status
Quick decision matrix:
| User intent | Trigger | Typical read tools | Typical safe output |
|---|---|---|---|
| Review PR changes, comment on quality, suggest fixes | pull_request |
github (gh-proxy), optional playwright for UI diffs |
add-comment |
| Investigate failed CI/Actions runs and summarize incident | workflow_run |
github (gh-proxy) with actions: read |
create-issue |
| Monitor external service deployment failures (Heroku, Vercel, Fly.io) | deployment_status |
github (gh-proxy) with deployments: read |
create-issue |
| Run visual regression checks on PR UI changes | pull_request |
playwright + cache-memory |
add-comment |
| Publish weekly stakeholder/product digest | schedule |
github (gh-proxy) |
create-issue (default), create-discussion only if explicitly requested |
workflow_runvsdeployment_status: Useworkflow_runwhen monitoring another GitHub Actions workflow in the same repository. Usedeployment_statuswhen an external service (Heroku, Vercel, Fly.io) reports deployment results back to GitHub via the Deployments API. See deployment-status.md for the full pattern.
Use workflow-patterns.md for trigger-selection guidance.
The main agent job must stay read-only.
- Do not grant
issues: write,pull-requests: write, orcontents: writeto the agent job. - Route GitHub writes through
safe-outputs:. - If the user asks for direct writes, explain why the safe-output pattern is required.
-
bashandeditare enabled by default in sandboxed workflows; do not add them unless you are restricting them. -
For GitHub reads, prefer
tools.github.mode: gh-proxyand instruct the agent to useghcommands. -
For non-GitHub MCP servers, prefer
tools.cli-proxy: trueand instruct the agent to use the mountedmcp-cliscommands. -
Combined configuration example for GitHub reads plus non-GitHub MCP CLI access:
tools: github: mode: gh-proxy toolsets: [default] cli-proxy: true
Omit
cli-proxy: truewhen the workflow only needs GitHub reads. -
Suggest
playwrightfor browser automation. -
Suggest dedicated topic files rather than embedding long tutorials in the prompt.
Do not ask for the ecosystem if it can be inferred from the repository.
Common mappings:
.csproj,.fsproj,*.sln,*.slnx,global.json→dotnetrequirements.txt,pyproject.toml,setup.py,uv.lock→pythonpackage.json,.nvmrc,yarn.lock,pnpm-lock.yaml→nodego.mod,go.sum→gopom.xml,build.gradle,build.gradle.kts→javaGemfile,*.gemspec→rubyCargo.toml,Cargo.lock→rustPackage.swift,*.podspec→swiftcomposer.json→phppubspec.yaml→dart
Never use network: defaults alone for workflows that build, test, or install packages.
Map write behavior to safe-outputs:.
Common mappings:
- create issues →
create-issue - add comments →
add-comment - create PRs →
create-pull-request - add labels →
add-labels - attach downloadable files →
upload-artifact - publish embeddable assets →
upload-asset
Rules:
- always restrict
create-pull-request.allowed-files - prefer the dedicated safe output instead of shelling out to
ghfor the same mutation - include
noopguidance in the prompt so successful no-op runs are explicit - when using
create-issue, instruct the agent to provide a meaningful body (20-65000 characters; avoid placeholder-only text)
- Default behavior is team-only triggering.
- For community-facing issue triage or other public entrypoints, recommend
roles: all.
Avoid adding fields just to restate defaults.
Usually omit:
engine: copilot- unrestricted
bash edittimeout-minutes:unless a custom timeout is needed
The markdown body should:
- state the workflow goal clearly
- reference the triggering context explicitly
- name the allowed safe outputs when write actions are expected
- instruct the agent to call
noopwhen no visible change is needed - stay concise and task-focused
When the workflow generates reports or markdown output, include these formatting rules only when relevant:
- use GitHub-flavored markdown
- start nested report headings at
### - use
<details><summary>...</summary>for long collapsible sections - format workflow run links as
[§12345](https://github.com/owner/repo/actions/runs/12345)
When processing a workflow-creation issue form:
- extract the workflow name, description, and additional context
- derive a unique workflow ID
- infer the trigger, tools, network access, and safe outputs
- create exactly one workflow markdown file
- compile it with
gh aw compile <workflow-id> - include the generated
.lock.ymlin the PR
---
emoji: 🏷️
description: <brief description>
on:
issues:
types: [opened]
permissions:
contents: read
issues: read
tools:
github:
mode: gh-proxy
toolsets: [default]
cli-proxy: true
safe-outputs:
add-comment:
---
# <Workflow Name>
## Task
<clear instructions>
## Safe Outputs
- Use the configured safe outputs for visible actions.
- Use `noop` with a short explanation when no action is required.Before finalizing any pull_request-triggered reporting workflow, verify:
- Permissions:
contents: read+pull-requests: readin the agent job; no write permissions - Safe outputs:
add-commentfor inline findings;create-issuefor incidents needing follow-up - Network: infer ecosystem from repository lock files; never use
defaultsalone when packages are installed -
nooprequired: prompt instructs the agent to callnoopwith a brief explanation when no issues are found
For cross-repository workflows:
- enable the GitHub toolsets needed to read external repositories
- configure cross-repo authentication in
safe-outputs: - tell the agent to set
target-repo - explain that the workflow still cannot wait for external workflows or create multi-job orchestration
Use workflow-patterns.md for the compact cross-repo pattern.
- create
.github/workflows/<workflow-id>.md - compile with
gh aw compile <workflow-id> - fix all compile errors
- create a PR with the workflow file and
.lock.yml
- create exactly one workflow
.mdfile as the primary deliverable - keep prompts short, specific, and imperative
- prefer dedicated reference files over repeating large explanations inline
- always compile before finishing
- keep responses concise after the workflow is created