Skip to main content
ClaudeWave
Skill4k repo starsupdated 3d ago

open-knowledge-discovery

Read when the user asks what OpenKnowledge is, wants to install it on a repository, wants to open or preview a single markdown file that is not part of an OpenKnowledge project, wants to share an OpenKnowledge project with collaborators, asks whether OpenKnowledge supports a particular capability, or asks how `ok init` / `ok cowork` / OK Desktop set up a project. Do NOT load to perform OpenKnowledge reads/writes — the runtime guidance for editing markdown inside an initialized OK project ships as a separate project-local skill installed into each detected agent's skills dir (for example `.claude/skills/open-knowledge/`) whenever `ok init` runs.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/inkeep/open-knowledge /tmp/open-knowledge-discovery && cp -r /tmp/open-knowledge-discovery/packages/server/assets/skills/discovery ~/.claude/skills/open-knowledge-discovery
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# OpenKnowledge — what it is and how to install it

OpenKnowledge (OK) is a markdown-CRDT collaboration platform. It turns a
directory of `.md` / `.mdx` files into a live, multi-writer knowledge base:
agents and humans edit the same documents in real time, every change is
attributed, and a browser preview renders edits as they land.

This skill covers **discovery, install, and opening OpenKnowledge files** —
including single files that are not part of a project (see *Opening a file
outside a project* below). It does **not** carry the in-project read/write
runtime contract (the STOP rules for native file tools, the grounding and
linking rules, the MCP routing table) — that ships separately as the
project-local skill installed by `ok init` (see *Working inside a project*
below).

## Install OpenKnowledge on a repository

Run `ok init` from the repository root:

```bash
npx @inkeep/open-knowledge init
# or, after a global install:
npm install -g @inkeep/open-knowledge
ok init
```

`ok init` is the one setup verb. It:

- scaffolds a `.ok/` directory (project config — `content.dir` defaults to `.`);
- wires the OpenKnowledge MCP server into the coding agents it detects on this
  machine — skip with `--no-mcp`;
- installs the **project-local runtime skill** into each detected agent's
  skills dir (`<agent-dir>/skills/open-knowledge/`) so agents working in this
  repo get the full read/write contract. OK only writes into agent
  directories that already exist — it never creates one, so nothing appears
  for agents you don't use, and `ok init` says so when it finds none;
- ensures the project has a `.git/`.

Re-run `ok init` any time to refresh wiring and skills to the installed CLI
version.

## Share an OpenKnowledge project with collaborators

An OK project travels with its repository. To share one:

1. Commit the `.ok/` directory and whichever project-local
   `<agent-dir>/skills/open-knowledge/` directories `ok init` created, along
   with your `.md` content.
2. Collaborators clone the repo and run `ok init` once — that registers the
   MCP server on their machine and refreshes the project skill.
3. Start the editor + preview with `ok start` (or open the project in OK
   Desktop).

Collaboration is real-time once two writers have the project open against the
same content directory.

## `ok cowork` — Claude Chat & Cowork

`ok init`'s editor wiring does not reach Claude Chat or Cowork — those read a
separate Skills list inside the Claude Desktop App. Run `ok cowork` to
build `openknowledge.skill` and open Claude Desktop so the user can upload it
(Customize → Skills → + → Create skill → Upload skill).

## OK Desktop

OK Desktop is the standalone macOS app (`@inkeep/open-knowledge-desktop`). It
bundles its own CLI, opens a project as an editor + preview window, and keeps
the project's MCP wiring and skills current on every launch. Download DMGs
from the releases page.

## Opening a file outside a project

OpenKnowledge can open a single markdown file that is **not** part of an OK
project — a loose `.md` / `.mdx`, **or a file that lives inside a regular
repo/folder which was never `ok init`'d**. It opens in a throwaway session (a
temp project in the OS temp dir — your repo is never touched, no `.ok/` is
written into it) with the same live preview you get inside a project.

**Never run `ok init` just to view or open a file.** `ok init` turns a repo
into a shared OpenKnowledge project; it is not a prerequisite for opening one
file. Opening a file needs no project, no `.ok/`, and no server already
running — each path below boots the session itself.

When asked to open or preview such a file, **decide by the viewing surface you
actually have** — check the tool, not the host name. Only open a browser when
you genuinely have one; never pop a browser tab on a host that has none.

