Logo Okf

Okf

Cộng đồng
saschb2b
okf

Create, inspect, retrieve, author, revise, enrich, audit, repair, research, analyze change impact, migrate, validate, and maintain knowledge for AI agents as conformant Open Knowledge Format (OKF) bundles. Use for /okf commands; work on an existing OKF bundle; documentation of tables, datasets, views, metrics, runbooks, playbooks, APIs, schemas, or join paths; exports from catalogs, metadata, websites, URLs, or source code; and any knowledge an agent will read later. Apply implicitly when editing an OKF bundle so conformance, provenance and sources, generated and verified trust signals, freshness, log.md, indexes, and cross-links remain current. Tracks OKF v0.2, including attested computations and migration from v0.1.

Tổng quan

Nhà phát hànhsaschb2b
Kho mãskills
Tên kỹ năngokf
Sao
22
Bản fork
3
Tệp đi kèm
21
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 21 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được saschb2b công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Okf trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/saschb2b/skills/tree/main/skills/engineering/okf
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/saschb2b/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/engineering/okf .claude/skills/okf
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Okf trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Okf ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Okf không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Open Knowledge Format (OKF)

OKF is Google's open, vendor-neutral spec (v0.2) for the context an AI agent needs, represented as a bundle. A bundle is a directory of markdown files, each a concept (a table, dataset, metric, runbook, playbook, API, join path), kept in version control next to the code it describes. Just markdown, just files, just YAML frontmatter. The format is the contract, so any producer can write a bundle and any consumer (an agent, a viewer, a search index) can read it with no SDK and no lock-in.

Use this skill two ways. Run a command on demand, or apply it implicitly whenever you shape knowledge an agent will read. The deep normative spec lives in spec.md; per-command steps in commands.md; copy-paste starting points in templates.md.

Choose the OKF method

For every OKF request, select the narrowest method that fits the user's intended outcome. In OKF Studio generic chat, call okf_capability_catalog to inspect the active versioned catalog and okf_capability_resource to load the selected method. Outside Studio, read the matching capability file directly. State the selected capability in the first progress update. Do not claim to have used a method until its resource was loaded.

User intentMethod to load
Answer a bounded bundle question or trace known linksokf-inspect
Select evidence, inspect the route, or diagnose a retrieval missokf-retrieve
Plan a new bundle whose destination or concept map is unresolvedokf-create
Add facts, citations, or relationships to existing knowledgeokf-enrich
Review conformance or knowledge health without changing filesokf-audit
Fix a reproducible validation or health defectokf-repair
Reconcile bundle claims with bounded external evidenceokf-research
Find direct and downstream effects before a changeokf-change-impact
Plan a versioned schema, convention, layout, or identity changeokf-migrate
Turn accepted evidence and known destinations into new conceptsokf-author, then writing
Improve existing prose without changing meaningokf-revise, then writing

All methods stay discoverable, but their detailed instructions are loaded on demand. Loading every method at once wastes context and combines incompatible boundaries. For example, inspect is read-only, revise forbids knowledge changes, enrich permits sourced additions, and repair requires a reproducible defect. If one request spans several phases, run the methods in order and preserve each method's stop conditions and artifact contract.

Execution surfaces

Treat the capability files as portable methods, not as a requirement to run inside OKF Studio.

  • In OKF Studio, use the named okf_* and studio_stage_* tools. Emit the structured artifact required by the selected method when a work surface is useful.
  • Outside Studio, translate inventory, read, search, and traversal to the host's filesystem and search tools; run the bundled validator for conformance and connectivity; use the host's ordinary diff and review flow for authorized edits. Do not invent Studio tool results, receipt IDs, health finding IDs, or bundle fingerprints.
  • Structured artifacts are Studio-only by default. Outside Studio, return the same evidence and decisions as concise prose, markdown, or an ordinary diff unless the caller explicitly asks for the artifact JSON.
  • Authorization belongs to the host workflow. Studio keeps writes in reviewed staging. Elsewhere, follow the user's requested edit scope and the host's normal approval rules; a method's Studio staging language does not revoke an explicit request to edit files.

