skills/pin-setup/SKILL.md
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".
npx skillsauth add toongri/oh-my-toong-playground pin-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
First-run interview to create pins.yaml, the storage manifest for the pins knowledge graph.
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.
Walk the user through three decisions:
Ask: "Where should pin files live?"
Common choices:
~/.omt/<project>/pins/ — stored in the user's home directory, outside any repo.pins/ inside the repo — stored alongside the project sourceConfirm whether the directory should be created if it does not exist (it will be, automatically, on the first record() call).
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 consumptionshared — pins default to sensitivity: shared; meant to be read by teammatesThe scope sets the manifest-level default; individual pins can override sensitivity in their frontmatter.
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.
Once all three questions are answered, write pins.yaml at the project root (or the location the user specifies):
# 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.
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" --location "$LOC" --scope "$SCOPE" [--git true|false]
The script writes pins.yaml into the current working directory 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.
tools
Use at the end of a work session to review the WHOLE session and record entities worth pinning. This is the manual, deliberate complete-sweep review — NOT an automated nudge. Triggers on "wrap up", "wrap-up", "session wrap", "end of session", "what should I pin".
testing
Use when you need to record a single pin entity to the knowledge graph. Invokes lib/pins record() to validate and write a canonical .md file. Triggers on "record pin", "pin this", "save this as a pin".
databases
Use when looking up pins by type, tags, or source. Drives lib/pins/query.ts to retrieve matching pin entries from the knowledge graph. Supersedes the legacy manual ls+frontmatter procedure.
testing
Use when checking pin graph health. Runs lib/pins/audit to detect dangling relations, duplicates, invalid entities, stale entries, and orphans, then presents a ranked report.