Skip to content

VS Code Integration

The gh aw CLI provides tools to improve your developer experience in VS Code and other IDEs.

Run gh aw init once in your repository to configure Copilot integration:

Terminal window
gh aw init

This creates two files:

  • Copilot instructions: .github/instructions/github-agentic-workflows.instructions.md - Automatically imported when authoring markdown files under .github/workflows/, making Copilot Chat more efficient at generating Agentic Workflows.
  • Prompt template: .github/prompts/create-agentic-workflow.prompt.md - Enables the /create-agentic-workflow command in Copilot Chat.

Use /create-agentic-workflow in Copilot Chat to interactively design workflows with guided assistance for trigger selection, permissions, security settings, tool configuration, and best practices. The conversational interface helps you build secure workflows without memorizing syntax.

Configure VS Code to automatically compile workflows when files change. Create or update .vscode/tasks.json with:

{
"version": "2.0.0",
"tasks": [
{
"label": "Compile Github Agentic Workflows",
"dependsOn": ["Compile gh-aw"],
"type": "shell",
"command": "./gh-aw",
"args": ["compile", "--watch"],
"isBackground": true,
"problemMatcher": {
"owner": "gh-aw",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*?):(\\d+):(\\d+):\\s(error|warning):\\s(.+)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "Watching for file changes",
"endsPattern": "Recompiled"
}
},
"group": { "kind": "build", "isDefault": true },
"runOptions": { "runOn": "folderOpen" }
}
]
}

The task starts automatically when you open a Markdown file under .github/workflows/. If it doesn’t start, use the command palette (Ctrl + Shift + P) and run Tasks: Manage Automatic Tasks to enable automatic task execution.