The one rule

A bundle is conformant when every concept document carries YAML frontmatter with a non-empty type field. That is the only hard requirement, and v0.2 says so explicitly. Everything else is recommended structure whose absence a consumer must tolerate. Hold this line and a bundle anyone produced stays readable by anyone's agent. The full conformance criteria and the consumer's tolerance contract are in spec.md.

What v0.2 adds on top of that. v0.1 answered "what does the agent need to know?" v0.2 adds "should it believe this, and is it still true?" Four optional families, none of which can make a bundle non-conformant: sources (what the knowledge derives from, with credibility signals), generated and verified (who wrote it, who has confirmed it, which is what the trust tier is computed from), status and stale_after (lifecycle), and the Attested Computation type (a sanctioned computation an agent may run but never author). Two things broke from v0.1: timestamp became generated: { by, at }, and the # Citations body section became sources frontmatter. A v0.1 bundle stays consumable under documented fallbacks, so migrating is worthwhile rather than urgent; the migrate command has the procedure.

Commands

Invoke as /okf <command> [target]. Each is detailed in commands.md.

CommandWhat it does
initCreate a bundle. Make the directory, a root index.md declaring okf_version, and the first concept folders.
addWrite one concept document. Pick a descriptive type, fill the recommended frontmatter, record sources and generated, body it with # Schema and # Examples.
attestDefine a sanctioned computation as an Attested Computation concept, so an agent can run it and have the result checked, but cannot rewrite it.
migrateMove a bundle from v0.1 to v0.2. Two mechanical renames, then the judgment calls about actors and what not to claim as verified.
enrichTurn a source (a BigQuery dataset, an OpenAPI spec, a wiki, a website, docstrings) into concepts by first enumerating its full surface into an inventory, then a pass that crawls authoritative docs to add schemas, join paths, and citations, then an entity pass that gives every load-bearing name the source mentions but never explains its own linked concept.
linkConnect concepts with relative markdown links and name the relationship in the surrounding prose.
indexGenerate or refresh index.md listings so an agent can navigate by progressive disclosure.
logAppend a dated log.md entry (Creation, Update, Deprecation), newest first. Append-only, one line per entry, written so parallel producers merge without conflicts.
validateRun the conformance check. node okf-validate.mjs <bundle>, or the manual checklist in commands.md.
healthInspect conformance, connectivity, navigation, provenance, freshness, duplication, and coverage signals without writing.
retrieveSelect coherent evidence for a question and retain route, omission, provider, fingerprint, and abstention decisions.
exportConvert an existing source into a conformant bundle: a catalog, a metadata dump, a schema export, a docs site, or a website or external URL (/okf export <url>). Map the whole surface, cover every section, give every named entity its own concept, then pass the creation gate — not a snapshot of the front page. The producer role.
consumeRead a bundle to answer a question. Start at index.md, follow links, tolerate anything missing.

Implicit mode

Apply OKF without being asked whenever knowledge is being shaped for an agent to read later:

  • You are documenting a data asset (table, view, dataset, metric, dimension) or a process (runbook, playbook, incident guide) an agent will consult. Write it as a concept with a type, not loose prose.
  • You are exporting or transforming metadata, a catalog, schemas, or docstrings for agent consumption. Emit a bundle, not a JSON blob or a wiki dump.
  • You write a deprecation notice, a join path, or a business-meaning definition an agent needs. That is a concept. Give it a file and a type.
  • You are editing an existing OKF bundle. Keep it conformant as you go: refresh the concept's generated (both by and at, since the actor may differ from whoever wrote it last), append a log.md entry (one line, under today's heading, never editing a past entry), regenerate the affected index.md, and add a link whenever you create a relationship. generated.at marks the last meaningful change, so a mechanical, meaning-preserving transform (a link-form conversion, a punctuation pass) updates the log and leaves generated alone; a prose rewrite refreshes it. A model change is an actor change: when a different model writes the new sentences, record that model in by rather than inheriting the old attribution. If you materially change a concept that carried a verified event, that verification no longer covers what the concept now says; drop it rather than letting it vouch for text nobody checked. This is the "knowledge is touched and transformed" case, and it is where bundles silently rot if you skip the bookkeeping.

