Skip to content

Commit 9d1db0e

Browse files
committed
docs(skill): tighten references, fix marketplace spec, add per-CLI install
Three rounds of cleanup driven by review feedback: 1. **`.openkb/` internal state hidden from references** `wiki-schema.md` previously detailed `config.yaml`, `hashes.json`, and `pageindex.db` schemas in the directory tree — inviting agents to bypass the public `openkb status` / `openkb list` interface and couple to internal storage that may change. Replaced with a single line: "Internal openkb state lives at `<kb-root>/.openkb/`. **Do not read these directly** — use `openkb status` / `openkb list`." 2. **References trimmed (~33% smaller, more focused)** - `commands.md` 3.1KB → 2.2KB: dropped verbose example outputs (full multi-line `openkb list`, `openkb status`, `openkb query` captures) in favor of minimal shape examples. Merged the "NOT typically needed" + "Write commands — DO NOT run" sections so the agent has one clear safety list. - `wiki-schema.md` 5.7KB → 3.7KB: dropped the `.openkb/` subtree and the full `hashes.json` schema (internal). Trimmed long directory tree to category lines only. Kept the frontmatter YAML examples since those ARE the contract. 3. **`marketplace.json` polished per Claude Code spec** - Renamed top-level `name: "openkb"` → `name: "openkb-marketplace"` so users type `/plugin install openkb@openkb-marketplace` instead of the awkward `openkb@openkb`. Mirrors Anthropic's pattern (marketplace `anthropic-agent-skills`, plugin `document-skills`). - Swapped `owner.url` for `owner.email` (the idiomatic field). - Added `version`, `author`, `homepage`, `repository`, `license`, `keywords` on the plugin entry. None required by spec but all low-effort polish that helps discovery. 4. **README install section now per-CLI** Three separate snippets: - Claude Code: `/plugin marketplace add VectifyAI/OpenKB` then `/plugin install openkb@openkb-marketplace`. - Gemini CLI: `gemini skills install <repo> --path skills/openkb` — native installer reads our `skills/` tree directly. - Codex CLI: manual `git clone` + symlink into `~/.agents/skills/`. Codex has no marketplace mechanism today; `.agents/skills/` is its discovery path. Once a Codex marketplace ships, the same `marketplace.json` will likely work.
1 parent 9fe94e3 commit 9d1db0e

4 files changed

