一键导入
git-clone-troubleshooting
解决git克隆过程中的常见问题,包括网络超时、目录非空、RPC失败、curl错误等。当用户遇到git clone失败、网络连接问题、目录冲突时使用。触发词:git clone失败、网络超时、RPC failed、curl error、目录非空、clone问题。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
解决git克隆过程中的常见问题,包括网络超时、目录非空、RPC失败、curl错误等。当用户遇到git clone失败、网络连接问题、目录冲突时使用。触发词:git clone失败、网络超时、RPC failed、curl error、目录非空、clone问题。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Navi Agent 设计参考库。当用户询问 navi agent 的架构设计、功能方案、技术选型、或某个具体实现应该如何做时,自动参考 Claude Code (cc_src/)、KIMI-CLI (kimi-cli/)、Hermes (hermes-agent/) 三个成熟项目的源码来提供建议。触发场景包括:讨论 agent loop 设计、工具系统、审批机制、会话管理、UI/CLI 交互、技能系统、插件机制、subagent、MCP 集成等任何 navi 的功能设计问题。也适用于:添加新工具、修改工具行为、集成外部 API。也适用于:多智能体系统设计、Worker 模式、sub_agent 委派模式、Interactive SubAgent 模式、Human-in-the-Loop 模式。也适用于:LangGraph 功能评估、工具调用兼容性分析、模型适配方案选型。
CLI agent 工具输出架构设计与调试。当排查工具输出重复、输出丢失、输出乱序、实时流与结果渲染冲突、输出截断策略等问题时使用。也适用于为新的 CLI agent 工具设计输出通道。触发词:工具输出重复、output twice、双份输出、流式输出、tool result rendering、输出截断、truncat。
Navi Agent 工具开发指南。当需要为 Navi 添加新工具(tool)、修改已有工具、或理解工具注册机制时使用。触发场景:用户说"写一个 XX 工具"、"添加工具"、"tool 怎么写"、"注册工具"、涉及 tool.py 或 runtime.py 中工具注册部分的修改。也适用于:集成外部工具协议(MCP 等)、添加工具子系统、批量注册动态发现的工具。也适用于:添加或修改斜杠命令(/xxx)、斜杠命令子命令。
演示文稿创建、编辑和分析。当用户需要处理 PowerPoint 演示文稿(.pptx 文件)时使用,包括创建新演示文稿、修改内容、处理布局、添加批注或演讲者备注等。也适用于将 guizang-ppt HTML 转换为 PPTX。也适用于基于 Word/文本文档生成学术汇报 PPT(docx→PPT),包含中文学术 PPT 配色方案、卡片布局、条形图、表格等常用模式。触发词:做PPT、做个PPT、演示文稿、slides、presentation、汇报PPT。
Discover agent-native CLIs for professional software. Access the live catalog to find tools for creative workflows, productivity, AI, and more.
深入分析复杂项目的架构设计、核心机制和实现原理。当用户询问"为什么 X 能做到 Y"、"系统是怎么工作的"、"分析一下这个项目的架构"时使用。也适用于主动分析开源项目的技术栈、模块划分、数据流、配置体系。覆盖 LangChain/LangGraph Agent、前后端分离 Web 应用、CLI 工具等常见项目类型。也适用于:代码缺陷审查(安全漏洞、架构问题、设计反模式)、两个或多个项目的全面对比分析。触发词:"缺陷"、"有什么问题"、"对比"、"区别"、"哪个更好"、"review"、"审计"。
| name | git-clone-troubleshooting |
| description | 解决git克隆过程中的常见问题,包括网络超时、目录非空、RPC失败、curl错误等。当用户遇到git clone失败、网络连接问题、目录冲突时使用。触发词:git clone失败、网络超时、RPC failed、curl error、目录非空、clone问题。 |
# 列出目录内容(包括隐藏文件)
ls -la <target-directory>
# 检查是否存在.git目录
ls -la <target-directory>/.git
如果目标目录已存在且非空:
rm -rf <target-directory>
git clone <repo-url> <target-directory>
git clone <repo-url> <target-directory>/<repo-name>
rm -rf <target-directory>/.git
git clone <repo-url> <target-directory>
错误1:RPC failed; curl 56 schannel: server closed abruptly
# 增加git缓冲区大小
git config --global http.postBuffer 524288000
# 使用浅克隆减少数据传输
git clone --depth 1 <repo-url> <target-directory>
# 设置更长的超时时间(全局配置)
git config --global http.lowSpeedLimit 1000
git config --global http.lowSpeedTime 600
# 或者使用命令行参数(推荐,不影响全局配置)
git clone --depth 1 --config http.lowSpeedLimit=1000 --config http.lowSpeedTime=60 <repo-url> <target-directory>
错误2:fetch-pack: unexpected disconnect while reading sideband packet
# 尝试不同的协议
git clone git://github.com/user/repo.git # 使用git协议 instead of https
# 或者使用SSH(如果已配置)
git clone git@github.com:user/repo.git
错误3:Connection timed out
# 检查网络连接
ping github.com
curl -I https://github.com
# 使用代理(如果需要)
git config --global http.proxy http://proxy:port
git config --global https.proxy http://proxy:port
如果克隆中断,检查是否有部分下载的文件:
# 检查目标目录是否有.git目录(部分克隆)
ls -la <target-directory>/.git
# 检查ZIP下载文件大小(如果使用curl下载)
ls -lh <file>.zip
# 删除不完整的.git目录后重试
rm -rf <target-directory>/.git
git clone <repo-url> <target-directory>
# 启用详细输出
GIT_TRACE=1 git clone <repo-url> <target-directory>
# 检查git配置
git config --list --global
# 临时禁用SSL验证(不推荐,仅用于调试)
git config --global http.sslVerify false
git fsck检查仓库完整性# 检查目录内容
ls -la existing-dir/
# 如果只有无关文件,删除后克隆
rm -rf existing-dir/
git clone <repo-url> existing-dir/
# 如果需要保留文件,克隆到子目录
git clone <repo-url> existing-dir/new-project/
# 使用浅克隆
git clone --depth 1 <repo-url> <target-directory>
# 如果失败,增加缓冲区后重试
git config --global http.postBuffer 1048576000
git clone --depth 1 <repo-url> <target-directory>
# 部分克隆(Git 2.22+)
git clone --filter=blob:none <repo-url> <target-directory>
# 稀疏检出
git clone --sparse <repo-url> <target-directory>
cd <target-directory>
git sparse-checkout init --cone
git sparse-checkout set <subdirectory>
# 检查仓库完整性
cd <target-directory>
git fsck --full
# 如果objects损坏,重新克隆
cd ..
rm -rf <target-directory>
git clone <repo-url> <target-directory>
当用户要求"先找到路径,再确认"时:
list_dir检查目标路径