gh-agent-session
БесплатноБез исполняемых скриптовНе проверенUse gh agent-session commands to inspect and manage agent sessions.
от github★ 5 758 звёзд на GitHubОб этом скилле
GitHub CLI Agent Session Extension
The gh agent-task extension creates GitHub Copilot coding agent sessions from the CLI. A session 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 sessions 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:
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 session from a description:
# 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 session:
https://github.com/owner/repo/issues/123
List Agent Tasks
List agent sessions in a repository:
# List all agent sessions
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 session:
# 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 session:
# 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 session descriptions should be clear, specific natural language instructions:
Good Example:
# 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:
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-session safe output feature in GitHub Agentic Workflows (gh-aw).
Safe Output Configuration
safe-outputs:
create-agent-session:
base: main # Base branch for agent session PR
target-repo: "owner/target-repo" # Cross-repository task creation
Workflow Example
on:
issues:
types: [labeled]
permissions:
contents: read
actions: read
engine: claude
safe-outputs:
create-agent-session:
base: main
# Code Task Delegator
When an issue is labeled with "code-task", analyze the requirements and create a GitHub Copilot coding agent session with detailed instructions for implementing the requested changes.
Implementation Details
The safe output processor:
- Reads agent output from the workflow execution
- Extracts
create_agent_taskitems from the structured output - Writes task descriptions to temporary files
- Executes
gh agent-task create --from-file <file> --base <branch> - Captures the created task URL and number
- Reports results in job summary
Environment Variables:
GITHUB_AW_AGENT_TASK_BASE: Base branch for the pull requestGITHUB_AW_TARGET_REPO: Target repository for cross-repo task creationGITHUB_AW_SAFE_OUTPUTS_STAGED: Preview mode flag
Authentication Requirements
Agent session creation requires elevated permissions beyond the default GITHUB_TOKEN:
Required Permissions:
contents: write- To create branches and commitsissues: write- To create the agent session issuepull-requests: write- To create pull requests
Token Precedence:
COPILOT_GITHUB_TOKEN- Dedicated Copilot operations token (recommended)GH_AW_GITHUB_TOKEN- General override token (legacy)- Custo
Установить gh-agent-session в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gh-agent-session?
Use gh agent-session commands to inspect and manage agent sessions.
Как установить скилл gh-agent-session?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gh-agent-session запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic