GitHub操作

Universal

github-ops

by daymade

覆盖 GitHub 日常与自动化操作:用 gh CLI 和 GitHub API 创建、查看、合并 PR,管理 Issue、仓库与 Actions 工作流,也适合企业版环境下批量查询和运维。

把 PR、Issue、仓库和工作流操作一站式打通,既能用 gh CLI 也能调 GitHub API,企业版与公网环境都很顺手。

855编码与调试未扫描2026年3月5日

安装

claude skill add --url github.com/daymade/claude-code-skills/tree/main/github-ops

文档

GitHub Operations

Overview

This skill provides comprehensive guidance for GitHub operations using the gh CLI tool and GitHub REST/GraphQL APIs. Use this skill when performing any GitHub-related tasks including pull request management, issue tracking, repository operations, workflow automation, and API interactions.

When to Use This Skill

This skill activates for tasks involving:

  • Creating, viewing, editing, or merging pull requests
  • Managing GitHub issues or repository settings
  • Querying GitHub API endpoints (REST or GraphQL)
  • Working with GitHub Actions workflows
  • Performing bulk operations on repositories
  • Integrating with GitHub Enterprise
  • Automating GitHub operations via CLI or API

Core Operations

Pull Requests

bash
# Create PR with NOJIRA prefix (bypasses JIRA enforcement checks)
gh pr create --title "NOJIRA: Your PR title" --body "PR description"

# List and view PRs
gh pr list --state open
gh pr view 123

# Manage PRs
gh pr merge 123 --squash
gh pr review 123 --approve
gh pr comment 123 --body "LGTM"

📚 See references/pr_operations.md for comprehensive PR workflows

PR Title Convention:

  • With JIRA ticket: GR-1234: Descriptive title
  • Without JIRA ticket: NOJIRA: Descriptive title

Issues

bash
# Create and manage issues
gh issue create --title "Bug: Issue title" --body "Issue description"
gh issue list --state open --label bug
gh issue edit 456 --add-label "priority-high"
gh issue close 456

📚 See references/issue_operations.md for detailed issue management

Repositories

bash
# View and manage repos
gh repo view --web
gh repo clone owner/repo
gh repo create my-new-repo --public

Workflows

bash
# Manage GitHub Actions
gh workflow list
gh workflow run workflow-name
gh run watch run-id
gh run download run-id

📚 See references/workflow_operations.md for advanced workflow operations

GitHub API

The gh api command provides direct access to GitHub REST API endpoints. Refer to references/api_reference.md for comprehensive API endpoint documentation.

Basic API operations:

bash
# Get PR details via API
gh api repos/{owner}/{repo}/pulls/{pr_number}

# Add PR comment
gh api repos/{owner}/{repo}/issues/{pr_number}/comments \
  -f body="Comment text"

# List workflow runs
gh api repos/{owner}/{repo}/actions/runs

For complex queries requiring multiple related resources, use GraphQL. See references/api_reference.md for GraphQL examples.

Authentication and Configuration

bash
# Login to GitHub
gh auth login

# Login to GitHub Enterprise
gh auth login --hostname github.enterprise.com

# Check authentication status
gh auth status

# Set default repository
gh repo set-default owner/repo

# Configure gh settings
gh config set editor vim
gh config set git_protocol ssh
gh config list

Output Formats

Control output format for programmatic processing:

bash
# JSON output
gh pr list --json number,title,state,author

# JSON with jq processing
gh pr list --json number,title | jq '.[] | select(.title | contains("bug"))'

# Template output
gh pr list --template '{{range .}}{{.number}}: {{.title}}{{"\n"}}{{end}}'

📚 See references/best_practices.md for shell patterns and automation strategies

Quick Reference

Most Common Operations:

bash
gh pr create --title "NOJIRA: Title" --body "Description"  # Create PR
gh pr list                                                  # List PRs
gh pr view 123                                              # View PR details
gh pr checks 123                                            # Check PR status
gh pr merge 123 --squash                                    # Merge PR
gh pr comment 123 --body "LGTM"                            # Comment on PR
gh issue create --title "Title" --body "Description"       # Create issue
gh workflow run workflow-name                               # Run workflow
gh repo view --web                                          # Open repo in browser
gh api repos/{owner}/{repo}/pulls/{pr_number}              # Direct API call

Resources

references/pr_operations.md

Comprehensive pull request operations including:

  • Detailed PR creation patterns (JIRA integration, body from file, targeting branches)
  • Viewing and filtering strategies
  • Review workflows and approval patterns
  • PR lifecycle management
  • Bulk operations and automation examples

Load this reference when working with complex PR workflows or bulk operations.

references/issue_operations.md

Detailed issue management examples including:

  • Issue creation with labels and assignees
  • Advanced filtering and search
  • Issue lifecycle and state management
  • Bulk operations on multiple issues
  • Integration with PRs and projects

Load this reference when managing issues at scale or setting up issue workflows.

references/workflow_operations.md

Advanced GitHub Actions workflow operations including:

  • Workflow triggers and manual runs
  • Run monitoring and debugging
  • Artifact management
  • Secrets and variables
  • Performance optimization strategies

Load this reference when working with CI/CD workflows or debugging failed runs.

references/best_practices.md

Shell scripting patterns and automation strategies including:

  • Output formatting (JSON, templates, jq)
  • Pagination and large result sets
  • Error handling and retry logic
  • Bulk operations and parallel execution
  • Enterprise GitHub patterns
  • Performance optimization

Load this reference when building automation scripts or handling enterprise deployments.

references/api_reference.md

Contains comprehensive GitHub REST API endpoint documentation including:

  • Complete API endpoint reference with examples
  • Request/response formats
  • Authentication patterns
  • Rate limiting guidance
  • Webhook configurations
  • Advanced GraphQL query patterns

Load this reference when performing complex API operations or when needing detailed endpoint specifications.

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描119.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描119.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描119.1k

相关 MCP 服务

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.9k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.9k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.4k

评论