From pkos
Internal skill — exports PKOS vault notes to ~/.claude/knowledge/ for cross-project availability. Triggered manually via /pkos bridge or after intel-sync.
npx claudepluginhub n0rvyn/indie-toolkit --plugin pkosThis skill uses the workspace's default tool permissions.
Bridges the PKOS Obsidian vault (`~/Obsidian/PKOS/`) with the dev-workflow knowledge base (`~/.claude/knowledge/`).
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Retrieves current documentation, API references, and code examples for libraries, frameworks, SDKs, CLIs, and services via Context7 CLI. Ideal for API syntax, configs, migrations, and setup queries.
Uses ctx7 CLI to fetch current library docs, manage AI coding skills (install/search/generate), and configure Context7 MCP for AI editors.
Bridges the PKOS Obsidian vault (~/Obsidian/PKOS/) with the dev-workflow knowledge base (~/.claude/knowledge/).
Forward (PKOS → KB): Exports qualifying PKOS notes as dev-workflow KB entries for /kb searches.
Reverse (KB → PKOS): Imports dev-workflow crystals and lessons into the PKOS vault for Bases querying and graph integration.
--dry-run: Show what would be exported without writing files--force: Re-export/re-import even if already tracked in state file--direction DIR: forward (PKOS→KB, default) | reverse (KB→PKOS) | bothRead ~/Obsidian/PKOS/.state/kb-bridge-exported.yaml:
exported:
- vault_path: "10-Knowledge/some-note.md"
kb_path: "api-usage/2026-04-07-some-note.md"
date: "2026-04-07"
reverse_imported:
- source_path: "docs/11-crystals/2026-03-21-pkos-crystal.md"
vault_path: "30-Projects/indie-toolkit/pkos-crystal.md"
date: "2026-04-08"
last_export: "2026-04-07T20:00:00"
last_reverse_import: "2026-04-08T10:00:00"
If file does not exist, initialize with empty list.
Skip this step if --direction is reverse.
Scan PKOS vault for notes that map to dev-workflow KB categories:
Glob(pattern="**/*.md", path="~/Obsidian/PKOS/10-Knowledge")
Glob(pattern="**/*.md", path="~/Obsidian/PKOS/50-References")
For each note, read its frontmatter tags: field. Apply tag-to-category mapping:
| PKOS Tag Contains | dev-workflow Category |
|---|---|
| architecture, system-design, patterns, design-patterns | architecture |
| api, sdk, library, framework, api-usage | api-usage |
| bug, error, crash, debugging | bug-postmortem |
| platform, ios, macos, swiftui, swift | platform-constraints |
| workflow, ci, deployment, tooling | workflow |
A note qualifies if ANY of its tags match a mapping. Use the first matching category.
Skip notes that:
--forcestatus: needs-reconciliation (unresolved conflicts)quality: 0 AND citations: 0 AND were created more than 30 days ago (low-value seeds)Skip this step if --direction is forward.
Crystals:
Glob(pattern="*-crystal.md", path="docs/11-crystals/")
Lessons (project-local):
Glob(pattern="*.md", path="docs/09-lessons-learned/")
Lessons (global KB):
Glob(pattern="**/*.md", path="~/.claude/knowledge/")
For each file, read frontmatter. Skip if:
--forcestatus: supersededApply category mapping (reverse of forward):
| dev-workflow Type | PKOS Destination | PKOS type |
|---|---|---|
| crystal | 30-Projects/{project-name}/ | reference |
| lesson (api-usage) | 50-References/ | reference |
| lesson (architecture) | 10-Knowledge/ | knowledge |
| lesson (bug-postmortem) | 10-Knowledge/ | knowledge |
| lesson (platform-constraints) | 10-Knowledge/ | knowledge |
| lesson (workflow) | 50-References/ | reference |
Skip this step if --direction is reverse.
For each qualifying note:
tags array (if present)[[wikilinks]] → plain text (just the link text)![[embeds]] → remove entirely> [!note] → standard blockquotes---
category: {mapped-category}
keywords: [{tags converted to keywords}]
date: {created date from PKOS frontmatter}
source_project: pkos
pkos_source: "{vault_path}"
---
{date}-{title-slug}.md (same slug rules as collect-lesson)If --dry-run: present list of notes that would be exported with their target paths, then stop.
For each note:
Grep(pattern="{title-slug}", path="~/.claude/knowledge/{category}/", output_mode="files_with_matches")~/.claude/knowledge/{category}/{date}-{slug}.mdSkip this step if --direction is forward.
For each qualifying dev-workflow artifact:
Convert to PKOS format with Obsidian Flavored Markdown:
---
type: {mapped PKOS type}
source: dev-workflow
created: {date from source frontmatter}
tags: [{keywords/tags from source, mapped to PKOS vault tags}]
quality: 2
citations: 0
related: []
status: seed
dev_workflow_source: "{source file path}"
aliases: []
---
# {title}
> [!insight] Origin
> Imported from dev-workflow {crystal|lesson}: `{source path}`
{body content with wikilinks added where related PKOS notes exist}
## Connections
{Scan PKOS vault for topic-overlapping notes, add as [[wikilinks]]}
Write to PKOS vault at the mapped destination path.
Dispatch pkos:ripple-compiler for each imported note (sequentially).
Write updated ~/Obsidian/PKOS/.state/kb-bridge-exported.yaml with all newly exported entries.
PKOS → KB Bridge Export
Scanned: {N} vault notes
Qualifying: {M} (matched category mapping)
Exported: {K} new entries
Skipped: {S} (already exported: {s1}, low-value: {s2}, conflicted: {s3})
Categories: architecture={n1}, api-usage={n2}, bug-postmortem={n3}, ...
KB → PKOS Reverse Import
Scanned: {N} dev-workflow artifacts
Imported: {K} notes
Skipped: {S} (already imported: {s1}, superseded: {s2})
Destinations: 10-Knowledge={n1}, 50-References={n2}, 30-Projects={n3}