From hito-skills
本地 GitHub 仓库知识库,同时支持 HuggingFace、ModelScope 搜索查询。在用户提到 github/repo/仓库/模型/pretrained/权重,或搜索 huggingface/modelscope 上的模型时触发。优先在本地目录查找已有仓库,支持:gh 搜索 GitHub issues/PRs/repos、HuggingFace API 搜索模型、ModelScope API 搜索模型,curl 回退。
How this skill is triggered — by the user, by Claude, or both
Slash command
/hito-skills:gitkbThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
维护 `E:\workspace\github` 目录下的仓库清单,同时提供 HuggingFace 和 ModelScope 的模型搜索能力。
维护 E:\workspace\github 目录下的仓库清单,同时提供 HuggingFace 和 ModelScope 的模型搜索能力。
CLAUDE.md 文件见 @E:\workspace\github\CLAUDE.md
用户提到以下关键词时触发:
用户提到某个仓库时,先检查本地 E:\workspace\github\ 中是否已存在:
$repoDir = "E:\workspace\github"
Get-ChildItem $repoDir -Directory | Select-Object Name
如果本地存在,直接在该目录下工作,分析代码回答问题。
当用户说"下载一个 repo"时:
cd E:\workspace\github
git clone <repo-url>
下载完后运行 scripts\update_claude.ps1 更新 CLAUDE.md。
每次添加/删除仓库后,运行 scripts\update_claude.ps1 重新扫描目录并更新摘要。
必须:更新脚本运行后,检查每个仓库的描述是否为中文。如果描述是英文(来自 GitHub API 或英文 README),需要将其翻译为简洁的一句话中文摘要。确保描述不超过 120 字,准确概括仓库用途。
搜索 HuggingFace 上的模型:
# 通过 API 搜索模型
Invoke-RestMethod "https://huggingface.co/api/models?search=<query>&sort=downloads&direction=-1&limit=10"
# 通过 API 搜索数据集
Invoke-RestMethod "https://huggingface.co/api/datasets?search=<query>&sort=downloads&direction=-1&limit=10"
# 获取模型详细信息
Invoke-RestMethod "https://huggingface.co/api/models/<org>/<model-name>"
# 列出模型文件
Invoke-RestMethod "https://huggingface.co/api/models/<org>/<model-name>" | % { $_.siblings.rfilename }
# 通过 Web 页面查看更多信息
curl.exe -s "https://huggingface.co/<org>/<model-name>/raw/main/README.md"
处理 HuggingFace 结果时,关注:
modelId - 完整模型名称(org/name)pipeline_tag - 任务类型(text-generation, any-to-any, etc.)downloads - 下载量likes - 收藏数config.model_type - 架构类型tags - 标签信息(custom_code 表示需要 trust_remote_code)搜索 ModelScope(魔搭)上的模型:
# 搜索模型
Invoke-RestMethod "https://www.modelscope.cn/api/v1/dso/list?name=<query>&PageSize=10"
# 或通过 modelscope SDK
pip install modelscope
from modelscope.hub.sdk import Hub
优先用 gh 命令搜索 GitHub:
# 搜索仓库
gh search repos "<query>"
# 搜索 issue / PR
gh search issues "<query>" --repo <owner>/<repo>
gh search prs "<query>" --repo <owner>/<repo>
# 查看 issue / PR 详情
gh issue view <number> -R <owner>/<repo>
gh pr view <number> -R <owner>/<repo>
# 查看仓库信息
gh repo view <owner>/<repo>
如果 gh 命令不可用或未登录,用 curl 代替:
# 搜索仓库 (GitHub API)
curl.exe -s "https://api.github.com/search/repositories?q=<query>"
# 搜索 issue
curl.exe -s "https://api.github.com/search/issues?q=repo:<owner>/<repo>+<query>"
# 查看仓库详情
curl.exe -s "https://api.github.com/repos/<owner>/<repo>"
当用户提到的仓库本地不存在时:
gh search repos 或 gh api扫描 E:\workspace\github 目录,为每个仓库生成一句话摘要,写入 CLAUDE.md。
描述提取优先级:中文 README → GitHub API 描述(需转为中文) → 英文 README(需转为中文) → 最近 commit 信息。
最终所有描述必须为中文。
gh 命令,没有则用 Invoke-RestMethod (PowerShell) 或 curl.exeCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub hito0512/claude-skills --plugin hito-skills