Agent Github

io.github.craftsamo由 GitHub 账号 craftsamo 发布v0.2.0更新于 Nov 4, 2026

GitHub tools for coding agents: issues, project boards, pull requests, releases and Actions.

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

面向编码代理的 GitHub 工具,覆盖议题、项目看板、拉取请求、仓库、发布和 Actions,以 MCP 服务器或各 harness 插件形式提供。

可以做什么
  • 完整查看单个议题,或列出仓库的议题及父议题的子议题
  • 创建、编辑、评论、关闭、重新打开议题,并设置议题之间的关联,或创建与议题关联的分支
  • 选择注册哪些工具集(issues、pull requests、projects、repos、releases、actions),并按 ID 添加或排除单个工具
  • 以只读模式运行,此时不注册任何写入工具
  • 每个工具集附带一个技能,告诉代理如何使用对应工具
适用场景
适合让编码代理直接处理 GitHub 议题和拉取请求,例如分类、提交、关联或关闭议题以及创建关联分支,而不必由用户手动复制信息。当前版本只有 issues 工具集包含工具。
运行要求
通过 stdio 在本地运行。需要 Node.js 24 或更高版本,以及已安装并以用户身份完成认证的 GitHub CLI。应从发布标签或版本安装,而非默认分支。设置可通过命令行参数或 AGENT_GITHUB_TOOLSETS、AGENT_GITHUB_READ_ONLY、AGENT_GITHUB_TOOLS、AGENT_GITHUB_EXCLUDE_TOOLS、AGENT_GITHUB_CONFIRM 环境变量给出,但 Codex 和 Grok Build 不会向插件的服务器传递环境变量。
安装前请注意
工具通过已认证的 GitHub CLI 以用户身份操作 GitHub,写入会影响真实仓库。写入包括创建和编辑议题、评论、关闭、重新打开、修改关联关系以及创建分支。OpenCode 会放行任何未被规则命名的操作,因此除非添加 github_* 的 ask 规则,写入会在不询问的情况下执行;Hermes 的 -z 和 --yolo 会跳过审批。可用 read_only 或 exclude_tools 限制注册的工具。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agent Github,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

agent-github

GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions. One implementation, delivered to each agent harness in the form that suits it best.

HarnessDeliveryPinned by
OpenCode V2native plugin (npm package, with skills)the version in the package
OpenCode V1native plugin (npm package, no skills)the version in the package
Claude Codeplugin: MCP server and skillsthe release tag, as the ref
Codexplugin: MCP server and skillsthe release tag, as the ref
Grok Buildplugin: MCP server and skillsthe release tag, as @ref
Antigravityplugin: MCP server and skills (not yet verified)the release tag's tree URL (not yet verified)
Hermes Agentnative plugin (Python, calls the command line)the release commit, as the SHA
other MCP hostMCP server from npmthe version in the package

0.2.0 renamed the MCP server from github to agent-github, so allow rules and MCP configurations written for 0.1.0 change.

The tools need Node.js 24 or later and the GitHub CLI, authenticated as you. docs/conventions.md describes how the tools are named and how they behave.

Install

Install from a release, never from the default branch: a release is a tag whose commit carries the built dist/, and the default branch does not. In the commands below, <version> is a release's version (1.2.3) and <sha> is the commit its tag names:

sh
gh api repos/craftsamo/agent-github/commits/v<version> --jq .sha

OpenCode

OpenCode V2 takes the package and its options in opencode.json:

json
{  "plugins": [    {      "package": "@craftsamo/agent-github@<version>",      "options": { "toolsets": ["issues", "pull_requests", "projects"] }    }  ],  "permissions": [{ "action": "github_*", "resource": "*", "effect": "ask" }]}

OpenCode V1 takes the package as a string, or as a pair with its options:

json
{  "plugin": [["@craftsamo/agent-github@<version>", { "toolsets": ["issues", "pull_requests", "projects"] }]],  "permission": { "github_*": "ask" }}

OpenCode allows any action no rule names, so the plugin's request is granted silently unless a rule says ask. Read tools never ask, so the github_* glob is safe.

