agentic-workflows
Set up and manage GitHub Actions workflows that use Copilot coding agents for automated PR handling and issue resolution
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up and manage GitHub Actions workflows that use Copilot coding agents for automated PR handling and issue resolution
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Inspect active GitHub Actions workflows before commit or push, run matching local checks for staged or unpushed files, ask which missing tools to install via askQuestions, and fix in-scope issues so the Commit agent can proceed.
Write a commit message following the Conventional Commits specification with scope and body
Create an Architectural Decision Record (ADR) to document a significant design or technology choice
Audit VS Code extensions against the current project stack and recommend keep/add/remove actions
Diagnose and fix a failing CI pipeline or GitHub Actions workflow
Triage a GitHub issue by classifying severity, labelling waste category, proposing next action, and drafting a structured response
| name | agentic-workflows |
| description | Set up and manage GitHub Actions workflows that use Copilot coding agents for automated PR handling and issue resolution |
| compatibility | >=3.2 |
Skill metadata: version "1.0"; license MIT; tags [github-actions, automation, ci, agents, pull-requests]; compatibility ">=3.2"; recommended tools [codebase, editFiles, runCommands, githubRepo].
Set up GitHub Actions workflows that invoke Copilot coding agents to automate tasks like issue resolution, PR creation, and code review — triggered by GitHub events rather than interactive chat.
copilot-setup-steps.yml workflow must exist (provides agent environment setup)contents: write, pull-requests: write, issues: read)A headless Copilot session triggered by a GitHub Actions workflow. It runs without interactive prompts, using a Codex-class model. The agent reads the issue or event context, plans a fix, implements it, and opens a PR.
A reusable workflow that configures the agent's environment (runtime, dependencies, tools). It runs before the agent starts. The template ships one at template/copilot-setup-steps.yml.
| Trigger | Use case |
|---|---|
issues.labeled | Auto-assign agent when a specific label is added |
issue_comment.created | Agent responds to a command comment (e.g., /fix) |
pull_request.opened | Auto-review new PRs |
workflow_dispatch | Manual agent invocation |
Verify setup steps exist — Check that .github/workflows/copilot-setup-steps.yml exists. If not, fetch and write it:
https://raw.githubusercontent.com/asafelobotomy/copilot-instructions-template/main/template/copilot-setup-steps.yml
Choose the trigger pattern — Ask the user which event should invoke the agent:
| Pattern | Workflow trigger | Agent receives |
|---|---|---|
| Label-based | issues.labeled | Issue body and comments |
| Comment-based | issue_comment.created | Comment text and issue context |
| PR review | pull_request.opened | PR diff and description |
| Manual | workflow_dispatch | User-provided inputs |
Create the workflow — Write .github/workflows/copilot-agent.yml:
name: Copilot Agent
on:
issues:
types: [labeled]
jobs:
agent:
if: github.event.label.name == 'copilot'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: read
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/copilot-setup-steps.yml
# The Copilot coding agent handles the rest automatically
Adjust the trigger and condition based on the user's choice in step 2.
Configure guardrails — Ensure the workflow respects project conventions:
.github/copilot-instructions.md automaticallypermissions — principle of least privilegeconcurrency group to prevent parallel agent runs on the same issueTest the workflow — Create a test issue, apply the trigger label (or comment), and verify the agent picks it up. Check the Actions tab for the workflow run.
Document the trigger — Add the trigger phrase and label to AGENTS.md so team members know how to invoke the agent.
permissions: write-all — scope to exactly what the agent needs| Risk | Waste code | Mitigation |
|---|---|---|
| Agent runs on irrelevant issues | W1 Overproduction | Use specific labels and filters |
| Agent waits for human review | W2 Waiting | Enable auto-merge for low-risk changes only |
| Duplicate agent runs | W5 Inventory | Add concurrency groups |
| Over-trusting agent output | W16 Over-trust | Require human review on all agent PRs |