bartolli

Kmd — AI skill for Claude Code

AI community

Knowledge-markdown CLI + MCP server.

How to install Kmd

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bartolli/kmd and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Kmd does

Knowledge-markdown CLI + MCP server. Validate, index, and serve a structured markdown vault to AI agents.

Alternatives in AI

  • Iwe — Markdown knowledge graph — LSP for your editor, CLI + MCP memory for your AI agents 1.8k ★
  • Nocturne Memory — A lightweight, rollbackable, and visual Long-Term Memory Server for MCP Agents 1.3k ★
  • Wenyan MCP — 文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号 1.2k ★

README

kmd — knowledge-markdown

kmd is a knowledge system for AI agents, built on [Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) primitives: plain markdown, YAML frontmatter, a controlled vocabulary. What it adds is timing. The right context reaches the agent at the right moment, and costs nothing the rest of the time.

A cold session gets its orientation in one `prime` call: current focus, invariants, what to read. `search` returns ranked candidates, never page dumps. Hooks steer the agent at the exact event where a rule applies: a reminder on the prompt that needs it, a gate on the tool call that would break it, validation on the write that touched the vault. Rules that would otherwise sit in instruction files, paying tokens on every request, fire only when they matter.

The vault stays plain markdown in git, Obsidian-compatible. Works with Claude Code, Codex, and Kiro. No database to run.

npx @bartolli/kmd --help

Quick start

Two setups. Pick one, or use both; they compose.

**A global vault.** One personal wiki serving all your projects:

npx @bartolli/kmd init ~/wiki-vault --set-default

`--set-default` records the vault in `~/.kmd/config.yaml`. Every `kmd` command and MCP server on this machine now finds it without configuration.

**A project vault.** The repo carries its own knowledge:

cd my-repo
npx @bartolli/kmd init --local

This scaffolds `my-repo/vault/` plus a `.kmd/` state home. Every command run inside the repo resolves this vault automatically, and it wins over the global default. Nothing else to configure.

Then, either way:

kmd validate   # deterministic checker, no LLM
kmd sync       # vault → SQLite index

**An existing vault.** When the engine moves ahead of a vault scaffolded earlier — a new kind, a new template — bring it to the starter:

kmd init --upgrade            # report the delta; exit 1 when behind
kmd init --upgrade --apply    #