# Okf Openapi

> OpenAPI/Swagger connector that produces and ingests Open Knowledge Format (OKF) bundles from an API contract. Parses an OpenAPI 3.x or Swagger 2.0 spec (JSON or YAML) into one concept per operation (API Endpoint) and per component schema (Schema), links endpoints to the schemas they reference as typed cross-links, and syncs descriptions back to a .okf-metadata.yaml sidecar. Use when documenting o…

- **Type:** Skill
- **Install:** `agentstack add skill-xsavikx-okf-skills-okf-openapi`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xSAVIKx](https://agentstack.voostack.com/s/xsavikx)
- **Installs:** 0
- **Category:** [Security](https://agentstack.voostack.com/c/security)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [xSAVIKx](https://github.com/xSAVIKx)
- **Source:** https://github.com/xSAVIKx/okf-skills/tree/master/skills/okf-openapi
- **Website:** https://xsavikx.github.io/okf-skills/

## Install

```sh
agentstack add skill-xsavikx-okf-skills-okf-openapi
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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`).
3. 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  --out 
```

- `--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/.md` (with parameter and response
tables); each component schema becomes `schemas/.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  --bundle  [--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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xSAVIKx](https://github.com/xSAVIKx)
- **Source:** [xSAVIKx/okf-skills](https://github.com/xSAVIKx/okf-skills)
- **License:** Apache-2.0
- **Homepage:** https://xsavikx.github.io/okf-skills/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-xsavikx-okf-skills-okf-openapi
- Seller: https://agentstack.voostack.com/s/xsavikx
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
