返回 Skills 目录
inkeep/open-knowledge-skills已通过检查

SKILL DETAIL

okf-knowledge-base

inkeep/open-knowledge-skills/okf-knowledge-base

Open Knowledge Format (OKF) v0.2 是一种用于代理可读知识的可移植格式:Markdown 文件、YAML frontmatter 和标准链接。本技能涵盖 OKF 语义,而 `/open-knowledge` 技能管理工具使用。 核心规则包括:包是 `.md` 文件的目录树,每个非保留文件是一个概念,其路径(不含 `.md`)是其 ID;每个概念需要可解析的 frontmatter,其中包含非空字符串 `type`,其他字段并非总是必需;类型是开放词汇表,消费者必须接受不熟悉的类型和元数据;使用标准 Markdown 链接进行可移植的关系,允许断开的链接和缺少索引;`index.md` 和 `log.md` 在每个级别都是保留的,使用小写文件名;`index.md` 通常没有 frontmatter,只有根索引可以声明 `okf_version: "0.2"`;`log.md` 是最新优先,条目标题以 ISO 日期开头;OKF 消费者读取 `.md`,而不是 `.mdx`。 在编写时,应使每个概念成为最小的有用链接或引用目标,选择稳定、描述性的类型,`Document` 仅作为通用后备。不要发明事实、关系、资源、来源、验证或历史。仅在添加真实信息时使用 `title`、`description`、`resource` 和 `tags`。在 `sources` 中记录来源,使用匹配的 `sources[].id` 和 Markdown 脚注进行声明级引用。保持作者身份和验证分离:`generated` 表示谁生成内容,`verified` 表示谁确认内容。将 `status: deprecated` 和过期的 `stale_after` 值视为信任信号,而不是验证错误。对于 `type: Attested Computation`,遵循声明的运行时和参数,不要重写批准的 computation。 阅读和维护包时,从最近的 `index.md` 开始,检查 frontmatter,然后仅关注相关链接。优先选择当前、经过验证的来源,但容忍未知类型和不完整的链接。如果包与假设冲突,信任包;如果缺失或不一致,请说明。将持久发现写回相关概念和作者枚举。在持久更改后,如果包使用日志,则添加真实的有日期 `log.md` 条目。读取旧版 `timestamp` 和正文引用,但在更新概念时优先使用 v0.2 `generated.at` 和 `sources`。迁移时切勿编造来源。 OpenKnowledge 的可选 `okf` 插件提供持续的便携性反馈,而不会阻止写入:写入时警告和项目审计检查结构、frontmatter、保留文件、链接和 `.mdx` 使用。`.ok/okf/*.schema.json` 包含精确的字段契约,应读取这些生成的文件而不是猜测,不要编辑它们。确定性 lint 结果建立一致性,但代理判断仍确定元数据是否真实有用。可选的索引生成维护 `index.md` 文件,生成的索引是机器拥有的,切勿编辑,因为 OpenKnowledge 会替换其内容。`log.md` 保持作者编写,而非生成。插件默认关闭,每个规则都可以禁用。其价值在于当 OpenKnowledge 原生内容会被其他 OKF 消费者误读时提供早期警告。

安装量 · 325查看来源

Installation

npx skills add https://github.com/inkeep/open-knowledge-skills --skill okf-knowledge-base

技能文件

SKILL.md

最近同步 · 2026年10月7日

plugin.json›
{
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
  "name": "okf",
  "description": "Starter pack: Open Knowledge Format (OKF) guidance",
  "author": {
    "name": "Inkeep"
  },
  "repository": "https://github.com/inkeep/open-knowledge-skills",
  "keywords": ["openknowledge", "starter-pack"]
}
SKILL.md›
---
name: okf-knowledge-base
description: "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."
compatibility: "Any agent host with the OpenKnowledge MCP server configured. The optional `okf` plugin provides continuous conformance feedback."
# This skill may live inside an OKF bundle, so it carries the required type.
type: Document
metadata:
  plugin: "okf"
  author: "Inkeep"
  repository: "https://github.com/inkeep/open-knowledge-skills"
---
# Open Knowledge Format (OKF)

[OKF v0.2](https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md) is a portable format for agent-readable knowledge: Markdown files, YAML frontmatter, and standard links. The `/open-knowledge` skill governs tool use; this skill covers OKF semantics.

## Core rules

- A bundle is a directory tree of `.md` files. Each non-reserved file is one concept; its path without `.md` is its ID.
- Every concept needs parseable frontmatter with a non-empty string `type`. No other field is always required.
- Types are an open vocabulary. Consumers must accept unfamiliar types and metadata.
- Use standard Markdown links for portable relationships. Broken links and a missing index are allowed.
- `index.md` and `log.md` are reserved at every level. Use lowercase filenames.
- An `index.md` normally has no frontmatter; only the root index may declare `okf_version: "0.2"`.
- A `log.md` is newest-first; entry headings begin with an ISO date — `## YYYY-MM-DD: Summary` (the summary after the date is optional; a bare `## YYYY-MM-DD` is equally conformant).
- OKF consumers read `.md`, not `.mdx`.

## Authoring judgment

- Make each concept the smallest useful link or citation target. Choose a stable, descriptive type; `Document` is only a generic fallback.
- Do not invent facts, relationships, resources, sources, verification, or history. Missing knowledge is better than false structure.
- Use `title`, `description`, `resource`, and `tags` only when they add real information.
- Record provenance in `sources`. Join claim-level citations with matching `sources[].id` and Markdown footnotes.
- Keep authorship and verification separate: `generated` says who produced content; `verified` says who confirmed it. Use exact lowercase `human:` and `process:` prefixes when applicable.
- Write every provenance timestamp as an ISO 8601 datetime with an explicit UTC offset (`stale_after: 2026-12-31T00:00:00Z`), never a bare date and never an offsetless time. This covers `generated.at`, `verified[].at`, `stale_after`, `sources[].last_modified`, and both `usage_window` bounds. A `log.md` entry heading is different: it stays a plain `YYYY-MM-DD` date.
- Treat `status: deprecated` and expired `stale_after` values as trust signals, not validation errors.
- For `type: Attested Computation`, follow the declared runtime and parameters. Do not rewrite the sanctioned computation.

## Read and maintain a bundle

- Start with the nearest `index.md`, inspect frontmatter, then follow only relevant links.
- Prefer current, verified sources, but tolerate unknown types and incomplete links.
- If the bundle conflicts with an assumption, trust the bundle; if it is missing or inconsistent, say so.
- Write durable discoveries back to the relevant concept and authored enumerations.
- Add a truthful dated `log.md` entry after durable changes when the bundle uses a log.
- Read legacy `timestamp` and body citations, but prefer v0.2 `generated.at` and `sources` when updating a concept. Never invent provenance while migrating.

## OpenKnowledge's `okf` plugin

The optional project plugin provides continuous portability feedback without blocking writes:

- Write-time warnings and project audits check structure, frontmatter, reserved files, links, and `.mdx` use.
- `.ok/okf/*.schema.json` contains the precise field contracts. Read these generated files instead of guessing; do not edit them.
- Deterministic lint findings establish conformance. Agent judgment still establishes whether metadata is true and useful.
- Optional index generation maintains `index.md` files. Generated indexes are machine-owned: never edit them, because OpenKnowledge replaces their contents.
- `log.md` remains authored, not generated.

The plugin is off by default and each rule can be disabled. Its value is early warning when OpenKnowledge-native content would be misread by another OKF consumer.