xsavikx/okf-skills

okf-openapi

OpenAPI/Swagger connector that produces and ingests Open Knowledge Format (OKF) bundles from an API contract.

Ver código fuente
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

OpenAPI OKF Connector

This skill provides a Go-based CLI tool to document an OpenAPI/Swagger specification as an Open Knowledge Format (OKF) bundle: one API Endpoint concept per operation and one Schema concept per component schema, with endpoints linked to the schemas they reference. It needs only the spec file — no live server, no credentials.

When to Use

Use this skill when you need to:

  1. Catalog an HTTP API from its OpenAPI 3.x or Swagger 2.0 contract (JSON or YAML).
  2. Turn endpoints and schemas into a connected, browsable graph (the endpoint→schema

references edges render as typed edges in okf-viz).

  1. Round-trip enriched descriptions back to a .okf-metadata.yaml sidecar.

Setup

bash
# Install the published binary (Go 1.24+):
go install github.com/xSAVIKx/okf-skills/skills/okf-openapi@latest

# …or build from a clone:
cd skills/okf-openapi && go build -o okf-openapi .

How to Use

1. Produce an OKF bundle

bash
./okf-openapi produce --spec <api.yaml|api.json> --out <bundle-dir>
  • --spec (required): path to the OpenAPI 3.x or Swagger 2.0 spec (JSON or YAML;

2.0 is converted to 3.x automatically).

  • --out (required): output OKF bundle directory.

Each operation becomes endpoints/<operationId>.md (with parameter and response tables); each component schema becomes schemas/<Name>.md (with a # Columns property table: Name | Type | Required). Endpoints and schemas link to the schemas they reference under # Relationships. Re-running preserves enriched descriptions.

2. Ingest / sync descriptions

bash
./okf-openapi ingest --spec <api.yaml> --bundle <bundle-dir> [--sync]
  • Verifies each concept still exists in the spec (reports drift); the spec file is

never modified.

  • --sync: writes the bundle's descriptions to .okf-metadata.yaml next to the spec.

3. Inspect the schema (self-description)

bash
./okf-openapi schema

Prints the machine-readable JSON description used by okf-mcp to expose the skill.

del mismo repositorio

Más Skills

Todos los Skills
xsavikx
Comunidad

okf-csv

CSV connector that produces and ingests Open Knowledge Format (OKF) bundles from a directory of CSV files. Infers each file's column schema (integer/number/boolean/date/string) by sampling rows, optionally embeds a per-column data profile and sample rows, and syncs descriptions back to a .okf-metadata.yaml sidecar. Use when documenting or cataloging a folder of CSV/flat files, or capturing their inferred schema and stats as an OKF bundle. CGO-free, pure Go.

instalaciones
1
GitHub Stars
34
Actualizado
30 ago
xsavikx
Comunidad

okf-enrich

Guidance for an AI agent to enrich an Open Knowledge Format (OKF) bundle with high-quality concept descriptions using its own LLM — grounded in the bundle's schema, data profile, and samples — then optionally sync them back to the source. Use when an OKF bundle has missing, weak, or low-quality descriptions that should be improved before publishing or ingestion. Instructions-only; no binary required.

instalaciones
1
GitHub Stars
34
Actualizado
30 ago
xsavikx
Comunidad

okf-fs

Local filesystem connector that produces and ingests Open Knowledge Format (OKF) bundles documenting directory trees and file metadata, honoring .okfignore and .okf-metadata.yaml. Use when documenting or cataloging a local folder structure, or capturing filesystem metadata as an OKF bundle.

instalaciones
1
GitHub Stars
34
Actualizado
30 ago
xsavikx
Comunidad

okf-graphql

GraphQL connector that produces and ingests Open Knowledge Format (OKF) bundles from a GraphQL SDL document. Parses the schema into one concept per user-defined type (object/input/interface/enum/union) and per root operation (query/mutation/subscription field), links fields and operations to the types they reference as native relationship edges, and syncs descriptions back to a .okf-metadata.yaml sidecar. Use when documenting or cataloging a GraphQL API from its schema, with no live server. Pure Go.

instalaciones
1
GitHub Stars
34
Actualizado
30 ago