docs: move git-proxy-clone to appendix with proper setup instructions
- Remove git-proxy-clone from skills table (it's a custom local skill) - Add appendix section explaining FastGithub setup - Include copy-paste prompt for Claude to create the skill - Add manual alias configuration as fallback
This commit is contained in:
@@ -319,7 +319,6 @@ cp SKILL.md ~/.claude/skills/my-skill/
|
||||
| Skill | 用途 | 安装 |
|
||||
|-------|------|------|
|
||||
| `pdf` | PDF 处理 | `npx skills add -g anthropic/skills@pdf` |
|
||||
| `git-proxy-clone` | 加速 Git 下载 | `npx skills add -g xvirobotics/metabot@git-proxy-clone` |
|
||||
| `metabot` | 飞书 API 调用 | `npx skills add -g xvirobotics/metabot@metabot` |
|
||||
| `metamemory` | 共享知识库 | `npx skills add -g xvirobotics/metabot@metamemory` |
|
||||
| `lark-doc` | 飞书文档操作 | `npx skills add -g xvirobotics/metabot@lark-doc` |
|
||||
@@ -456,6 +455,69 @@ rm ~/.local/bin/metabot
|
||||
|
||||
---
|
||||
|
||||
## 附录:Git 代理加速(可选)
|
||||
|
||||
`git-proxy-clone` 是一个本地自定义 skill,可在执行 git 命令时自动配置 FastGithub 代理,加速 GitHub 访问。
|
||||
|
||||
### 前置依赖
|
||||
|
||||
**安装 FastGithub**
|
||||
- 下载地址:https://github.com/creazyboyone/FastGithub/releases
|
||||
- 安装并启动 FastGithub(默认代理端口 `38457`)
|
||||
|
||||
### 使用方式
|
||||
|
||||
#### 方式1:使用 Skill(推荐,自动代理)
|
||||
|
||||
**安装 skill:**
|
||||
|
||||
复制以下 prompt 发送给 Claude:
|
||||
|
||||
```
|
||||
请帮我创建一个名为 git-proxy-clone 的本地 skill,用于自动配置 FastGithub 代理加速 GitHub 操作。
|
||||
|
||||
要求:
|
||||
1. 路径:~/.claude/skills/git-proxy-clone/SKILL.md
|
||||
2. 触发条件:用户执行 git clone、git pull、git fetch 或 npx skills add 时
|
||||
3. 代理地址:http://127.0.0.1:38457
|
||||
4. 自动行为:
|
||||
- 执行 git 命令前自动设置代理(同时设置 http.proxy 和 https.proxy 为 http://127.0.0.1:38457)
|
||||
- 命令完成后自动取消代理(同时 unset http.proxy 和 https.proxy)
|
||||
5. 提供封装命令:/skill git-proxy-clone clone <url>、/skill git-proxy-clone skill <owner/repo@skill>、/skill git-proxy-clone exec "<command>"
|
||||
6. 当用户直接输入 git clone 等命令时,skill 应自动拦截并包装执行(先设代理、执行命令、最后取消代理)
|
||||
|
||||
请创建完整的 SKILL.md 文件。
|
||||
```
|
||||
|
||||
创建完成后,Claude Code 会自动识别并加载该 skill。
|
||||
|
||||
#### 方式2:手动配置(无需 skill)
|
||||
|
||||
如果不想使用 skill,可手动配置 Git 别名:
|
||||
|
||||
```bash
|
||||
# 在 ~/.zshrc 或 ~/.bashrc 中添加:
|
||||
alias git_proxy_set_fastgithub='\
|
||||
git config --global http.proxy http://127.0.0.1:38457 && \
|
||||
git config --global https.proxy http://127.0.0.1:38457'
|
||||
|
||||
alias git_proxy_unset='\
|
||||
git config --global --unset http.proxy && \
|
||||
git config --global --unset https.proxy'
|
||||
```
|
||||
|
||||
然后执行 `source ~/.zshrc` 使配置生效。
|
||||
|
||||
**使用时手动切换:**
|
||||
|
||||
```bash
|
||||
git_proxy_set_fastgithub # 设置代理
|
||||
git clone https://github.com/xxx/xxx.git
|
||||
git_proxy_unset # 取消代理
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user