Lines changed: 132 additions & 233 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "openkb",
2+
"name": "openkb-marketplace",
33
"owner": {
44
"name": "VectifyAI",
5-
"url": "https://github.com/VectifyAI/OpenKB"
5+
"email": "team@vectify.ai"
66
},
77
"metadata": {
88
"description": "Skills for navigating an OpenKB-compiled knowledge base from agent CLIs (Claude Code, Codex, Gemini CLI).",
@@ -14,6 +14,15 @@
1414
"description": "Navigate an OpenKB-compiled wiki: discover documents and concepts via openkb CLI commands, read concept and summary pages directly, and follow wikilinks across the knowledge graph.",
1515
"source": "./",
1616
"strict": false,
17+
"version": "0.1.0",
18+
"author": {
19+
"name": "VectifyAI",
20+
"email": "team@vectify.ai"
21+
},
22+
"homepage": "https://github.com/VectifyAI/OpenKB",
23+
"repository": "https://github.com/VectifyAI/OpenKB",
24+
"license": "Apache-2.0",
25+
"keywords": ["knowledge-base", "wiki", "openkb", "rag", "agent-skill"],
1726
"skills": [
1827
"./skills/openkb"
1928
]

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,30 @@ OpenKB's wiki is a directory of Markdown files with `[[wikilinks]]`. Obsidian re
240240

241241
OpenKB ships a [SKILL.md](https://agentskills.io/) so any agent CLI can read your compiled wiki — no extra runtime, no MCP setup, just install the skill once.
242242

243-
```bash
244-
# Claude Code
243+
**Claude Code** (via the plugin marketplace):
244+
245+
```
245246
/plugin marketplace add VectifyAI/OpenKB
246-
/plugin install openkb@openkb
247+
/plugin install openkb@openkb-marketplace
248+
```
249+
250+
**Gemini CLI** (native skills installer):
247251
248-
# Cross-tool (works for Codex / Cursor / Cline / Gemini CLI too)
249-
npx skills@latest add VectifyAI/OpenKB
252+
```bash
253+
gemini skills install https://github.com/VectifyAI/OpenKB.git --path skills/openkb --consent
254+
```
255+
256+
**OpenAI Codex CLI** (no marketplace yet — manual install):
257+
258+
```bash
259+
git clone https://github.com/VectifyAI/OpenKB.git ~/openkb-src
260+
mkdir -p ~/.agents/skills
261+
ln -s ~/openkb-src/skills/openkb ~/.agents/skills/openkb
250262
```
251263

252-
After install, when the agent's working directory contains a `.openkb/` folder and `wiki/` tree, the skill activates automatically — the agent will use `openkb list`, `openkb status`, and `openkb query` for catalog and synthesis, and read concept/summary pages directly from `wiki/` for raw content.
264+
(Codex discovers skills under `.agents/skills/` walking up from cwd, or `~/.agents/skills/` for user-scope.)
253265

254-
The skill is read-only: it won't run `openkb add`, `remove`, or `lint --fix` without you asking. See [`skills/openkb/SKILL.md`](skills/openkb/SKILL.md) for the full instruction set the agent receives.
266+
After install, when the user asks about content in their OpenKB knowledge base, the skill activates and points the agent at `openkb status` to discover the KB, `openkb list` for the catalog, and direct Markdown reads for concept/summary content. The skill is read-only: it won't run `openkb add`, `remove`, or `lint --fix` without you asking. See [`skills/openkb/SKILL.md`](skills/openkb/SKILL.md) for the full instruction set the agent receives.
255267

256268
# 🧭 Learn More
257269

Lines changed: 44 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,69 @@
1-
# OpenKB CLI command reference
1+
# OpenKB CLI reference
22

3-
Only the commands relevant to **reading** an OpenKB knowledge base
4-
are listed here. Write commands (`add`, `remove`, `lint --fix`, etc.)
5-
should be suggested to the user, not run autonomously by the agent.
6-
7-
## `openkb list`
8-
9-
List ingested documents and their compiled concepts.
10-
11-
```
12-
$ openkb list
13-
Documents (2):
14-
Name Type Pages
15-
---------------------------------------- ------------ --------
16-
paper.pdf pageindex 42
17-
notes.md short
18-
19-
Summaries (2):
20-
- paper
21-
- notes
22-
23-
Concepts (5):
24-
- attention
25-
- transformer
26-
- positional-encoding
27-
- self-attention
28-
- multi-head-attention
29-
```
30-
31-
- `Type` is the *display* form of the registry's `type` field, mapped
32-
through `_TYPE_DISPLAY_MAP`:
33-
- PageIndex-indexed long PDFs (registry `type: long_pdf`) display
34-
as `pageindex`.
35-
- Every other format (`md`, `docx`, `pdf` short, `txt`, …) displays
36-
as `short`.
37-
The raw registry value lives in `.openkb/hashes.json`; the displayed
38-
value is what surfaces in `openkb list` and in `index.md` type tags
39-
(`(short)` / `(pageindex)`).
40-
- `Pages` only populated for long PDFs.
41-
- The Summaries and Concepts lists are simply directory listings of
42-
`wiki/summaries/` and `wiki/concepts/` minus their `.md` suffix.
3+
Read commands the skill calls on. Write commands are listed at the
4+
bottom — the agent MUST NOT run them autonomously.
435

446
## `openkb status`
457

46-
Knowledge base overview. **Always run this first** when working with
47-
an OpenKB KB — its first line tells you where the KB lives, which is
48-
what you need for every `Read` / `Grep` / `jq` call afterwards.
8+
KB overview. First line carries the absolute path of the active KB
9+
— parse it before any file read:
4910

5011
```
5112
$ openkb status
5213
Knowledge base: /path/to/kb
53-
5414
Knowledge Base Status:
55-
Directory Files
56-
-------------------- ----------
57-
sources 5
58-
summaries 5
59-
concepts 12
60-
reports 2
61-
raw 5
62-
63-
Total indexed: 5 document(s)
64-
Last compile: 2026-05-16 12:14:12
65-
Last lint: 2026-05-16 12:16:31
15+
...directory counts and timestamps...
6616
```
6717

68-
- The `Knowledge base: <path>` line is parseable: it's the absolute
69-
path of the active KB. The user may have invoked you from anywhere
70-
— never assume cwd is the KB root; use this path.
71-
- Resolution: walks up from cwd looking for `.openkb/`, then falls
72-
back to the global default set by `openkb use`.
73-
- Empty case: prints "No knowledge base found. Run `openkb init`
74-
first." Tell the user this and stop — don't try to read files.
18+
Resolution: walks up from cwd, then falls back to `openkb use`'s
19+
global default. Empty case prints "No knowledge base found. Run
20+
`openkb init` first." — stop and tell the user; don't try to read.
7521

76-
## `openkb query "<question>"`
22+
## `openkb list`
7723

78-
Run a full retrieval-augmented query against the wiki. Returns a
79-
synthesized answer with citations. **Costs an LLM call inside
80-
OpenKB**, so use this when the user explicitly wants a synthesized
81-
answer across the whole KB, not for simple lookups that can be
82-
answered by reading directly.
24+
Documents + concepts table. `Type` is mapped via `_TYPE_DISPLAY_MAP`:
25+
long PDFs show as `pageindex`, everything else as `short` (the raw
26+
file extension is internal and not exposed). `Pages` only populated
27+
for long PDFs.
8328

8429
```
85-
$ openkb query "How does self-attention scale with sequence length?"
86-
Self-attention is O(n²) in sequence length because every token attends
87-
to every other token...
88-
89-
Sources:
90-
- [[concepts/self-attention]]
91-
- [[summaries/transformers]] (sources/transformers.md)
30+
$ openkb list
31+
Documents (N):
32+
Name Type Pages
33+
paper.pdf pageindex 42
34+
notes.md short
35+
Summaries (N):
36+
- paper
37+
Concepts (N):
38+
- attention
9239
```
9340

94-
Add `--save` to persist the answer at
95-
`wiki/explorations/<slug>.md` — but only when the user asks for it.
41+
## `openkb query "<question>"`
42+
43+
Full RAG pipeline — costs an LLM call inside openkb. Use only when
44+
no obvious slug matches and direct reads can't answer. Returns
45+
free-form answer text plus cited `[[concepts/...]]` / `[[summaries/...]]`
46+
paths. Add `--save` to persist to `wiki/explorations/<slug>.md`
47+
only when the user asks for it.
9648

97-
## Read-only commands NOT typically needed from a skill
49+
## Read-only commands the skill should NOT call
9850

99-
- `openkb chat` — interactive REPL, not appropriate for skill usage
100-
- `openkb watch` — daemon for auto-ingesting from `raw/`
101-
- `openkb lint` — health check; produces a report file. Don't run
102-
unless the user explicitly asks about wiki health.
51+
- `openkb chat` — interactive REPL
52+
- `openkb watch` — daemon
53+
- `openkb lint` — health-check report (run only if the user
54+
explicitly asks about wiki health)
10355

104-
## Write commands — DO NOT run autonomously
56+
## Write commands — MUST NOT run autonomously
10557

106-
These mutate the user's knowledge base:
58+
These mutate the user's knowledge base. Suggest with a one-line
59+
description of what they do; let the user run them:
10760

108-
- `openkb add <path>` — ingest a new document (LLM cost)
61+
- `openkb add <path>` — ingest a document (LLM cost, modifies wiki)
10962
- `openkb remove <doc>` — destructive removal
11063
- `openkb lint --fix` — auto-edits wiki pages
111-
- `openkb init` — one-time setup
112-
- `openkb use <path>` — sets the default KB
113-
114-
Suggest these to the user with a sentence explaining what they do, but
115-
do not invoke them yourself.
116-
117-
## How to identify "is this an OpenKB knowledge base?"
64+
- `openkb init` — one-time KB setup
65+
- `openkb use <path>` — set the default KB
11866

119-
Look for a `.openkb/` directory alongside `wiki/` in the user's cwd
120-
(or an ancestor). The presence of `.openkb/config.yaml` confirms it.
121-
If the user's question is about content but no KB is present, suggest
122-
they `openkb init` and `openkb add` their documents.
67+
Also: never directly `Edit`/`Write` any file under `<kb>/wiki/` or
68+
`<kb>/.openkb/`. That's the user's curated content (and openkb's
69+
internal state) — the agent must not patch it directly.

0 commit comments

Comments
 (0)