# Okf Sqlite

> SQLite connector that produces and ingests Open Knowledge Format (OKF) bundles from database schemas and comments, CGO-free via modernc.org/sqlite. Use when documenting or cataloging a SQLite database, extracting its schema into OKF, or comparing/validating a database against an OKF bundle.

- **Type:** Skill
- **Install:** `agentstack add skill-xsavikx-okf-skills-okf-sqlite`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xSAVIKx](https://agentstack.voostack.com/s/xsavikx)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **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-sqlite
- **Website:** https://xsavikx.github.io/okf-skills/

## Install

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

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

## About

# SQLite OKF Connector

This skill provides a Go-based CLI tool to convert SQLite database schemas and comments into Open Knowledge Format (OKF) bundles, and validate existing databases against OKF bundles.

## When to Use

Use this skill when you need to:
1. Extract metadata, table structures, column definitions, and primary keys from a local SQLite database into a portable OKF bundle.
2. Verify that an existing SQLite database conforms to an OKF bundle definition.

## Setup

The connector is written in Go and requires Go 1.24+ to build from source:

```bash
# Install the published binary (Go 1.24+) — no clone needed:
go install github.com/xSAVIKx/okf-skills/skills/okf-sqlite@v0.1.0

# …or build from a clone of the repository:
cd skills/okf-sqlite
go build -o okf-sqlite .
```

## How to Use

### 1. Produce an OKF Bundle
Extract metadata from a SQLite database file and save it as an OKF bundle directory:

```bash
./okf-sqlite produce --db  --out  [--tables ] [--sample ] [--profile]
```

**Parameters:**
- `--db` (required): Path to the SQLite `.db` or `.sqlite` file.
- `--out` (required): Path to the directory where the OKF bundle will be generated.
- `--tables` (optional): Filter to extract only specific tables.
- `--sample ` (optional): Embed up to N sample rows per table as a `## Sample` section in each table doc (default 0 = none).
- `--profile` (optional): Compute per-column statistics (non-null, null, distinct, min, max) and embed a `## Data Profile` section.

### 2. Ingest / Verify an OKF Bundle
Verify an existing SQLite database's schema against an OKF bundle, or bootstrap missing tables:

```bash
./okf-sqlite ingest --db  --bundle  [--sync]
```

**Parameters:**
- `--db` (required): Path to the SQLite database.
- `--bundle` (required): Path to the OKF bundle.
- `--sync` (optional): If provided, the tool will attempt to create any missing tables or columns defined in the OKF bundle.

### 3. Inspect the Schema (self-description)
Print a machine-readable JSON description of this skill's commands and flags (used by `okf-mcp` to expose the skill as an MCP tool):

```bash
./okf-sqlite schema
```

## 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-sqlite
- 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%.