Guard. OKF is for knowledge an agent reads, not human-only prose. A README, a blog post, or a design doc for people is not a bundle. When it is unclear whether an artifact is agent-facing, ask before converting it.

Concept document at a glance

A concept is frontmatter plus a markdown body. Its identity is its path with the .md removed, so tables/orders.md is the concept tables/orders.

  • Frontmatter. type is required. Recommended, in priority order: title, description (one sentence), resource (canonical URI for the underlying asset), tags (a YAML list). Then the v0.2 families, all optional: sources (a list, each entry needing at least resource, plus id when the body cites it and the author, usage_count, last_modified credibility signals when known), generated: { by, at } (who wrote it and when, replacing v0.1's timestamp), verified (a list of real { by, at } confirmations, or a single bare mapping), status (draft|stable|deprecated, absent means stable), and stale_after (an absolute YYYY-MM-DD). Producers may add any other keys, and consumers preserve unknown keys rather than rejecting them.
  • Actors. Every identity field (generated.by, verified[].by, sources[].author) uses one convention: <producer>/<version> for an agent or tool, human:<id> for a person, process:<id> for automation. Consumers compute the trust tier off the human: prefix, so never write it for content an agent produced. That single rule is what keeps the trust layer meaningful.
  • Body. Favor structural markdown (headings, lists, tables, fenced code) over freeform prose. Conventional headings, used when they apply, are # Schema, # Examples, and # Computation. Attribute one claim by footnoting it with a sources entry id (...sharded daily.[^ga4-schema]); the label is a join key, not prose. For each fact, pick the sharpest form the extended set offers (next section).
  • Reserved filenames, never a concept. index.md is a directory listing and carries no frontmatter, except the bundle-root index.md, which may declare okf_version. log.md is an append-only dated change history; past entries are never edited, a correction supersedes.
  • Links. Both forms are valid OKF: bundle-absolute (/tables/customers.md, the form the spec recommends because it survives the linking file moving) and relative (customers.md, ../tables/customers.md). Default to relative targets anyway: GitHub resolves the absolute form against the repository root and serves a 404, Google's reference visualizer builds no edges from it, and Google converted its own sample bundles to relative for exactly this reason. A relative link breaks when the linking file moves, so re-run the validator after any move; it reports both failure modes. A link asserts a relationship whose meaning lives in the surrounding prose, not in the link.
  • External material. A webpage or doc you pull in becomes an ordinary concept under references/<slug>.md with type: Reference and its URL in resource. Absorb its content, not just its URL: extract the substance into the body so the concept stands alone offline — resource is provenance for re-checking, not a replacement for the knowledge. A summary that defers to the live link is a stub (see /okf export).

Pick the sharpest markdown form

"Favor structural markdown" extends past headings and tables. For a fact with inherent structure, the extended-markdown form is both more machine-readable than prose (an agent parses an edge list or a formula, not a paragraph about one) and renders richly where bundles are actually read (GitHub, OKF viewers). Where a consumer renders none of it, the source still reads as plain markdown, so there is no portability cost.

The factWrite it asNot as
Topology: joins, lineage, pipeline flow, statesA ```mermaid fence (erDiagram, flowchart, sequenceDiagram); the edges are the dataA prose paragraph describing arrows
A formal definition: metric formula, threshold, windowTeX, $…$ inline or $$…$$ displayPseudo-math in prose ("count divided by the window")
Term meanings: a glossary, enum values, status codesA definition list (Term then : definition)Bullets shaped like "X - means Y"
A checklist with state: rollout or migration progressA task list (- [x] / - [ ])Prose like "steps 1 to 3 are done"
Attribution of one claim to one sourceA footnote whose label is a sources entry id ([^ga4-schema])A parenthetical URL, or a bare [^1] that keys to nothing
Field-by-field facts: schemas, parametersA markdown table (already the convention)Key-value prose

Keep prose for meaning and reasoning; reach for these forms when the fact has shape. The worked examples in templates.md show each in place.

Validate

Run the bundled checker against a bundle directory:

sh
node okf-validate.mjs path/to/bundle

It errors (exit 1) on the hard requirement (a concept missing frontmatter or a non-empty type) and warns on soft guidance without failing the bundle, because consumers tolerate those. Nothing v0.2 added can be an error, since all of it is optional; it is checked as guidance and gated only under --strict on a bundle whose root index declares "0.2". That gate covers leftover timestamp and # Citations, a sources entry with no resource, a generated with no by, an out-of-range status, and an Attested Computation with no runtime or no computation. A v0.1 bundle validates clean either way. Among the warnings it reports the bundle's graph connectivity. Orphans (a concept with no concept-to-concept link in or out) and broken concept links (a link whose target is not a concept, including a link into a reserved index.md). Pass --strict to turn those into failures: that is the producer gate, because an agent traversing the bundle cannot reach an orphan or cross a broken link, so either is missing context by construction. Pass --drift after editing descriptions: it compares each index listing against the linked concept's description and catches the listing left advertising an old claim. Passing the script is still not rendering everywhere; real consumers diverge from the spec on actor prefixes and link form, and the divergence list in commands.md says where to double-check. The reviewer's checklist behind the script is in commands.md.

Validation checks conformance, not coverage. A thin stub of a fifty-page site passes it clean, because the one rule is about each file's type, not about whether the bundle captured the source. When you produce a bundle from a source (export, enrich), the default run is necessary but not sufficient — run okf-validate --strict and the creation gate in commands.md: every discovered section covered, concepts with real depth, every load-bearing name decomposed into its own linked concept (a bundle stops where the gate says, not where the source's own explanations ran out), a connected graph with no orphans or broken links, and any crawl boundary recorded in log.md. Passing the default okf-validate is not the same as finishing the export.

Files in this skill

  • spec.md. The full OKF v0.2 normative reference (conformance, fields, provenance and trust, actors, linking, attested computations, versioning, changes from v0.1, non-goals, design principles).
  • commands.md. Each command end to end, with the files it touches and the validate checklist.
  • templates.md. Concept, root index.md, sub index.md, and log.md templates, plus worked BigQuery table, metric, runbook, and external-reference examples.
  • writing.md. The shared reader-job, prose, structure, revision, and fact-preservation contract for authoring and revision.
  • capabilities/. The narrow inspect, retrieve, create, enrich, audit, repair, research, change-impact, migrate, author, and revise methods selected by the router above.
  • okf-validate.mjs. The zero-dependency conformance checker.

Source

The Open Knowledge Format is published by Google Cloud. Spec: GoogleCloudPlatform/knowledge-catalog. Announcement: How the Open Knowledge Format can improve data sharing. The same repo ships a reference producer (an enrichment agent), a single-file HTML visualizer as a reference consumer, and four browsable sample bundles; spec.md points to each. GA4, Stack Overflow, and Bitcoin were regenerated in v0.2 form, and acme_retail is new, exercising every v0.2 feature including credibility signals, a deprecated metric, and BigQuery-backed attested computations. OKF v0.2 is still an early standard designed for backward-compatible growth, and it explicitly defers the attestation runtime protocol, the attester ABI, attestation caching, and semantic-layer templates to a later revision, so re-check the spec rather than inventing those.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Okf làm được gì?

Create, inspect, retrieve, author, revise, enrich, audit, repair, research, analyze change impact, migrate, validate, and maintain knowledge for AI agents as conformant Open Knowledge Format (OKF) bundles. Use for /okf commands; work on an existing OKF bundle; documentation of tables, datasets, views, metrics, runbooks, playbooks, APIs, schemas, or join paths; exports from catalogs, metadata, websites, URLs, or source code; and any knowledge an agent will read later. Apply implicitly when editing an OKF bundle so conformance, provenance and sources, generated and verified trust signals, fre...

Vì sao nên dùng Okf trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Okf là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Okf trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/saschb2b/skills/tree/main/skills/engineering/okf. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Okf?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Okf với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Okf với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Okf có miễn phí không?

Có. Kỹ năng này được saschb2b phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