okf-kglisted
Install: claude install-skill anton-winter-arch/dotagents
# okf-kg
Turn an OKF markdown vault into a queryable SQLite knowledge graph, then
answer from it. One engine, no dependencies beyond Python 3.10+ stdlib:
EXECUTE `scripts/okf_kg.py` via Bash for every operation - never reimplement
its parsing or query logic inline.
An OKF vault is a directory of markdown concept notes (usually under
`knowledge-base/`, plus an `index.md` hub and a `log.md`) with YAML
frontmatter (`type`, `title`, `description`, `tags`, `timestamp`, `source`)
and standard markdown links between notes. The vault path is always an
argument - this skill works on any OKF vault on disk.
## Workflow
1. **Ingest first, always.** Cheap and idempotent - safe to run at the start
of every session that touches the vault:
```bash
python3 <skill-dir>/scripts/okf_kg.py ingest <vault-dir>
```
Reports added / updated / removed / unchanged. A second run on an
unchanged vault reports zero changes. Deleted files go `cold` (kept with
provenance), never deleted. The DB lands at `<vault>/.okf-kg.db` -
gitignore it in the target vault; it rebuilds from markdown at any time.
2. **Query to locate, then read the source files.** Concept notes are a few
KB - the graph is for *finding* the right two or three notes, not a
substitute for reading them:
```bash
python3 <skill-dir>/scripts/okf_kg.py query <vault-dir> '"silver layer"'
python3 <skill-dir>/scripts/okf_kg.py query <vault-dir> 'governance AND ownership'
```
The query string is FTS