← 返回 Skills 市场
534422530

GitHub操作助手

作者 534422530 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
35
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laosi-github
功能描述
GitHub操作助手 - PR/Issue/代码搜索/仓库管理,基于gh CLI。v2新增:CI状态监控、Release管理、Code Review辅助
使用说明 (SKILL.md)

\r \r

GitHub Helper - GitHub操作助手\r

\r

激活词: GitHub / PR操作 / Issue管理\r \r

功能\r

\r

  • PR创建和管理\r
  • Issue操作\r
  • 仓库浏览\r
  • 代码搜索\r
  • 代码审查\r \r

安装\r

\r

# Windows\r
winget install gh\r
\r
# 登录\r
gh auth login\r
```\r
\r
## 命令参考\r
\r
### PR操作\r
\r
```bash\r
# 创建PR\r
gh pr create --title "标题" --body "描述"\r
\r
# 查看PR列表\r
gh pr list --state open\r
\r
# PR详情\r
gh pr view 123\r
\r
# 合并PR\r
gh pr merge 123 --squash\r
\r
# 评论PR\r
gh pr comment 123 --body "评论内容"\r
```\r
\r
### Issue操作\r
\r
```bash\r
# 创建Issue\r
gh issue create --title "标题" --body "描述"\r
\r
# 查看Issue列表\r
gh issue list --state open\r
\r
# 关闭Issue\r
gh issue close 456\r
```\r
\r
### 仓库操作\r
\r
```bash\r
# 查看仓库\r
gh repo view\r
\r
# 克隆仓库\r
gh repo clone owner/repo\r
\r
# 查看代码\r
gh search code "keyword"\r
```\r
\r
## Python封装\r
\r
```python\r
import subprocess\r
\r
class GitHubHelper:\r
    def __init__(self, repo: str = None):\r
        self.repo = repo\r
    \r
    def create_pr(self, title: str, body: str = "") -> str:\r
        result = subprocess.run(\r
            ["gh", "pr", "create", "--title", title, "--body", body],\r
            capture_output=True, text=True\r
        )\r
        return result.stdout.strip()\r
    \r
    def list_prs(self, state: str = "open") -> list:\r
        result = subprocess.run(\r
            ["gh", "pr", "list", "--state", state, "--json", "number,title,state"],\r
            capture_output=True, text=True\r
        )\r
        import json\r
        return json.loads(result.stdout)\r
    \r
    def create_issue(self, title: str, body: str = "") -> str:\r
        result = subprocess.run(\r
            ["gh", "issue", "create", "--title", title, "--body", body],\r
            capture_output=True, text=True\r
        )\r
        return result.stdout.strip()\r
    \r
    def search_code(self, query: str, repo: str = None) -> list:\r
        cmd = ["gh", "search", "code", query, "--json", "path,repository"]\r
        if repo:\r
            cmd.extend(["--repo", repo])\r
        result = subprocess.run(cmd, capture_output=True, text=True)\r
        import json\r
        return json.loads(result.stdout)\r
```\r
\r
## 使用场景\r
\r
1. 自动化PR审查流程\r
2. 批量Issue管理\r
3. 代码搜索分析\r
4. 仓库状态监控\r
安全使用建议
Install only if you are comfortable with an agent using your logged-in GitHub CLI context. Before allowing merges, issue closures, releases, or comments, require explicit repository, PR or issue number, and a confirmation step.
能力评估
Purpose & Capability
The skill’s stated purpose is GitHub PR, issue, repository, search, review, CI, and release help via the gh CLI, which matches the documented commands.
Instruction Scope
The activation phrase includes the broad term “GitHub,” and the command reference includes state-changing operations such as PR merge and issue close without explicit confirmation, repo validation, or dry-run guidance.
Install Mechanism
The package declares only a dependency on the gh binary and no install scripts; the documented setup is installing gh and running gh auth login.
Credentials
Using the authenticated gh CLI is proportionate for GitHub automation, but it can act on repositories available to the logged-in account.
Persistence & Privilege
The skill does not add persistence or background workers, but gh auth login relies on local GitHub authentication state outside the skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laosi-github
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laosi-github 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
Version 2.0.0 introduces major new features and improvements: - Added CI状态监控 (CI status monitoring) for repositories. - Introduced Release管理 (Release management) capabilities. - Enhanced Code Review辅助 (code review assistance) features. - Updated documentation and usage examples. - Skill name changed to github-helper for clarity.
元数据
Slug laosi-github
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

GitHub操作助手 是什么?

GitHub操作助手 - PR/Issue/代码搜索/仓库管理,基于gh CLI。v2新增:CI状态监控、Release管理、Code Review辅助. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 GitHub操作助手?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install laosi-github」即可一键安装,无需额外配置。

GitHub操作助手 是免费的吗?

是的,GitHub操作助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

GitHub操作助手 支持哪些平台?

GitHub操作助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 GitHub操作助手?

由 534422530(@534422530)开发并维护,当前版本 v2.0.0。

💬 留言讨论