一键导入
pbi-dispatcher-github
Dispatch work items to GitHub Copilot coding agent for GitHub-hosted repos. Uses `gh agent-task create` to create agent tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Dispatch work items to GitHub Copilot coding agent for GitHub-hosted repos. Uses `gh agent-task create` to create agent tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate the weekly Android Broker on-call (OCE) WoW + 60-day trend telemetry report as a polished self-contained HTML file. Use this skill for the weekly OCE rotation when asked to "produce the OCE report", "weekly on-call report", "WoW telemetry report", "weekly broker health report", or "generate this week's on-call summary". Pulls from `android_spans` materialized views, attributes regressions/improvements to PRs in `broker/` and `common/`, and writes to `$env:USERPROFILE\android-oce-reports\oncall-wow-report-YYYY-MM-DD.html` (outside the workspace so reports are never committed).
Generate S360 weekly reports for the Android Auth team. Fetches active action items from S360 MCP server, creates ADO work items (PBIs) for untracked items, and produces a polished Outlook-compatible HTML email report. Triggers include "S360 report", "generate S360 report", "weekly S360", "S360 status", "what are our S360 items", or any request to review, report on, or triage S360 action items for the Android Auth team.
Generate a version-over-version release-health report for the Android Broker and/or the Authenticator app as one polished self-contained HTML file. Use this skill when monitoring a rollout — triggers include "monitor this release", "release health report", "broker rollout health", "authenticator rollout", "is this release safe to widen", "what's changing this release and why", "crash regression", "stability report", or "compare a new version vs a previous version". Accepts a Broker version and/or an Authenticator version being rolled out, plus a previous/baseline version per app (or an all-versions baseline), runs Kusto queries for each app to quantify what changed and why, adds an Authenticator crash/stability layer from App Center (crashes per 1k active devices), and writes the HTML to the android-release-reports folder under the user's home directory (outside the workspace so reports are never committed).
Investigate Aria health-metric alerts (threshold-based IcMs of the form "Aria detected an incident in <project> for <metric>"). Use this skill when an IcM was triggered by Aria's threshold monitor on android_spans / android_metrics — NOT for customer-reported authentication failures. Triggers include "investigate Aria alert", "Aria detected an incident", "health metric incident", "telemetry threshold breach", or any IcM where the title starts with "Aria detected".
Analyze Android authentication telemetry using Azure Data Explorer (Kusto). Use this skill for querying android_spans, eSTS correlation, latency investigation, error analysis, and telemetry troubleshooting. Triggers include "query Kusto", "analyze telemetry", "check android_spans", "eSTS correlation", "latency investigation", "error patterns", or any request involving telemetry data analysis.
Systematically explore unfamiliar codebases to find implementations, patterns, and architecture. Use this skill when asked to find code, locate implementations, understand how features work, trace call flows, or explore project structure. Triggers include "where is X implemented", "find the code for Y", "how does Z work in this repo", "trace the flow of", "show me the implementation of", or any request requiring codebase exploration with evidence-based findings.
| name | pbi-dispatcher-github |
| description | Dispatch work items to GitHub Copilot coding agent for GitHub-hosted repos. Uses `gh agent-task create` to create agent tasks. |
Dispatch work items to GitHub Copilot coding agent by creating agent tasks in GitHub-hosted repos.
This skill is for GitHub repos only. For ADO repos, use pbi-dispatcher-ado.
Read .github/orchestrator-config.json for:
modules — module-to-repo mapping (each module has a repo key)repositories — repo details: slug, baseBranch, hostgithub.configFile — per-developer config path (default: .github/developer-local.json)Read the developer-local config file for GitHub account mapping:
// .github/developer-local.json
{
"github_accounts": {
"org/common-repo": "johndoe",
"enterprise-org/service-repo": "johndoe_microsoft"
}
}
To resolve a module to dispatch details:
modules.<module>.repo → get the repo keyrepositories.<repo> → get slug, baseBranch, hostdeveloper-local.github_accounts.<slug> → get the GitHub usernamegh auth switch --user <username> before dispatchinggh) authenticatedcopilot-agent-readyCRITICAL: Determine which gh CLI accounts to use. Never hardcode usernames.
Step 0: Verify gh CLI is installed:
gh --version
If not found, offer to install:
winget install --id GitHub.cli -ebrew install ghStep 1: Check developer config file (from github.configFile in config):
$config = Get-Content "<configFile>" -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json
Step 2: Discover from gh auth status:
$ghStatus = gh auth status 2>&1
Map accounts to types:
_ suffix) → public repos_microsoft suffix) → emu reposStep 3: Prompt the developer (fallback):
"I need your GitHub usernames:
- Public GitHub (for public org repos): ___
- GitHub EMU (for enterprise repos, if applicable): ___"
Offer to save to the developer config file.
Step 4: Not signed in at all:
"Please run:
gh auth login --hostname github.com"
Use modules → repositories → developer-local.json to resolve dispatch details:
// orchestrator-config.json (committed, shared):
"repositories": {
"common-repo": { "slug": "org/common-repo", "host": "github", "baseBranch": "main" },
"service-repo": { "slug": "enterprise-org/service-repo", "host": "github", "baseBranch": "dev" }
},
"modules": {
"core": { "repo": "common-repo" },
"service": { "repo": "service-repo" }
}
// developer-local.json (per-developer, gitignored):
"github_accounts": {
"org/common-repo": "johndoe",
"enterprise-org/service-repo": "johndoe_microsoft"
}
// Resolution: module "core" → repo "common-repo" → slug "org/common-repo"
// → gh account "johndoe" (from developer-local) → gh auth switch --user johndoe
Read PBI details from ADO (via MCP) or from the chat context. Need:
For each work item, check if dependencies (other AB# IDs) have merged PRs. Skip blocked items.
For each work item that HAS dependencies on already-merged PBIs, enrich the dispatch prompt with context about what those dependencies changed. This is critical — the coding agent implementing PBI #3 needs to know what PBI #1 introduced.
For each merged dependency:
gh pr list --repo "<slug>" --search "AB#<dep-id>" --state merged --json number,title,files --jq '.[0]'
If a merged PR is found, add this block to the dispatch prompt:
## Dependency Context
This work item depends on already-merged changes:
### AB#<dep-id>: <dep-title> (PR #<number>, merged)
Files changed:
- <file1> (added/modified)
- <file2> (added/modified)
Key APIs introduced: [extract from PR title/files — e.g., new classes, interfaces]
Build on these changes. Do NOT duplicate or re-implement what the dependency PR already added.
If the PR can't be found (no AB# match), skip gracefully — the PBI description is still self-contained.
For each ready work item:
Switch to correct account (based on repo's accountType from config):
gh auth switch --user <discovered_username_for_account_type>
Dispatch via gh agent-task create (preferred, requires gh v2.80+):
Write the full PBI description to a temp file to avoid shell escaping issues:
$prompt = @"
<full PBI description — Objective, Context, Technical Requirements,
Acceptance Criteria. Include 'Fixes AB#ID'. Include 'Follow .github/copilot-instructions.md strictly.'>
"@
$prompt | Set-Content -Path "$env:TEMP\pbi-prompt.txt"
gh agent-task create (Get-Content "$env:TEMP\pbi-prompt.txt" -Raw) --repo "<slug>" --base <baseBranch>
IMPORTANT prompt content:
Fixes AB#<ID> so PR links to ADOFollow .github/copilot-instructions.md strictlyFallback (if gh agent-task create fails): Create a GitHub Issue and assign to Copilot.
Mark the ADO work item as Active, add tag agent-dispatched.
## Dispatch Summary
| AB# | Repo | Method | Status |
|-----|------|--------|--------|
| AB#12345 | org/common-repo | agent-task | ✅ Dispatched |
| AB#12346 | org/service-repo | agent-task | ✅ Dispatched |
| AB#12347 | org/client-repo | ⏸ Blocked | Waiting on AB#12345 |
### Next Step
> Say **"status"** to check agent PR progress.
> Use `@copilot` in PR comments to iterate with the coding agent.
After PRs are created, use @copilot in PR comments to iterate:
@copilot Please add unit tests for the error case.
@copilot Use the Logger class instead of direct logging.