V1 registers no skills. Unpack the package and copy its skills/* folders into ~/.config/opencode/skills/:

sh
npm pack @craftsamo/agent-github@<version>tar -xzf craftsamo-agent-github-<version>.tgzmkdir -p ~/.config/opencode/skillscp -r package/skills/* ~/.config/opencode/skills/rm -rf package craftsamo-agent-github-<version>.tgz

Claude Code

sh
claude plugin marketplace add craftsamo/agent-github#v<version>claude plugin install agent-github@craftsamo

Codex

sh
codex plugin marketplace add craftsamo/agent-github --ref v<version>codex plugin add agent-github@craftsamo

Codex starts the MCP server in the plugin's install directory, so name issues as owner/repo#N or pass repo (a bare number fails there with a message saying so).

Grok Build

sh
grok plugin install craftsamo/agent-github@v<version> --trust

Antigravity

Install from the tree of the release tag, never from the default branch, which has no built dist/. The pinning and the install command are not yet verified on a real install.

sh
agy plugin install https://github.com/craftsamo/agent-github/tree/v<version>

Hermes Agent

Hermes installs a commit, not a tag, and the plugin installs disabled:

sh
hermes plugins install craftsamo/agent-github --ref <sha>hermes plugins enable agent-github

Any other MCP host

Add the server to the host's MCP configuration. Flags go in args:

json
{  "mcpServers": {    "agent-github": {      "command": "npx",      "args": ["-y", "@craftsamo/agent-github@<version>", "--toolsets", "issues,pull_requests,projects"]    }  }}

Tools and skills

Each toolset comes with a skill that tells an agent how to use its tools. A toolset with no tools yet registers none (0.2.0 ships the issues tools).

Issues (issues)

ToolWhat it doesClass
github_issue_readview one issue in full, or list a repository's issues or a parent's sub-issuesread
github_issue_createcreate an issue with its kind, labels, assignees, milestone, parent and blocked-by issuesadd
github_issue_editchange the title, body (or append to it), kind, labels, assignees or milestoneoverwrite
github_issue_commentcomment on an issueadd
github_issue_closeclose with a reason (completed, not_planned, duplicate)overwrite
github_issue_reopenreopen a closed issueoverwrite
github_issue_relateset the parent, sub-issues, blocked-by and blocking issues, sending only what differsidempotent
github_issue_developcreate a branch on GitHub linked to the issue, or return the one already linkedidempotent

The skill is github-issues. An issue's kind is the organization's Issue Type of that name when it defines one, otherwise a type:<kind> label.

Reads and writes

Every read tool is named github_<domain>_read. Reads can run unasked; writes are confirmed by the harness.

HarnessReads without asking
OpenCodealways; the plugin asks only before a write
Claude Codethe rule mcp__plugin_agent-github_agent-github__*_read in permissions.allow of ~/.claude/settings.json or a project
Codexalways; Codex runs tools that declare readOnlyHint unasked, as the read tools do
Grok Buildgrok --allow 'MCPTool(agent-github__*_read)'
Antigravityan Allow rule mcp(agent-github/<tool>) for each read tool; not yet verified
Hermesalways; the plugin asks only before a write

Where a write is asked about, and where it is not:

  • OpenCode grants any action no rule names, so a write runs unasked unless a rule asks for it: add the github_* rule shown under OpenCode.
  • Codex under codex exec, and Grok Build under grok -p, refuse a write they cannot ask about, unless it is allowed beforehand.
  • Hermes hermes chat -q refuses a write it cannot ask about; hermes -z and --yolo skip approval, so writes then run unasked.

Settings

Every entry point takes the same settings. A flag wins over its environment variable, and an option or setting wins over the variable too.

SettingFlagVariableMeaning
toolsets--toolsetsAGENT_GITHUB_TOOLSETSissues, pull_requests, projects, repos, releases, actions or all; default issues and pull_requests
read_only--read-onlyAGENT_GITHUB_READ_ONLYregisters no tool that writes; wins over every other setting
tools--toolsAGENT_GITHUB_TOOLSsingle tools to add by ID, whatever their toolset
exclude_tools--exclude-toolsAGENT_GITHUB_EXCLUDE_TOOLSsingle tools to remove by ID; wins over tools and toolsets
confirm--confirmAGENT_GITHUB_CONFIRMMCP server only: harness (default) or elicitation, as docs/conventions.md describes

Lists are comma-separated in a flag or a variable. Where each harness reads them:

  • OpenCode takes the plugin options shown above, with lists as arrays and read_only as a boolean.

  • Hermes takes plugins.entries.agent-github.settings in config.yaml:

    yaml
    plugins:  entries:    agent-github:      settings:        toolsets: [issues, pull_requests, projects]        read_only: false        exclude_tools: [github_pr_merge]
  • Claude Code and Antigravity start the plugin's server without flags; Claude Code passes the client's environment, so set the variables in the environment the harness runs in.

  • Codex and Grok Build pass no environment to a plugin's MCP server, so the AGENT_GITHUB_* variables have no effect there. To change settings in Codex, add the server under [mcp_servers] in Codex's config with flags in args (as in Any other MCP host) instead of using the plugin.

Layout

  • src/core/ — the tools, free of any harness.
  • src/mcp/ — the MCP server, built to dist/mcp.js and run by agent-github.
  • src/opencode/ — the OpenCode plugin, built to dist/opencode.js.
  • src/cli/ — the command line the Hermes plugin calls, built to dist/cli.js and run by agent-github-cli.
  • src/hermes/, plugin.yaml and __init__.py — the Hermes plugin.
  • skills/ — one skill per toolset, skills/<name>/SKILL.md, which every harness that takes skills loads from the package or plugin root.
  • plugin.json, mcp.json, .mcp.json, .claude-plugin/, .agents/plugins/, .antigravity-plugin/ and mcp_config.json — the plugin manifests of the other harnesses. The root .mcp.json is the configuration Grok Build reads (with ${CLAUDE_PLUGIN_ROOT}, the variable both Grok Build and Claude Code expand); when working on this repository in Claude Code, decline the project MCP server it offers from that file.

How a release is made is in RELEASING.md.

License

MIT

来源:README.md,提交 6541d5a

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:软件包安装失败。

版本历史

1
  1. v0.2.0最新Nov 4, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分