# ktx-context-layer-data-agents

The ktx-context-layer-data-agents skill sets up ktx as a context layer for data agents, covering semantic metrics, a searchable wiki, and MCP access to warehouse context.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 133 installs · ★ 9 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/ktx-context-layer-data-agents/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/ktx-context-layer-data-agents

## What it does

The skill helps an agent add ktx to a project and prepare a queryable context layer. ktx keeps approved metric definitions and join relationships, imports knowledge from sources such as dbt, Looker, and Notion, then exposes the result through its CLI or an MCP server.

The setup requires Node.js 18+, a SQL warehouse, and an LLM provider API key from Anthropic, Google Vertex AI, or AI Gateway. Supported warehouses include PostgreSQL, Snowflake, BigQuery, ClickHouse, MySQL, SQL Server, and SQLite. The workflow creates `ktx.yaml`, builds context with `ktx setup` and `ktx ingest`, and starts agent access with `ktx mcp start`. The LLM provider key is required before the context layer can be ready.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-context-layer-data-agents -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ktx-context-layer-data-agents/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ktx-context-layer-data-agents/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-context-layer-data-agents -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ktx-context-layer-data-agents/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-context-layer-data-agents -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ktx-context-layer-data-agents/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/mcp-skills skills/ktx-context-layer-data-agents
```

2. **Manually: put the files in place**
- File: `.github/skills/ktx-context-layer-data-agents/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-context-layer-data-agents -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/ktx-context-layer-data-agents
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ktx-context-layer-data-agents/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-context-layer-data-agents -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/ktx-context-layer-data-agents/SKILL.md

## When to use it
- prepare context for warehouse questions
- build a semantic layer from dbt
- search metrics and business notes
- connect a data agent through MCP
- inspect the ktx project state

## Example prompts
- Set up ktx for this PostgreSQL project and create `ktx.yaml`.
- Ingest context from `./dbt/target/manifest.json`, then check the project status.
- Start the ktx MCP server so the agent can query the warehouse context.

## Similar
- [create-data-context](https://affpapa.org/en/nevibecode/skills/create-data-context.md) — skill · 1 install
- [setting-up-data-catalog](https://affpapa.org/en/nevibecode/skills/setting-up-data-catalog.md) — skill · 182 installs
- [building-dbt-semantic-layer](https://affpapa.org/en/nevibecode/skills/building-dbt-semantic-layer.md) — skill · 1100 installs
- [answering-natural-language-questions-with-dbt](https://affpapa.org/en/nevibecode/skills/answering-natural-language-questions-with-dbt.md) — skill · 1100 installs
- [semlayer](https://affpapa.org/en/nevibecode/mcp/semlayer.md) — MCP server · ★ 5 repo stars
- [query](https://affpapa.org/en/nevibecode/skills/honeydew-ai-query.md) — skill · ★ 44 repo stars

From the same set: [reason-machines/mcp-skills](https://affpapa.org/en/nevibecode/by/reason-machines/mcp-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
