‹ 首页

pin-setup

@toongri · 收录于 昨天 · 上游提交 昨天

Use when initializing the pins knowledge graph for the first time in a project. Guides the user through creating pins.yaml (the storage manifest). Triggers on "setup pins", "initialize pins", "create pins.yaml", "first-run pins".

适合你,如果需要在项目中首次启用 pins 知识图谱

/ 通过 npx 安装 校验哈希
npx oh-my-skill add toongri/oh-my-toong-playground/pin-setup
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- toongri/oh-my-toong-playground/pin-setup
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify toongri/oh-my-toong-playground/pin-setup
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
25GitHub stars
~776最小装载
~776含声明引用
~3.3K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 731a80a · 表述以原文为准
它做什么

Claude 会引导你回答三个问题来创建 pins.yaml 文件:存储位置、数据范围(私有或共享)、是否用 Git 管理。然后写入配置文件并确认路径。如果有旧版 pin 文件,还会执行迁移。

什么时候触发

当你首次在项目中使用 pins 知识图谱,说出“setup pins”、“initialize pins”、“create pins.yaml”或“first-run pins”等关键词时触发。

装好后可以这样说
Claude 会提问并创建配置文件。
Claude 会引导你完成设置。
技能原文 SKILL.md作者撰写 · MIT · 731a80a

pin-setup

First-run interview to create ~/.pins/{name}/pins.yaml, the storage manifest for the pins knowledge graph.

What is pins.yaml

pins.yaml is the manifest that tells the pins API where to read and write pin files. It declares the storage location and scope for this project's knowledge graph.

resolveManifest() (from lib/pins/manifest.ts) reads pins.yaml and returns the parsed manifest. Callers then extract manifest.location and pass it explicitly to each API (record, query, audit, etc.). The manifest itself is advisory metadata — individual API calls always receive location as an explicit argument, not by re-reading the file.

Interview

Walk the user through three decisions:

1. Storage location

The manifest is always written to ~/.pins/{name}/pins.yaml, where {name} is derived from the project name of the cwd (deriveProjectName(cwd)). This path is fixed.

Ask: "Where should pin data files live?"

Common choices:

  • Co-located with the manifest (default) — ~/.pins/{name}/ — no --location needed
  • A custom absolute path — pass via --location; useful for monorepos or multi-project setups

Confirm whether the directory should be created if it does not exist (it will be, automatically, on the first record() call).

2. Scope

Ask: "What is the scope of this pins manifest — personal (private) or project-wide (shared)?"

  • private — pins default to sensitivity: private; not intended for team consumption
  • shared — pins default to sensitivity: shared; meant to be read by teammates

The scope sets the manifest-level default; individual pins can override sensitivity in their frontmatter.

3. Git management

Ask: "Is this pins corpus managed under git?"

This is independent of storage location: a ~/.omt/... directory can be a git repo; a .pins/ directory inside a project repo can be gitignored. The answer reflects intent, not directory placement. When git: true, the SessionStart hook and the pin-record/pin-wrap-up skills will prompt the AI to commit pin file changes after recording.

Record the answer as git: true or git: false.

Output

Once all three questions are answered, write pins.yaml to ~/.pins/{name}/pins.yaml:

# pins.yaml — knowledge graph storage manifest
location: <resolved absolute path>
scope: <private|shared>
git: <true|false>

Confirm the path is correct and the user understands that all pins API calls will resolve against this manifest.

Migration

If the project has legacy pin files (frontmatter with slug instead of id, no type field), run migration after setup:

bun "${CLAUDE_SKILL_DIR}/scripts/setup.ts" --scope "$SCOPE" [--location "$LOC"] [--git true|false]

--location is optional. When omitted, pin data is co-located with the manifest at ~/.pins/{name}/. The script writes pins.yaml to ~/.pins/{name}/pins.yaml and then runs migrate() against the just-written location. migrate() is idempotent — re-running it is safe. Each legacy file gets a .bak sibling before conversion.

按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。