# E34 第三方集成 C2 多工具编排 R2 执行代码 Github Config Pr

> Hermes Agent 配置修改、测试、提交 PR 的完整工作流。适用场景：(1) 修改 Hermes 配置并提交 PR，(2) 补丁创建与应用，(3) WSL 环境下 Git/GitHub 操作。触发词：'hermes配置'、'提交PR'、'修改prompt_builder'、'git补丁'。不适用：Skill 内容编写（用 skill-creator）、GitHub Issue 管理（用 github skill）。

- **Type:** Skill
- **Install:** `agentstack add skill-leisvip-agent-skill-taxonomy-e34-c2-r2-github-config-pr`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leisvip](https://agentstack.voostack.com/s/leisvip)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [leisvip](https://github.com/leisvip)
- **Source:** https://github.com/leisvip/agent-skill-taxonomy/tree/main/skills/E34-第三方集成_C2-多工具编排_R2-执行代码_github-config-pr

## Install

```sh
agentstack add skill-leisvip-agent-skill-taxonomy-e34-c2-r2-github-config-pr
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# github-config-pr

Hermes Agent 配置修改、测试、提交 PR 的完整工作流。

## 配置（首次）

确保 gh CLI 已登录：

```bash
gh auth status
# 未登录则执行：
gh auth login
```

确保 SSH Key 已配置（WSL 环境推荐 SSH 方式）：

```bash
ssh -T git@github.com
# 如果失败，生成并添加 Key：
ssh-keygen -t ed25519 -C "your@email.com"
cat ~/.ssh/id_ed25519.pub
# 将公钥添加到 GitHub → Settings → SSH Keys
```

## 核心教训

### System Prompt 的会话级缓存

System Prompt 在会话启动时构建一次，整个会话期间不会更新。只有新会话才会重新构建。

验证方法：退出当前会话 (`/exit`)，重启 Hermes (`hermes`)，在新会话中验证。

### hermes update 会覆盖本地修改

`hermes update` = `git pull`，会覆盖本地修改。需要创建补丁文件，update 后重新应用。

### WSL 环境下的网络配置

WSL 可以直接访问 GitHub，不需要代理。代理端口只在 Windows 上可用。

## 常用命令

### 阶段 1：诊断与规划

```bash
# 验证当前工作目录
pwd

# 检查 Hermes 配置位置
ls ~/.hermes/

# 检查源代码位置
which hermes
ls $(dirname $(which hermes))/../lib/node_modules/hermes-agent/
```

### 阶段 2：备份

```bash
# 备份配置文件
cp -p  .bak.$(date +%Y%m%d_%H%M%S)

# 备份源代码文件
cp -p  .bak.$(date +%Y%m%d_%H%M%S)
```

### 阶段 3：创建补丁

```bash
# 修改后创建补丁
cd 
git diff > ~/.hermes/patches/.patch

# 应用补丁
git apply ~/.hermes/patches/.patch

# 应用补丁后重新安装
cd ~/.local/share/hermes && npm install
# 或
cd /usr/lib/node_modules/hermes && npm install
```

### 阶段 4：测试验证

```bash
# 退出当前会话后重启验证
# /exit
# hermes
# 在新会话中测试修改效果
```

### 阶段 5：Git/GitHub 操作

```bash
# 检查 gh 登录状态
gh auth status

# 克隆仓库（Fork 方式）
gh repo fork NousResearch/hermes-agent --clone
cd hermes-agent

# 创建功能分支
git checkout -b feature/your-feature-name

# 应用补丁
git apply ~/.hermes/patches/.patch

# 提交代码
git add .
git commit -m "feat: 简要描述修改内容"

# 推送到 Fork
git push origin feature/your-feature-name

# 创建 PR
gh pr create --repo NousResearch/hermes-agent \
  --title "feat: 简要描述" \
  --body "## 修改内容\n- 修改1\n- 修改2\n\n## 测试\n- 已在本地验证"
```

### 补丁管理

```bash
# 列出所有补丁
ls ~/.hermes/patches/

# hermes update 后重新应用
hermes update
git apply ~/.hermes/patches/.patch
```

## 注意事项

- 修改前**必须**备份原文件，创建补丁
- System Prompt 修改需要**新会话**才能生效
- `hermes update` 会覆盖本地修改，update 后需重新应用补丁
- WSL 环境推荐 SSH 方式连接 GitHub，避免 Token 权限问题
- PR 描述要清晰说明修改内容和测试结果
- 提交前检查 `gh auth status` 确认登录状态

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leisvip](https://github.com/leisvip)
- **Source:** [leisvip/agent-skill-taxonomy](https://github.com/leisvip/agent-skill-taxonomy)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-leisvip-agent-skill-taxonomy-e34-c2-r2-github-config-pr
- Seller: https://agentstack.voostack.com/s/leisvip
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
