Workflow Designer
Use this skill to run a structured interview with users who know their goal but not the workflow syntax yet, then generate one complete workflow .md file.
When to Use This Skill
Use this before .github/aw/create-agentic-workflow.md when requirements are unclear or incomplete.
- Use
skills/agentic-workflow-designer/SKILL.md to discover and confirm requirements.
- Use
.github/aw/create-agentic-workflow.md once requirements are clear and ready for implementation.
- Use
.github/aw/agentic-chat.md when the user wants a specification/pseudo-code instead of a runnable workflow file.
Interview Framework
Ask one question at a time. Move to the next phase only after the current phase is clear.
Phase 1: Goal
Ask: "What do you want to automate?"
Capture:
- Workflow name (kebab-case candidate)
- Brief description
- Optional emoji
Phase 2: Trigger
Ask: "When should this run?"
Follow up only if needed:
- Which event type(s)?
- Any filters (labels, branches, commands)?
- Scheduled cadence (daily/weekly/hourly)?
Map to the on: block.
Phase 3: Scope (Read/Write)
Ask:
- "What should it read?" (issues, PRs, code, discussions, CI data)
- "What should it create or update?" (comments, issues, PRs, labels)
Map to:
permissions: (keep read-only for agent job)
tools:
safe-outputs:
Phase 4: Data Strategy
Ask:
- "What data does the agent need to make decisions?"
- Follow up: "Can we pre-fetch and aggregate that data with shell commands so the agent only reads compact JSON?"
Capture:
- Whether
steps: should pre-fetch GitHub data with gh + jq
- Output paths under
/tmp/gh-aw/data/
- Whether batch work should use sub-agents
Map to:
steps:
- Prompt references to pre-computed file paths
Phase 5: Guardrails
Ask: "Should it block merging, just advise, or silently log?"
Capture:
- Visibility expectations (comment, issue, no visible output)
- No-op behavior expectation
Guide toward safe output behavior and explicit noop instructions.
Phase 6: Context & Network
Ask: "Does it need external APIs, web access, package installs, or MCP servers?"
Follow up:
- "Any third-party services or MCP servers to include (for example Slack, Jira, Datadog, custom internal MCP)?"
- "Are you deploying on GitHub.com, GHEC with custom endpoints, or GHES?"
- For each integration, identify required auth from source docs and map it to GitHub Actions secrets + workflow env variables.
- Ask for exact external domains (FQDN/wildcard).
Map to:
network.allowed
- Optional MCP/GitHub tool usage in
tools:
secrets: / env: wiring for integration tokens
- GHES/GHEC settings such as
engine.api-target and aw.json ghes: true (when applicable)
Phase 7: Engine (optional)
Ask only if ambiguous: "Any AI engine preference?"
If no preference, suggest default:
- "I'd suggest Copilot since you haven't mentioned a preference. Sound good?"
Map to engine: only when not default.
Phase 8: Confirmation
Present a structured summary and ask for approval before generation.
Decision Heuristics
Trigger Mapping
| User says... |
Maps to |
| "when someone opens a PR" |
on: pull_request: with types: [opened] |
| "when a PR is updated" |
on: pull_request: with types: [opened, synchronize] |
| "every morning", "daily" |
fuzzy schedule shorthand on: schedule: daily on weekdays (compiler expands to cron) |
| "every Monday", "weekly" |
fuzzy schedule shorthand on: schedule: weekly (compiler expands to cron) |
| "when I say /review" |
on: slash_command: with name: review (or requested command) |
| "when an issue is labeled bug" |
on: issues: with types: [labeled] and label filter guidance |
| "run when label ai-review is added" |
on: label_command: with name/names, optional event scoping, and label-as-command semantics |
| "run on PRs from forks" |
on: pull_request: plus explicit forks: allowlist and fork security guardrails |
| "sometimes automatic, sometimes manual" |
semi-active pattern: combine schedule/event triggers with workflow_dispatch |
| "manually", "on demand" |
on: workflow_dispatch: |
| "when a deployment fails" |
on: deployment_status: |
| "when another workflow finishes" |
on: workflow_run: |
Safe Output Mapping
| User says... |
Maps to |
| "post a comment" |
add-comment |
| "create an issue" |
create-issue |
| "update issue title/body" |
update-issue |
| "close the issue" |
close-issue |
| "assign someone", "remove assignment" |
assign-to-user, unassign-from-user |
| "set issue type/field/milestone" |
set-issue-type, set-issue-field, assign-milestone |
| "open a PR", "submit changes" |
create-pull-request |
| "update PR description/title" |
update-pull-request |
| "close the PR", "merge the PR" |
close-pull-request, merge-pull-request |
| "mark PR ready", "sync PR branch" |
mark-pull-request-as-ready-for-review, update-branch |
| "commit a fix to the PR branch" |
push-to-pull-request-branch |
| "approve / request changes" |
submit-pull-request-review |
| "inline review comment", "reply to review thread" |
create-pull-request-review-comment, reply-to-pull-request-review-comment, resolve-pull-request-review-thread |
| "start or edit discussion", "close discussion" |
create-discussion, update-discussion, close-discussion |
| "request reviewer", "hide comment" |
add-reviewer, hide-comment |
| "create/update project", "project status update" |
create-project, update-project, create-project-status-update |
| "update release", "upload release asset" |
update-release, upload-asset |
| "trigger another workflow", "dispatch to workflow", "run another workflow" |
dispatch-workflow |
| "create/auto-fix code scan alert" |
create-code-scanning-alert, autofix-code-scanning-alert |
| "start an agent session", "assign to an agent" |
create-agent-session, assign-to-agent |
| "store persistent memory comment" |
comment-memory |
| "link a sub-issue" |
link-sub-issue |
| "add labels", "remove labels" |
add-labels, remove-labels |
| "replace a label with another" |
replace-label |
| "nothing visible", "just analyze" |
no safe outputs required |
Network Mapping
| User says... |
Maps to |
| "calls an external API" |
ask for exact FQDN/wildcard, then add to network.allowed |
| "reads GitHub data / clones repos" |
include github in network.allowed |
| "uses GitHub Actions artifacts or cache" |
include github-actions in network.allowed |
| "installs npm packages" |
include node in network.allowed |
| "runs pip install" |
include python in network.allowed |
| "builds Go code" |
include go in network.allowed |
| "installs gems / uses Bundler" |
include ruby in network.allowed |
| "runs cargo build" |
include rust in network.allowed |
| "uses NuGet / .NET restore" |
include dotnet in network.allowed |
| "builds with Maven / Gradle" |
include java in network.allowed |
| "uses Docker / pulls container images / pushes to GHCR" |
include containers in network.allowed |
| "runs Playwright browser tests" |
include playwright in network.allowed |
| "runs apt install / yum / apk" |
include linux-distros in network.allowed |
| "uses Terraform / HashiCorp registry" |
include terraform in network.allowed |
| "connects to localhost / loopback / local services" |
include local in network.allowed |
| "uses Swift Package Manager" |
include swift in network.allowed |
| "uses Composer / PHP packages" |
include php in network.allowed |
| "uses pub.dev / Dart packages" |
include dart in network.allowed |
| "uses Hackage / Haskell packages" |
include haskell in network.allowed |
| "uses CPAN / Perl packages" |
include perl in network.allowed |
| "serves or loads web fonts" |
include fonts in network.allowed |
| "uses Deno or JSR packages" |
include deno in network.allowed |
| "uses Elixir / Hex packages" |
include elixir in network.allowed |
| "uses Bazel build" |
include bazel in network.allowed |
| "uses Clojure / Clojars packages" |
include clojure in network.allowed |
| "uses Julia packages" |
include julia in network.allowed |
| "uses Kotlin / JetBrains packages" |
include kotlin in network.allowed |
| "uses LuaRocks / Lua packages" |
include lua in network.allowed |
| "uses node CDNs (jsdelivr, unpkg)" |
include node-cdns in network.allowed |
| "uses OPAM / OCaml packages" |
include ocaml in network.allowed |
| "uses PowerShell Gallery" |
include powershell in network.allowed |
| "uses R / CRAN packages" |
include r in network.allowed |
| "uses sbt / Scala packages" |
include scala in network.allowed |
| "uses Zig packages" |
include zig in network.allowed |
| "uses Renovate, Codecov, or other CI tools" |
include dev-tools in network.allowed |
| "uses Chrome / Chromium downloads" |
include chrome in network.allowed |
| "uses LaTeX / TeX / MiKTeX" |
include latex in network.allowed |
| "uses Lean theorem prover" |
include lean in network.allowed |
| "builds Python packages from source" |
include python-native in network.allowed |
| "no external access" |
network.allowed: [defaults] (or [] if explicitly zero network) |
Tool Mapping
| User says... |
Maps to |
| "read GitHub issues/PRs/workflows" |
tools.github with mode: gh-proxy and minimal toolsets |
| "use full MCP server/tool definitions" |
tools.github with mode: local |
| "use other MCP servers but keep token cost down" |
tools.cli-proxy: true (hybrid CLI-proxy mode) |
| "edit files" |
edit tool (default unless restricted) |
| "run commands/tests" |
bash tool (default unless restricted) |
| "browse web pages/docs" |
web-fetch and/or web-search |
| "test UI flows" |
playwright |
Pattern Heuristics
| User says... |
Recommended named pattern |
| "triage issues automatically" |
IssueOps |
| "run on /commands with human approval loops" |
ChatOps |
| "run every weekday and keep improving" |
DailyOps |
| "monitor workflow failures and trends" |
MonitorOps |
| "process a big backlog in chunks" |
BatchOps |
| "run manually with input parameters" |
DispatchOps |
| "apply a label-based workflow" |
LabelOps |
| "operate across multiple repositories" |
MultiRepoOps |
| "coordinate multiple sub-agents" |
Orchestration |
| "manage project board items" |
ProjectOps |
| "research, plan, and assign issues" |
ResearchPlanAssignOps |
| "self-correcting / retry on failure" |
CorrectionOps |
| "run in a side/fork repo" |
SideRepoOps |
| "write a spec before implementing" |
SpecOps |
| "A/B test workflow variants" |
TrialOps |
| "process items from a queue" |
WorkQueueOps |
| "deterministic, no LLM needed" |
DeterministicOps |
| "manage from a central repo" |
CentralRepoOps |
| "track work via GitHub Projects" |
Monitoring with Projects |
Integration Auth Mapping
When the user names a third-party service or MCP server:
- Confirm whether native tool, MCP server, or safe-output job is the right integration path.
- Look up the integration's auth requirements and required scopes before finalizing the design.
- Provide a concrete setup checklist with:
- required GitHub Actions secrets (names to create)
- workflow env variables that consume those secrets
- minimum token scopes/permissions needed
Output format to use:
Integration auth setup:
- <service-or-mcp>: <purpose>
- Secrets to create: <SECRET_NAME>, <SECRET_NAME>
- Workflow env vars: <ENV_VAR>=${{ secrets.<SECRET_NAME> }}
- Required scopes/permissions: <least-privilege scopes>
Never suggest committing plaintext tokens.
Data Strategy Mapping
| User says... |
Maps to |
| "analyze PRs", "review issues", "check status" |
add steps: that pre-fetch with gh + jq |
| "read the diff", "look at changed files" |
add steps: using gh pr diff or gh pr view --json files |
| "search for patterns across repos" |
add steps: using gh search + jq filters |
| "just respond to a comment" |
no pre-fetch needed (event payload is enough) |
| "process each item individually" |
suggest sub-agent pattern with model: small |
Token Optimization Defaults
Apply these defaults unless the user explicitly asks otherwise:
- Use DataOps by default for GitHub reads: pre-fetch/aggregate with
gh + jq in steps:, store compact JSON in /tmp/gh-aw/data/, and point the prompt to those files (see .github/aw/token-optimization.md for details).
- Keep tool surface minimal: default to
tools.github.mode: gh-proxy, include only required toolsets, and prefer bash + gh for simple reads.
- For batch workloads, split items into compact data and suggest sub-agent processing with
model: small.
- Keep prompts compact: concise imperative instructions, explicit file paths, single-line
noop guidance, and stable instructions before dynamic content.
Progressive Disclosure Rules
- Never dump all options at once; ask one targeted question at a time.
- Skip questions when answers are inferable from prior user statements.
- Offer smart defaults and request confirmation instead of over-questioning.
- Ask at most 5 questions before presenting a summary; then ask "anything else?" if needed.
- Detect done signals (
that's it, looks good, generate it) and proceed to generation.
Confirmation Format
Use this exact structure:
📋 Proposed workflow:
- Name: <workflow-id>
- Trigger: <event + key options>
- Engine: <engine or default>
- Tools: <tool summary>
- Safe outputs: <list or none>
- Network: <allowed summary>
- Integrations/Auth: <service/mcp + required secrets/env vars>
- Deployment: <GitHub.com or GHEC/GHES details>
- Intent: <one-sentence task>
Then ask: "Ready to generate, or want to adjust anything?"
Generation Template
After confirmation, generate one workflow file using the same skeleton style as .github/aw/create-agentic-workflow.md.
---
emoji: <emoji>
description: <brief description>
on:
<trigger config>
permissions:
contents: read
issues: read
pull-requests: read
tools:
github:
mode: gh-proxy
toolsets: [default]
steps:
- name: <optional data prefetch>
run: |
mkdir -p /tmp/gh-aw/data
<gh + jq commands that produce compact JSON>
safe-outputs:
<safe-output-types-if-needed>
network:
allowed:
- defaults
- <additional entries if needed>
---
# <Workflow Name>
## Task
<clear instructions tied to trigger context>
If `steps:` includes pre-fetch commands, read the resulting `/tmp/gh-aw/data/*.json` files instead of broad live re-fetches.
## Safe Outputs
- Use configured safe outputs for all visible write actions.
- Call `noop` with a short reason when no action is needed.
Validation Checklist
Before final output, run this internal self-check:
References (load only when needed)
In-repo references:
.github/aw/syntax.md (index → .github/aw/syntax-core.md, .github/aw/syntax-agentic.md, .github/aw/syntax-tools-imports.md)
.github/aw/safe-outputs.md (index → .github/aw/safe-outputs-content.md, .github/aw/safe-outputs-management.md, .github/aw/safe-outputs-automation.md, .github/aw/safe-outputs-runtime.md)
.github/aw/network.md
.github/aw/patterns.md
.github/aw/subagents.md
.github/aw/token-optimization.md
.github/aw/triggers.md
.github/aw/create-agentic-workflow.md
Portable HTTPS references:
https://github.com/github/gh-aw/blob/main/.github/aw/syntax.md (index → .../syntax-core.md, .../syntax-agentic.md, .../syntax-tools-imports.md)
https://github.com/github/gh-aw/blob/main/.github/aw/safe-outputs.md (index → .../safe-outputs-content.md, .../safe-outputs-management.md, .../safe-outputs-automation.md, .../safe-outputs-runtime.md)
https://github.com/github/gh-aw/blob/main/.github/aw/network.md
https://github.com/github/gh-aw/blob/main/.github/aw/patterns.md
https://github.com/github/gh-aw/blob/main/.github/aw/subagents.md
https://github.com/github/gh-aw/blob/main/.github/aw/token-optimization.md
https://github.com/github/gh-aw/blob/main/.github/aw/triggers.md
https://github.com/github/gh-aw/blob/main/.github/aw/create-agentic-workflow.md
1---2name: agentic-workflow-designer3description: Conversational skill that interviews users to design new agentic workflows4---56# Workflow Designer78Use this skill to run a structured interview with users who know their goal but not the workflow syntax yet, then generate one complete workflow `.md` file.910## When to Use This Skill1112Use this before `.github/aw/create-agentic-workflow.md` when requirements are unclear or incomplete.1314- Use `skills/agentic-workflow-designer/SKILL.md` to discover and confirm requirements.15- Use `.github/aw/create-agentic-workflow.md` once requirements are clear and ready for implementation.16- Use `.github/aw/agentic-chat.md` when the user wants a specification/pseudo-code instead of a runnable workflow file.1718## Interview Framework1920Ask one question at a time. Move to the next phase only after the current phase is clear.2122### Phase 1: Goal2324Ask: **"What do you want to automate?"**2526Capture:27- Workflow name (kebab-case candidate)28- Brief description29- Optional emoji3031### Phase 2: Trigger3233Ask: **"When should this run?"**3435Follow up only if needed:36- Which event type(s)?37- Any filters (labels, branches, commands)?38- Scheduled cadence (daily/weekly/hourly)?3940Map to the `on:` block.4142### Phase 3: Scope (Read/Write)4344Ask:45- **"What should it read?"** (issues, PRs, code, discussions, CI data)46- **"What should it create or update?"** (comments, issues, PRs, labels)4748Map to:49- `permissions:` (keep read-only for agent job)50- `tools:`51- `safe-outputs:`5253### Phase 4: Data Strategy5455Ask:56- **"What data does the agent need to make decisions?"**57- Follow up: **"Can we pre-fetch and aggregate that data with shell commands so the agent only reads compact JSON?"**5859Capture:60- Whether `steps:` should pre-fetch GitHub data with `gh` + `jq`61- Output paths under `/tmp/gh-aw/data/`62- Whether batch work should use sub-agents6364Map to:65- `steps:`66- Prompt references to pre-computed file paths6768### Phase 5: Guardrails6970Ask: **"Should it block merging, just advise, or silently log?"**7172Capture:73- Visibility expectations (comment, issue, no visible output)74- No-op behavior expectation7576Guide toward safe output behavior and explicit `noop` instructions.7778### Phase 6: Context & Network7980Ask: **"Does it need external APIs, web access, package installs, or MCP servers?"**8182Follow up:83- **"Any third-party services or MCP servers to include (for example Slack, Jira, Datadog, custom internal MCP)?"**84- **"Are you deploying on GitHub.com, GHEC with custom endpoints, or GHES?"**85- For each integration, identify required auth from source docs and map it to GitHub Actions secrets + workflow env variables.86- Ask for exact external domains (FQDN/wildcard).8788Map to:89- `network.allowed`90- Optional MCP/GitHub tool usage in `tools:`91- `secrets:` / `env:` wiring for integration tokens92- GHES/GHEC settings such as `engine.api-target` and `aw.json` `ghes: true` (when applicable)9394### Phase 7: Engine (optional)9596Ask only if ambiguous: **"Any AI engine preference?"**9798If no preference, suggest default:99- "I'd suggest Copilot since you haven't mentioned a preference. Sound good?"100101Map to `engine:` only when not default.102103### Phase 8: Confirmation104105Present a structured summary and ask for approval before generation.106107## Decision Heuristics108109### Trigger Mapping110111| User says... | Maps to |112|---|---|113| "when someone opens a PR" | `on: pull_request:` with `types: [opened]` |114| "when a PR is updated" | `on: pull_request:` with `types: [opened, synchronize]` |115| "every morning", "daily" | fuzzy schedule shorthand `on: schedule: daily on weekdays` (compiler expands to cron) |116| "every Monday", "weekly" | fuzzy schedule shorthand `on: schedule: weekly` (compiler expands to cron) |117| "when I say /review" | `on: slash_command:` with `name: review` (or requested command) |118| "when an issue is labeled bug" | `on: issues:` with `types: [labeled]` and label filter guidance |119| "run when label ai-review is added" | `on: label_command:` with `name`/`names`, optional event scoping, and label-as-command semantics |120| "run on PRs from forks" | `on: pull_request:` plus explicit `forks:` allowlist and fork security guardrails |121| "sometimes automatic, sometimes manual" | semi-active pattern: combine `schedule`/event triggers with `workflow_dispatch` |122| "manually", "on demand" | `on: workflow_dispatch:` |123| "when a deployment fails" | `on: deployment_status:` |124| "when another workflow finishes" | `on: workflow_run:` |125126### Safe Output Mapping127128| User says... | Maps to |129|---|---|130| "post a comment" | `add-comment` |131| "create an issue" | `create-issue` |132| "update issue title/body" | `update-issue` |133| "close the issue" | `close-issue` |134| "assign someone", "remove assignment" | `assign-to-user`, `unassign-from-user` |135| "set issue type/field/milestone" | `set-issue-type`, `set-issue-field`, `assign-milestone` |136| "open a PR", "submit changes" | `create-pull-request` |137| "update PR description/title" | `update-pull-request` |138| "close the PR", "merge the PR" | `close-pull-request`, `merge-pull-request` |139| "mark PR ready", "sync PR branch" | `mark-pull-request-as-ready-for-review`, `update-branch` |140| "commit a fix to the PR branch" | `push-to-pull-request-branch` |141| "approve / request changes" | `submit-pull-request-review` |142| "inline review comment", "reply to review thread" | `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `resolve-pull-request-review-thread` |143| "start or edit discussion", "close discussion" | `create-discussion`, `update-discussion`, `close-discussion` |144| "request reviewer", "hide comment" | `add-reviewer`, `hide-comment` |145| "create/update project", "project status update" | `create-project`, `update-project`, `create-project-status-update` |146| "update release", "upload release asset" | `update-release`, `upload-asset` |147| "trigger another workflow", "dispatch to workflow", "run another workflow" | `dispatch-workflow` |148| "create/auto-fix code scan alert" | `create-code-scanning-alert`, `autofix-code-scanning-alert` |149| "start an agent session", "assign to an agent" | `create-agent-session`, `assign-to-agent` |150| "store persistent memory comment" | `comment-memory` |151| "link a sub-issue" | `link-sub-issue` |152| "add labels", "remove labels" | `add-labels`, `remove-labels` |153| "replace a label with another" | `replace-label` |154| "nothing visible", "just analyze" | no safe outputs required |155156### Network Mapping157158| User says... | Maps to |159|---|---|160| "calls an external API" | ask for exact FQDN/wildcard, then add to `network.allowed` |161| "reads GitHub data / clones repos" | include `github` in `network.allowed` |162| "uses GitHub Actions artifacts or cache" | include `github-actions` in `network.allowed` |163| "installs npm packages" | include `node` in `network.allowed` |164| "runs pip install" | include `python` in `network.allowed` |165| "builds Go code" | include `go` in `network.allowed` |166| "installs gems / uses Bundler" | include `ruby` in `network.allowed` |167| "runs cargo build" | include `rust` in `network.allowed` |168| "uses NuGet / .NET restore" | include `dotnet` in `network.allowed` |169| "builds with Maven / Gradle" | include `java` in `network.allowed` |170| "uses Docker / pulls container images / pushes to GHCR" | include `containers` in `network.allowed` |171| "runs Playwright browser tests" | include `playwright` in `network.allowed` |172| "runs apt install / yum / apk" | include `linux-distros` in `network.allowed` |173| "uses Terraform / HashiCorp registry" | include `terraform` in `network.allowed` |174| "connects to localhost / loopback / local services" | include `local` in `network.allowed` |175| "uses Swift Package Manager" | include `swift` in `network.allowed` |176| "uses Composer / PHP packages" | include `php` in `network.allowed` |177| "uses pub.dev / Dart packages" | include `dart` in `network.allowed` |178| "uses Hackage / Haskell packages" | include `haskell` in `network.allowed` |179| "uses CPAN / Perl packages" | include `perl` in `network.allowed` |180| "serves or loads web fonts" | include `fonts` in `network.allowed` |181| "uses Deno or JSR packages" | include `deno` in `network.allowed` |182| "uses Elixir / Hex packages" | include `elixir` in `network.allowed` |183| "uses Bazel build" | include `bazel` in `network.allowed` |184| "uses Clojure / Clojars packages" | include `clojure` in `network.allowed` |185| "uses Julia packages" | include `julia` in `network.allowed` |186| "uses Kotlin / JetBrains packages" | include `kotlin` in `network.allowed` |187| "uses LuaRocks / Lua packages" | include `lua` in `network.allowed` |188| "uses node CDNs (jsdelivr, unpkg)" | include `node-cdns` in `network.allowed` |189| "uses OPAM / OCaml packages" | include `ocaml` in `network.allowed` |190| "uses PowerShell Gallery" | include `powershell` in `network.allowed` |191| "uses R / CRAN packages" | include `r` in `network.allowed` |192| "uses sbt / Scala packages" | include `scala` in `network.allowed` |193| "uses Zig packages" | include `zig` in `network.allowed` |194| "uses Renovate, Codecov, or other CI tools" | include `dev-tools` in `network.allowed` |195| "uses Chrome / Chromium downloads" | include `chrome` in `network.allowed` |196| "uses LaTeX / TeX / MiKTeX" | include `latex` in `network.allowed` |197| "uses Lean theorem prover" | include `lean` in `network.allowed` |198| "builds Python packages from source" | include `python-native` in `network.allowed` |199| "no external access" | `network.allowed: [defaults]` (or `[]` if explicitly zero network) |200201### Tool Mapping202203| User says... | Maps to |204|---|---|205| "read GitHub issues/PRs/workflows" | `tools.github` with `mode: gh-proxy` and minimal `toolsets` |206| "use full MCP server/tool definitions" | `tools.github` with `mode: local` |207| "use other MCP servers but keep token cost down" | `tools.cli-proxy: true` (hybrid CLI-proxy mode) |208| "edit files" | `edit` tool (default unless restricted) |209| "run commands/tests" | `bash` tool (default unless restricted) |210| "browse web pages/docs" | `web-fetch` and/or `web-search` |211| "test UI flows" | `playwright` |212213### Pattern Heuristics214215| User says... | Recommended named pattern |216|---|---|217| "triage issues automatically" | `IssueOps` |218| "run on /commands with human approval loops" | `ChatOps` |219| "run every weekday and keep improving" | `DailyOps` |220| "monitor workflow failures and trends" | `MonitorOps` |221| "process a big backlog in chunks" | `BatchOps` |222| "run manually with input parameters" | `DispatchOps` |223| "apply a label-based workflow" | `LabelOps` |224| "operate across multiple repositories" | `MultiRepoOps` |225| "coordinate multiple sub-agents" | `Orchestration` |226| "manage project board items" | `ProjectOps` |227| "research, plan, and assign issues" | `ResearchPlanAssignOps` |228| "self-correcting / retry on failure" | `CorrectionOps` |229| "run in a side/fork repo" | `SideRepoOps` |230| "write a spec before implementing" | `SpecOps` |231| "A/B test workflow variants" | `TrialOps` |232| "process items from a queue" | `WorkQueueOps` |233| "deterministic, no LLM needed" | `DeterministicOps` |234| "manage from a central repo" | `CentralRepoOps` |235| "track work via GitHub Projects" | `Monitoring with Projects` |236237### Integration Auth Mapping238239When the user names a third-party service or MCP server:2402411. Confirm whether native tool, MCP server, or safe-output job is the right integration path.2422. Look up the integration's auth requirements and required scopes before finalizing the design.2433. Provide a concrete setup checklist with:244 - required GitHub Actions secrets (names to create)245 - workflow env variables that consume those secrets246 - minimum token scopes/permissions needed247248Output format to use:249250```text251Integration auth setup:252- <service-or-mcp>: <purpose>253 - Secrets to create: <SECRET_NAME>, <SECRET_NAME>254 - Workflow env vars: <ENV_VAR>=${{ secrets.<SECRET_NAME> }}255 - Required scopes/permissions: <least-privilege scopes>256```257258Never suggest committing plaintext tokens.259260### Data Strategy Mapping261262| User says... | Maps to |263|---|---|264| "analyze PRs", "review issues", "check status" | add `steps:` that pre-fetch with `gh` + `jq` |265| "read the diff", "look at changed files" | add `steps:` using `gh pr diff` or `gh pr view --json files` |266| "search for patterns across repos" | add `steps:` using `gh search` + `jq` filters |267| "just respond to a comment" | no pre-fetch needed (event payload is enough) |268| "process each item individually" | suggest sub-agent pattern with `model: small` |269270## Token Optimization Defaults271272Apply these defaults unless the user explicitly asks otherwise:2732741. Use DataOps by default for GitHub reads: pre-fetch/aggregate with `gh` + `jq` in `steps:`, store compact JSON in `/tmp/gh-aw/data/`, and point the prompt to those files (see `.github/aw/token-optimization.md` for details).2752. Keep tool surface minimal: default to `tools.github.mode: gh-proxy`, include only required toolsets, and prefer `bash` + `gh` for simple reads.2763. For batch workloads, split items into compact data and suggest sub-agent processing with `model: small`.2774. Keep prompts compact: concise imperative instructions, explicit file paths, single-line `noop` guidance, and stable instructions before dynamic content.278279## Progressive Disclosure Rules2802811. Never dump all options at once; ask one targeted question at a time.2822. Skip questions when answers are inferable from prior user statements.2833. Offer smart defaults and request confirmation instead of over-questioning.2844. Ask at most 5 questions before presenting a summary; then ask "anything else?" if needed.2855. Detect done signals (`that's it`, `looks good`, `generate it`) and proceed to generation.286287## Confirmation Format288289Use this exact structure:290291```text292📋 Proposed workflow:293- Name: <workflow-id>294- Trigger: <event + key options>295- Engine: <engine or default>296- Tools: <tool summary>297- Safe outputs: <list or none>298- Network: <allowed summary>299- Integrations/Auth: <service/mcp + required secrets/env vars>300- Deployment: <GitHub.com or GHEC/GHES details>301- Intent: <one-sentence task>302```303304Then ask: **"Ready to generate, or want to adjust anything?"**305306## Generation Template307308After confirmation, generate one workflow file using the same skeleton style as `.github/aw/create-agentic-workflow.md`.309310```markdown311---312emoji: <emoji>313description: <brief description>314on:315 <trigger config>316permissions:317 contents: read318 issues: read319 pull-requests: read320tools:321 github:322 mode: gh-proxy323 toolsets: [default]324steps:325 - name: <optional data prefetch>326 run: |327 mkdir -p /tmp/gh-aw/data328 <gh + jq commands that produce compact JSON>329safe-outputs:330 <safe-output-types-if-needed>331network:332 allowed:333 - defaults334 - <additional entries if needed>335---336337# <Workflow Name>338339## Task340341<clear instructions tied to trigger context>342If `steps:` includes pre-fetch commands, read the resulting `/tmp/gh-aw/data/*.json` files instead of broad live re-fetches.343344## Safe Outputs345346- Use configured safe outputs for all visible write actions.347- Call `noop` with a short reason when no action is needed.348```349350## Validation Checklist351352Before final output, run this internal self-check:353354- [ ] Agent job permissions remain read-only (writes only via safe outputs)355- [ ] `safe-outputs:` covers every write action mentioned in prompt/instructions356- [ ] Network access is scoped; avoid blanket wildcard entries357- [ ] Trigger matches the user's intended activation event358- [ ] Prompt instructs agent to call `noop` when no action is needed359- [ ] Unnecessary defaults are omitted (for example `engine: copilot`)360- [ ] If reading GitHub data, `steps:` pre-fetches compact JSON (DataOps)361- [ ] `tools.github.mode` is `gh-proxy` unless broader MCP toolsets are explicitly needed362- [ ] Only required toolsets are listed (avoid blanket toolset lists)363- [ ] Prompt references specific pre-computed file paths364- [ ] For batch processing (>5 items), sub-agent pattern is suggested365- [ ] For each third-party service/MCP integration, required secrets/env vars are listed366- [ ] Auth guidance includes least-privilege token scope recommendations367- [ ] For GHEC/GHES deployments, `engine.api-target` and GHES compatibility guidance are included when needed368369## References (load only when needed)370371In-repo references:372- `.github/aw/syntax.md` (index → `.github/aw/syntax-core.md`, `.github/aw/syntax-agentic.md`, `.github/aw/syntax-tools-imports.md`)373- `.github/aw/safe-outputs.md` (index → `.github/aw/safe-outputs-content.md`, `.github/aw/safe-outputs-management.md`, `.github/aw/safe-outputs-automation.md`, `.github/aw/safe-outputs-runtime.md`)374- `.github/aw/network.md`375- `.github/aw/patterns.md`376- `.github/aw/subagents.md`377- `.github/aw/token-optimization.md`378- `.github/aw/triggers.md`379- `.github/aw/create-agentic-workflow.md`380381Portable HTTPS references:382- `https://github.com/github/gh-aw/blob/main/.github/aw/syntax.md` (index → `.../syntax-core.md`, `.../syntax-agentic.md`, `.../syntax-tools-imports.md`)383- `https://github.com/github/gh-aw/blob/main/.github/aw/safe-outputs.md` (index → `.../safe-outputs-content.md`, `.../safe-outputs-management.md`, `.../safe-outputs-automation.md`, `.../safe-outputs-runtime.md`)384- `https://github.com/github/gh-aw/blob/main/.github/aw/network.md`385- `https://github.com/github/gh-aw/blob/main/.github/aw/patterns.md`386- `https://github.com/github/gh-aw/blob/main/.github/aw/subagents.md`387- `https://github.com/github/gh-aw/blob/main/.github/aw/token-optimization.md`388- `https://github.com/github/gh-aw/blob/main/.github/aw/triggers.md`389- `https://github.com/github/gh-aw/blob/main/.github/aw/create-agentic-workflow.md`