create-agentic-workflow · git:20260710.a30d34f · 2026-07-10 · sha256 ef134b2113a51fd3

create-agentic-workflow git:20260710.a30d34fA

Immutable. This exact content is served forever at /api/v1/blob/ef134b2113a51fd3.

---
name: create-agentic-workflow
plugin: agent-scaffolders
description: >
  Scaffolds a Copilot GitHub agent, an agent that runs in GitHub Actions, a GitHub workflow agent, a GitHub Copilot Agent, or a GitHub Agentic Workflow (gh-aw) from an existing skill. Supports three target configurations: Target A (Custom Copilot agent), Target B (GitHub Agentic Workflow), and Target C (CI/CD Smart Failure agent).
argument-hint: "[skill-dir] [--target A|B|C] [--name name] [--engine copilot|claude|codex]"
allowed-tools: Bash, Read, Write
disable-model-invocation: false
---

Follow the `create-agentic-workflow` skill workflow to convert a local skill into a GitHub-native agentic configuration (Target A, B, or C).

## Inputs

- `$1` (or `--skill-dir`) — path to the existing skill directory to convert
- `--target` — target type: `A` (Custom Copilot Agent `.agent.md`), `B` (GitHub Agentic Workflow `gh-aw`), or `C` (CI/CD Smart Failure agent)
- `--name` — custom name for the generated agent/workflow
- `--engine` — engine to use: `copilot` (default), `claude`, or `codex`

## Steps

1. **Resolve Input Skill**: Confirm the source skill directory contains a valid `SKILL.md`.
2. **Progressive Discovery (Interactive Interview)**:
   - **Target Mode**: Ask the user to select Target A, B, or C. *Smart-default Target B (gh-aw) if the user says "runs in GitHub".*
   - **Trigger Event**: Define the events (push, pull_request, schedule, issues, release) or schedule details.
   - **AI Engine**: Select `copilot` (default), `claude`, or `codex`.
   - **Safe Outputs / Write Operations (Target B)**: Define allowed write actions (e.g. `add-comment`, `create-issue`, `add-labels`).
   - **MCP Servers & Tooling (Target A)**: Identify which tools/MCP servers to grant permission to.
3. **Recap Gate**: Present a summary of the configuration. Ask the user: *"Does this look right? yes / adjust"*. Proceed only on confirmation.
4. **Scaffolder Execution**: Run `scaffold_github_agent.py` to write the target files.
5. **Validation & Compilation Gate**:
   - Run `validate_github_agent.py` to verify schema compliance.
   - **Accuracy Caveat**: For Target B, since `gh-aw` is in public preview and frontmatter schemas may drift, ALWAYS attempt to compile using `gh aw compile` after generation and treat compile errors as the source of truth over templates.

## Output

Generated agent metadata, prompt companion files, workflow YAMLs, or markdown configurations depending on target selection:
- **Target A**: `.github/agents/<name>.agent.md` + `.github/prompts/<name>.prompt.md`
- **Target B**: `.github/workflows/<name>.md` + `.github/workflows/<name>.lock.yml`
- **Target C**: `.github/agents/<name>.agent.md` + `.github/workflows/<name>-agent.yml`

## Edge Cases

- **Target B Compilation**: If `gh-aw` CLI is not installed locally, output warning and instructions for `gh extension install github/gh-aw`.
- **Target C Kill Switch**: Ensure the custom Kill Switch phrase appears verbatim in both the `.agent.md` body and the workflow runner's grep condition, along with the Escalation Trigger Taxonomy.
- **Tools Frontmatter Difference**: Highlight that Target A uses standard GitHub agent frontmatter keys (e.g., `tools: [github, terminal]`), NOT the Claude-style frontmatter keys (e.g., `permissions.allowedTools`) generated by `create-sub-agent`.