Official agent skill

Gh Agent Task

by github in github/gh-aw

Use gh agent-task commands to create, run, and monitor agent tasks.

OfficialMITAuto-check passedDevelopment

Install Gh Agent Task

skills CLI
$ npx skills add github/gh-aw --skill gh-agent-task -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/gh-aw gh-agent-task --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/gh-aw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/gh-agent-task .claude/skills/gh-agent-task && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-agent-task
GitHub stars
5.3k
Token cost
~2.6k tokens
SKILL.md length
796 words
Files
1
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Use gh agent-task commands to create, run, and monitor agent tasks.

  • Works in 6 steps: Reads agent output from the workflow… → Extracts create_agent_task items from… → Writes task descriptions to temporary… → …
  • Development work in your project
  • SKILL.md covers Overview, Installation, Core Commands and Task Description Format, plus 7 more sections
  • Calls gh; reaches github.com; needs COPILOT_GITHUB_TOKEN and GH_AW_GITHUB_TOKEN

What it does

Gh Agent Task is an agent skill from github/gh-aw, published by the product's own GitHub organization. Use gh agent-task commands to create, run, and monitor agent tasks.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with GitHub. The repository describes itself as: GitHub Agentic Workflows. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/gh-agent-task”

Requirements

  • A credential in GITHUB_TOKEN
  • A credential in COPILOT_GITHUB_TOKEN

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Reads agent output from the workflow execution
  2. Extracts create_agent_task items from the structured output
  3. Writes task descriptions to temporary files
  4. Executes gh agent-task create --from-file --base
  5. Captures the created task URL and number
  6. Reports results in job summary

What it can do on your machine

Read from SKILL.md and the folder at commit eb63040. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • docs.github.com
    • github.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • COPILOT_GITHUB_TOKEN
    • GH_AW_GITHUB_TOKEN
    • GITHUB_TOKEN
    • GH_AW_COPILOT_TOKEN
    • COPILOT_CLI_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gh Agent Task loads about 2.6k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 796 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/gh-aw at commit eb63040, republished under its MIT licence (© github). 796 words, ~2,567 tokens.

