mcpField
C
copilot

copilot

github.com/mlflowAgent workflows28.6k40 installsUpdated today
Repository

About copilot

A skill for managing GitHub Copilot agent tasks through `gh agent-task` and GitHub pull request APIs. It documents task creation, session polling, batched review feedback, and workflow approval.

Key features

  1. 01Create agent tasks from text or Markdown
  2. 02Poll Copilot sessions for completion
  3. 03Send batched review feedback
  4. 04Approve workflows for Copilot commits

Use cases

  1. 01Start a Copilot task from a PR description
  2. 02Track an agent session until it finishes
  3. 03Submit grouped PR feedback to Copilot

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mlflow/mlflow --skill copilot

After installing, type/copilotin Claude Code to confirm it loaded.

Bundled filesapprove.shpoll.sh

Details

From the project README

Examples

# Create a task with an inline description
gh agent-task create "<task description>"

# Create a task from a markdown file
gh agent-task create -F task-desc.md

Post-creation

Print both the session URL and the PR URL (strip /agent-sessions/... from the session URL).

Example:

Polling for completion

Once Copilot starts working, poll in the background until Copilot finishes. The script automatically finds the latest session for the PR:

bash .claude/skills/copilot/poll.sh "<owner>/<repo>" <pr_number>

Sending feedback

If the PR needs changes, batch all feedback into a single review with @copilot in each comment so they're addressed in one session:

gh api repos/<owner>/<repo>/pulls/<pr_number>/reviews --input - <<'EOF'
{
  "event": "COMMENT",
  "comments": [
    {
      "path": "<file_path>",
      "line": <line_number>,
      "side": "RIGHT",
      "body": "@copilot <comment>",
      // ... more params
    },
    // ... more comments
  ]
}
EOF

After sending feedback, Copilot starts a new session, typically within ~10 seconds. Wait at least 15 seconds before polling so the new session gets picked up.

Approving workflows

Copilot commits require approval to trigger workflows for security reasons, while maintainer commits do not. Once the PR is finalized, run the approve script:

bash .claude/skills/copilot/approve.sh "<owner>/<repo>" <pr_number>

Comments

Markdown supported