Use when working with private Swift Package Manager dependencies from github.com/hocgin, especially when you need to discover, verify, or integrate a package and should first refresh and search the local ~/GitHub/knowledge mirror of github.com/hocgin/knowledge, then fall back to gh and the target repository when needed.
Ships in game-dev-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
在处理 github.com/hocgin 旗下的私有 Swift 依赖时,先把自己当成“带知识库检索能力的 SPM 集成助手”,而不是通用依赖搜索器。
以下场景应使用本 skill:
github.com/hocgin/* 的私有 Swift Packagegithub.com/hocgin/... 的仓库地址、包名、模块名或 import 名称Package.swift、Package.resolved、.pbxproj、README 中看到了 hocgin 私有仓库以下场景不要优先使用本 skill:
github.com/hocginhocgin 私有仓库无关~/GitHub/knowledge/,必须先尝试更新后再使用~/GitHub/knowledge/,再回退到 gh 检索 github.com/hocgin/knowledgemain / master先从用户输入或当前项目中提取这些线索:
import Xxx如果项目已存在依赖配置,优先检查:
Package.swiftPackage.resolved*.xcodeproj/project.pbxprojhocgin/knowledge先看本地是否已有 ~/GitHub/knowledge/,如果有,先尝试更新;更新成功或失败都要根据实际结果继续,不要因为更新失败就直接放弃本地副本。
推荐顺序:
~/GitHub/knowledge/ 时,先尝试更新gh 检索远端 hocgin/knowledge优先检索的内容:
.package(、product(name:、Package.swift可用命令示例:
# 中文注释:如果本地知识库存在,先尝试更新
git -C ~/GitHub/knowledge pull --ff-only
# 中文注释:本地优先检索知识库
rg -n "SomePackage|SomeModule|github.com/hocgin/some-repo|\\.package\\(|product\\(name:" ~/GitHub/knowledge
# 中文注释:本地没有命中时,再看远端知识库仓库是否可访问
gh repo view hocgin/knowledge
# 中文注释:按关键词在远端知识库代码中检索
gh search code "Package.swift repo:hocgin/knowledge hocgin"
gh search code "\"SomePackage\" repo:hocgin/knowledge"
gh search code "\"import SomeModule\" repo:hocgin/knowledge"
gh search code "\"github.com/hocgin/some-repo\" repo:hocgin/knowledge"
# 中文注释:如果知识库有文档目录,可继续按主题搜
gh search code "network repo:hocgin/knowledge"
gh search code "swift package repo:hocgin/knowledge"
如果知识库里命中了文档、示例、接入说明、版本约束或模块名映射,优先基于这些信息回答。
回答时要明确说明信息来源:
~/GitHub/knowledge/github.com/hocgin/knowledge只有当知识库缺少足够信息时,才查看目标仓库。
重点检查:
Package.swift可用命令示例:
# 中文注释:查看仓库基础信息
gh repo view hocgin/some-repo
# 中文注释:查看标签,优先选稳定版本
gh release list -R hocgin/some-repo
gh api repos/hocgin/some-repo/tags
# 中文注释:读取 Package.swift 内容确认可作为 SPM 使用
gh api repos/hocgin/some-repo/contents/Package.swift
如果需要进一步确认文件内容,可以在有权限时用 gh repo clone 到本地再检查。
至少确认以下几点:
默认优先给 SPM 方案,并明确版本。
示例:
dependencies: [
// 中文注释:优先使用明确 tag,避免直接跟踪不稳定分支
.package(url: "[email protected]:hocgin/some-repo.git", exact: "1.2.3")
]
如果还需要声明 product,补充:
.target(
name: "App",
dependencies: [
// 中文注释:这里要写 product 名,而不是仓库名
.product(name: "SomeProduct", package: "some-repo")
]
)
按这个顺序组织答案:
hocgin/knowledge 的命中结果Package.swift 或 Xcode如果当前目录是 Swift 项目,可优先使用这些命令:
# 中文注释:解析依赖,确认私有仓库能被拉取
swift package resolve
# 中文注释:查看最终依赖图,确认目标包已进入图中
swift package show-dependencies
# 中文注释:必要时查看 manifest 解析结果
swift package dump-package
如果是 Xcode 工程,则说明需要在 Xcode 中重新 resolve package,或执行对应构建命令验证。
gh 未登录或无权限先检查:
gh auth status
然后明确告诉用户:当前无法访问 hocgin/knowledge 或目标私有仓库,因此不能把猜测当成结论。
先说明更新失败,再决定是否继续使用当前本地副本:
gh 检索远端知识库可以继续:
gh 检索远端 hocgin/knowledgePackage.swift / Package.resolved 推断真实包名和 product 名但要明确说明“这是基于仓库结构推断,不是来自最新知识库文档”。
不要擅自丢弃本地改动。
可以这样处理:
git -C ~/GitHub/knowledge status --shortpull --ff-onlygh 检索远端明确指出:
Package.swift不要把这类仓库当成可直接 SPM 集成的候选项。
~/GitHub/knowledge/ 与 hocgin/knowledge 直接开始猜What SKILL.md sets; muted values are Claude Code's defaults
/hocgin-game-dev-skills:swift-private-bundlefrom game-dev-skills
Claude Code refuses to install this plugin
Claude Code refuses to add this marketplace: The name 'agent-skills' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the 'anthropics' organization.
Claude Code refuses to add this marketplace: The name 'agent-skills' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the 'anthropics' organization.
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
38 skills in this plugin
/appicon-design从一张或多张 App Icon 案例图中提取设计语言(配色角色、造型语言、材质、光影、质感、细节密度),剥离参考图自身的主体 / 角色 / 布局等 IP,保存为可命名、可复用的「风格主题模板」(设计 DNA + 多版式变体 + 参考 IP 排除),再根据项目名称、类型与核心功能,按指定风格或自动匹配风格,生成原创、不撞脸参考图、符合 iOS App Icon 规范、可直接用于 GPT-Image / Midjourney / SD 等模型的完整提示词(主体描述 + 风格约束 + 版式 + 原创性约束 + 负面约束)。当用户需要设计 App 图标、iOS/macOS 应用图标、备用图标(Alternate App Icon),或想把案例图片沉淀为新的 App Icon 风格时使用。/apple-itunes-apiApple iTunes Search API 完整参考指南。用于搜索 iTunes/Apple Music 目录中的音乐、电影、播客、应用、图书等内容。
触发条件: 用户提及 "iTunes API"、"Apple Music API"、"搜索歌曲"、"查找专辑"、"获取歌词"、
"搜索 App"、"查找播客"、"iTunes 搜索"、"获取封面"、"album art"、"track lookup" 等。
涵盖 Search API、Lookup API、Genre API、RSS Feed Generator 四大端点。
/appstore-product-descriptionOther plugins' skills for the same job