Download SKILL.mdSave it as .claude/skills/gh-agent-task/SKILL.md (or your agent's skills folder).
name
gh-agent-task
description
Use gh agent-task commands to create, run, and monitor agent tasks.

GitHub CLI Agent Task Extension

The gh agent-task extension creates GitHub Copilot coding agent tasks from the CLI. A task is a GitHub issue that triggers automated code changes from natural language instructions.

Repository: https://github.com/github/agent-task (internal GitHub extension)

Overview

Agent tasks are GitHub issues that:

  • Contain natural language instructions for code changes
  • Trigger GitHub Copilot to autonomously execute the task
  • Create pull requests with the implemented changes
  • Provide a workflow for reviewing and merging automated code modifications

Installation

Install via GitHub CLI:

bash
gh extension install github/agent-task

Note: This extension requires authentication with a Personal Access Token (PAT) that has appropriate permissions for creating issues and pull requests.

Core Commands

Create Agent Task

Create a new agent task from a description:

bash
# Create task with inline description
gh agent-task create "Fix the bug in authentication flow"

# Create task from file
gh agent-task create --from-file task-description.md

# Specify base branch
gh agent-task create --base develop "Implement new feature"

# Create in different repository
gh agent-task create --repo owner/repo "Update documentation"

Command Parameters:

  • Description (positional): Natural language description of the task
  • --from-file <path>: Read task description from file
  • --base <branch>: Base branch for the pull request (default: repository default branch)
  • --repo <owner/repo>: Target repository (default: current repository)

Output Format: The command outputs the URL of the created agent task:

https://github.com/owner/repo/issues/123
List Agent Tasks

List agent tasks in a repository:

bash
# List all agent tasks
gh agent-task list

# List with filters
gh agent-task list --state open
gh agent-task list --state closed
gh agent-task list --state all
View Agent Task

View details of a specific agent task:

bash
# View by number
gh agent-task view 123

# View by URL
gh agent-task view https://github.com/owner/repo/issues/123
Update Agent Task

Update an existing agent task:

bash
# Update description
gh agent-task update 123 "Updated task description"

# Update from file
gh agent-task update 123 --from-file updated-description.md

Task Description Format

Agent task descriptions should be clear, specific natural language instructions:

Good Example:

markdown
# Refactor User Authentication

Refactor the user authentication flow in `src/auth/login.js` to:
1. Use async/await instead of callbacks
2. Add proper error handling with specific error messages
3. Add input validation for email format
4. Update tests to cover the new implementation

Maintain backward compatibility with the existing API.

Poor Example:

markdown
Fix auth

Best Practices:

  • Be specific about what needs to change
  • Reference file paths when relevant
  • Include acceptance criteria
  • Specify any constraints or requirements
  • Mention testing expectations

Integration with GitHub Agentic Workflows

The gh agent-task extension is used by the create-agent-task safe output feature in GitHub Agentic Workflows (gh-aw).

Safe Output Configuration
yaml
safe-outputs:
  create-agent-task:
    base: main                       # Base branch for agent task PR
    target-repo: "owner/target-repo" # Cross-repository task creation
Workflow Example
yaml
on:
  issues:
    types: [labeled]
permissions:
  contents: read
  actions: read
engine: claude
safe-outputs:
  create-agent-task:
    base: main

# Code Task Delegator

When an issue is labeled with "code-task", analyze the requirements and create a GitHub Copilot coding agent task with detailed instructions for implementing the requested changes.
Implementation Details

The safe output processor:

  1. Reads agent output from the workflow execution
  2. Extracts create_agent_task items from the structured output
  3. Writes task descriptions to temporary files
  4. Executes gh agent-task create --from-file <file> --base <branch>
  5. Captures the created task URL and number
  6. Reports results in job summary

Environment Variables:

  • GITHUB_AW_AGENT_TASK_BASE: Base branch for the pull request
  • GITHUB_AW_TARGET_REPO: Target repository for cross-repo task creation
  • GITHUB_AW_SAFE_OUTPUTS_STAGED: Preview mode flag

Authentication Requirements

Agent task creation requires elevated permissions beyond the default GITHUB_TOKEN:

Required Permissions:

  • contents: write - To create branches and commits
  • issues: write - To create the agent task issue
  • pull-requests: write - To create pull requests

Token Precedence:

  1. COPILOT_GITHUB_TOKEN - Dedicated Copilot operations token (recommended)
  2. GH_AW_GITHUB_TOKEN - General override token (legacy)
  3. Custom token via github-token configuration field

Note: The default GITHUB_TOKEN is not supported as it lacks required permissions. The COPILOT_CLI_TOKEN and GH_AW_COPILOT_TOKEN secrets are no longer supported as of v0.26+.

Setting Up Authentication

Store your Personal Access Token in repository secrets:

bash
# In your repository settings, add secret:
# Name: COPILOT_GITHUB_TOKEN (recommended)
# Value: ghp_YourPersonalAccessToken

:::note[Backward Compatibility] Legacy token name GH_AW_GITHUB_TOKEN is still supported for backward compatibility. The GH_AW_COPILOT_TOKEN token is no longer supported as of v0.26+. :::

Error Handling

Authentication Errors
Error: failed to create agent task
authentication required

Solution: Configure COPILOT_GITHUB_TOKEN or legacy GH_AW_GITHUB_TOKEN with a PAT.

Permission Errors
Error: 403 Forbidden
Resource not accessible by integration

Solution: Ensure the token has contents: write, issues: write, and pull-requests: write permissions.

Show full SKILL.md (322 more words)Show less
Repository Not Found
Error: repository not found

Solution: Verify the target repository exists and the token has access to it.

Testing in Staged Mode

When safe-outputs.staged: true, agent tasks are previewed without creation:

yaml
safe-outputs:
  staged: true
  create-agent-task:

Staged Output:

markdown
## 🎭 Staged Mode: Create Agent Tasks Preview

The following agent tasks would be created if staged mode was disabled:

### Task 1

**Description:**
Refactor authentication to use async/await pattern

**Base Branch:** main

**Target Repository:** owner/repo

Common Patterns

Issue-Triggered Agent Tasks
yaml
on:
  issues:
    types: [labeled]
engine: claude
safe-outputs:
  create-agent-task:

When issue is labeled with "needs-implementation", create an agent task with implementation instructions.
Scheduled Code Improvements
yaml
on:
  schedule:
    - cron: "0 9 * * 1"  # Monday 9AM
engine: copilot
safe-outputs:
  create-agent-task:
    base: develop

Analyze codebase for improvement opportunities and create agent tasks for top 3 improvements.
Cross-Repository Task Delegation
yaml
on: workflow_dispatch
engine: claude
safe-outputs:
  create-agent-task:
    target-repo: "organization/backend-repo"
    base: main

Create agent task in backend repository to implement the API changes described in this issue.

Best Practices

Task Description Guidelines
  1. Be Specific: Include file paths, function names, and exact requirements
  2. Include Context: Explain why the change is needed
  3. Define Success: Specify acceptance criteria or expected outcomes
  4. Mention Tests: Request test coverage for changes
  5. Set Constraints: Note any compatibility requirements or limitations
Security Considerations
  1. Token Security: Store PATs as secrets, never commit to repository
  2. Permission Scope: Use minimum required permissions on tokens
  3. Repository Access: Validate target repository before task creation
  4. Review Process: Establish review workflow for agent-generated code
Operational Guidelines
  1. Monitor Usage: Track agent task creation and completion rates
  2. Review Output: Always review agent-generated pull requests
  3. Iterate: Refine task descriptions based on agent performance
  4. Document: Maintain patterns for common task types

Troubleshooting

Task Creation Fails Silently

Symptom: No error but no task created

Check:

  1. Verify COPILOT_GITHUB_TOKEN is set in repository secrets
  2. Confirm token has required permissions
  3. Check job logs for error messages
  4. Verify target repository exists and is accessible
Agent Task Not Triggering Copilot

Symptom: Task created but no automated PR

Possible Causes:

  1. GitHub Copilot not enabled for repository
  2. Task description unclear or ambiguous
  3. Repository settings blocking automated PRs
  4. Copilot service issues

Solution: Check repository Copilot settings and refine task description.

Cross-Repository Tasks Fail

Symptom: Error when creating tasks in different repository

Check:

  1. Token has access to target repository
  2. Target repository exists and is spelled correctly
  3. Token has required permissions in target repository

Output Structure

When used via safe outputs, the create-agent-task job provides outputs:

yaml
outputs:
  task_number: "123"
  task_url: "https://github.com/owner/repo/issues/123"

Usage in Dependent Jobs:

yaml
jobs:
  follow_up:
    needs: create_agent_task
    steps:
      - name: Notify team
        run: |
          echo "Agent task created: ${{ needs.create_agent_task.outputs.task_url }}"

References

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/gh-agent-task of github/gh-aw.

Open the folder on GitHubat commit eb63040

Compare with similar skills

Gh Agent Task next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gh Agent Task compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh Agent Task this skillgithub/gh-aw5.3k—~2.6kAutomated safety check: PassMIT
GitHub Sync GateR6410418/Jackrong-llm-finetuning-guide1.7k—~316Automated safety check: PassApache-2.0
Skills Constitutionjiabaobei/skills-constitution231—~5.6kAutomated safety check: PassMIT
Cursor Agents Workflowlangfuse/langfuse35k—~1.7kAutomated safety check: PassCustom licence
Levyra Context EfficiencyLUC4N3X/Levyra-deepsound543—~1.3kAutomated safety check: NotesGPL-3.0
Debug Sessionai-dynamo/dynamo8.2k—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • GitHub Sync Gate

    R6410418/Jackrong-llm-finetuning-guide

    Enforce this repository's local-review-first GitHub sync policy.

    1.7k GitHub stars~316 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Skills Constitution

    jiabaobei/skills-constitution

    当 Agent 接到专业任务(编码/爬虫/文件操作/API调用/数据分析/文档/部署/推送等)时,强制先查记忆层和技能索引,有匹配必用、无匹配必搜、答复时自动推荐(排除已装)。用于防止 Agent 跳过技能直接硬扛通用能力。跨平台通用(WorkBuddy/Claude/ChatGPT/Cursor/Gemini 等 20+ 框架)。完整版本史见 CHANGELOG.md。

    231 GitHub stars~5.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Cursor Agents Workflow

    langfuse/langfuse

    Human handoff, Linear branch names, reviewable (non-draft) PRs, the cursor GitHub label, Claude, Greptile, and Codex review comments, preview test steps, proof of work posted on the GitHub PR, and…

    35k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Levyra Context Efficiency

    LUC4N3X/Levyra-deepsound

    A skill your agent uses for genuinely high-volume Levyra work such as builds, tests, lint, logs, broad searches, dependency output, Git/GitHub or CodeRabbit inspection, CI diagnostics, agent setup…

    543 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Debug Session

    ai-dynamo/dynamo

    Sets up a structured debugging session for a Dynamo bug — pull the report from a Linear ticket, GitHub issue, or pasted text, capture the environment, create a persistent worklog markdown file, and…

    8.2k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • GitHub Commenting

    juspay/neurolink

    How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules.

    143 GitHub stars~698 tokensUpdated today
    DevelopmentAuto-check passed

More from github/gh-aw

All 52 skills in this repo
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.3k GitHub starsUsed in 23 repos~2.8k tokens
    Auto-check passed
  • Official

    Designs and verifies a deterministic grader that measures whether a GitHub Agentic Workflow run reached its real-world or repository outcome.

    5.3k GitHub stars~6.8k tokensUpdated today
    Auto-check passed
  • Official

    Scaffolds, edits, reloads and debugs a canvas extension that the GitHub Copilot CLI can open in its side panel.

    5.3k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Official

    Drives an open pull request to merge-ready from inside a GitHub Copilot cloud agent, resolving review threads and local checks concurrently, without merging or retriggering CI.

    5.3k GitHub stars~3.8k tokensUpdated today
    Auto-check: warnings
  • Official

    Bumps gh-aw's pinned gh-aw-firewall version, rebuilds generated artifacts, and flags upstream spec or schema changes that need follow-up work.

    5.3k GitHub stars~899 tokensUpdated today
    Auto-check passed
  • Official

    Guide to the console struct tag system in gh-aw: headers, titles, number and cost formats, omitempty, and how structs, slices and maps render in the terminal.

    5.3k GitHub stars~736 tokensUpdated today
    Auto-check passed

Works with

Questions about Gh Agent Task

What does Gh Agent Task do?

Use gh agent-task commands to create, run, and monitor agent tasks. Gh Agent Task is an agent skill from github/gh-aw, published by the product's own GitHub organization. Use gh agent-task commands to create, run, and monitor agent tasks.

When should I use Gh Agent Task?

Gh Agent Task fits situations like: development work in your project.

How do I install Gh Agent Task in Claude Code?

Run `npx skills add github/gh-aw --skill gh-agent-task -a claude-code`. Or copy the skill folder (.github/skills/gh-agent-task in github/gh-aw) into .claude/skills/gh-agent-task in your project. Claude Code loads it when a task matches its description.

How do I install Gh Agent Task in Codex?

Run `npx skills add github/gh-aw --skill gh-agent-task -a codex`. Or copy the skill folder (.github/skills/gh-agent-task in github/gh-aw) into .agents/skills/gh-agent-task in your project. Codex loads it when a task matches its description.

Can I use Gh Agent Task in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/gh-aw --skill gh-agent-task -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-agent-task, .gemini/skills/gh-agent-task, .github/skills/gh-agent-task and .opencode/skills/gh-agent-task in your project.

What does Gh Agent Task need to run?

Going by SKILL.md and its folder, Gh Agent Task needs the command-line tools its instructions call (gh) and credentials named COPILOT_GITHUB_TOKEN, GH_AW_GITHUB_TOKEN, GITHUB_TOKEN and GH_AW_COPILOT_TOKEN. Our summary lists: A credential in GITHUB_TOKEN; A credential in COPILOT_GITHUB_TOKEN.

Does Gh Agent Task access the network?

SKILL.md names 3 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.github.com and github.github.com. This is read from the text; nothing was executed.

Is Gh Agent Task safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh Agent Task use?

Gh Agent Task is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh Agent Task use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gh Agent Task?

Skills that share tags, products or a category with Gh Agent Task: GitHub Sync Gate (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars), Skills Constitution (jiabaobei/skills-constitution, 231 stars), Cursor Agents Workflow (langfuse/langfuse, 35k stars) and Levyra Context Efficiency (LUC4N3X/Levyra-deepsound, 543 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh Agent Task?

github (a GitHub organization, an official publisher) maintains it in github/gh-aw, which has 5,350 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/gh-aw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.