- **You have an in-app / built-in browser** (Claude Code Desktop's Browser pane, Cursor, Codex, and similar) — this
  is the default: call the **`preview_url` MCP tool** with `file` set to the
  absolute path (it finds, or boots on demand, the session and returns a full
  `url`), then **immediately open that `url` in your in-app browser**. "Open it"
  means navigate your browser — don't just print the URL and stop. This is also
  the only way to view it in a browser when the OK Desktop app is installed
  (`ok open` prefers the Desktop app). Get the URL from `preview_url` only —
  never hunt for it via `ok ps` / `ok status` / `ok start` or a guessed
  port.
- **No in-app browser** (a pure-stdio CLI) — run
  `ok open /abs/path/to/file.md`: it opens the Desktop app when installed, else a
  browser, and boots the session itself. Don't force a browser tab the user
  didn't ask for; `ok open` is the right default here. If `ok` isn't on PATH,
  `npx @inkeep/open-knowledge open /abs/path/to/file.md` does the same.

If the OK MCP server isn't wired into this host there is no `preview_url` to
call — use the `ok open` path above. Don't reconstruct what `preview_url` does
by hand (spawning `ok mcp` yourself, scraping ports from `ok ps`).

Give an absolute path. `ok open` prints the absolute project root it resolved
for that path, and names the enclosing project too when the resolved root sits
inside another one. Read that line rather than assuming which project you got.

To name the project yourself, pass `--project <dir>`. It is honored wherever it
appears: `--project <dir>` or `--project=<dir>`, before or after the path, with
or without the `.md` extension. If it cannot be honored the command exits
non-zero and says why, so you never need a second command to find out where it
landed, and never need to stop a server to correct it.

Re-opening the same file lands on the same session. Never construct or guess the
URL — use the one `preview_url` returns.

## What else OK does

This skill does not enumerate OK's capabilities, and they change between releases. When asked whether OK supports something, read rather than guess:

- **Docs** — <htt
codebase-wikiSkill

How to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the surrounding codebase. Read when the project has a `wiki/` knowledge base with `architecture/`, `modules/`, `flows/`, `concepts/`, and `guides/` sections plus `wiki/OVERVIEW.md`, or when asked to generate or refresh a wiki of this codebase. Carries the per-folder rules and freshness + log discipline, summarizes the audience/depth knobs and source-reference convention, and bundles the full generate/refresh procedure in `references/`. Complements the platform `open-knowledge` skill; does not replace it.

personal-crmSkill

How to work in a Personal CRM project (the `entity-vault` starter pack, GBrain-compatible): a typed-entity vault of people, companies, meetings, and concepts, each a dossier with a rewritable summary plus an append-only timeline. Read when the project has these folders, OR when asked to capture notes about a person or company, log a meeting, prep for an upcoming meeting, or answer who someone is and what was last said. Carries the dossier convention and entity-extraction behaviors so that guidance does not live inside template bodies or folder descriptions. Complements the platform `open-knowledge` skill; does not replace it.

knowledge-baseSkill

How to work in a Knowledge Base project (the `knowledge-base` starter pack). Read when the project has the three-layer source-grounded layout — `external-sources/` → `research/` → `articles/` — or when asked how this project is organized. Carries the layer model, per-folder rules, status flows, and log discipline so this guidance does NOT live inside template bodies or log.md. The three procedures live elsewhere: ingest in the platform `open-knowledge` skill, research and consolidate as their own sibling skills in this pack. Complements the platform `open-knowledge` skill; does not replace it.

consolidate-notesSkill

Promote existing research into a stable-status canonical article under `articles/` in a Knowledge Base project (the `knowledge-base` starter pack). Read when a decision has actually been made and the team wants the source-of-truth written down, or when asked to consolidate, canonicalize, promote research, or supersede an older article. Carries the decision-confirmation gate, the `supersedes:` chain that keeps the evidence trail intact, and the canonical voice. Does not conduct new research — that is the sibling `research-with-sources` skill.

research-with-sourcesSkill

Investigate a topic against preserved sources and write a draft-status research article under `research/` in a Knowledge Base project (the `knowledge-base` starter pack). Read when asked to research a topic, compare options, synthesize sources, gather evidence, or extend an existing research doc. Carries the full procedure: scan existing coverage, agree a research rubric, capture every source verbatim before analyzing, write the article incrementally so a crash never loses work, cite every claim, and link it back into the graph. Does not promote findings to canonical knowledge — that is the sibling `consolidate-notes` skill, after a decision lands.

okf-knowledge-baseSkill

Open Knowledge Format (OKF) v0.2 guidance. Use when creating, reading, reviewing, or maintaining an OKF bundle; responding to OpenKnowledge `okf` plugin warnings; or choosing types, provenance, links, indexes, or logs.

note-takingSkill

How to work in a Plain Notes project (the `plain-notes` starter pack): a flat notes/ folder plus a daily/ journal. The 'I just want to write' layout. Read when the project has these folders, OR when asked to jot a note, capture a quick thought, or write today's journal entry. Carries the linking habit and daily-entry behavior so templates and folder descriptions stay minimal. Complements the platform `open-knowledge` skill; does not replace it.

software-lifecycleSkill

How to work in a Software Lifecycle project (the `software-lifecycle` starter pack): proposals → decisions → specs → postmortems, plus guides. Read when the project has these folders, or when asked how this project is organized. Carries the doc lifecycle, status flows, and per-folder agent behaviors so that guidance does not live inside template bodies or folder descriptions. The five workflows — frame a proposal, write a spec, record a decision, write a postmortem, review a design — each ship as their own sibling skill in this pack. Complements the platform `open-knowledge` skill; does not replace it.