# ktx-data-agent-context-layer

The ktx-data-agent-context-layer skill guides ktx setup so an AI agent can search warehouse context, metric definitions, and wiki knowledge, then use that context in data queries.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 158 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-data-agent-context-layer/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-data-agent-context-layer

## What it does

The skill covers using ktx to gather metadata from databases and sources such as dbt, Looker, and Notion. It builds a semantic layer with metric definitions and makes that material searchable through the CLI or MCP. An agent can use the approved definitions when querying data rather than reconstructing metric logic for each request.

Start a project with `ktx setup`, collect context with `ktx ingest`, and search metrics or wiki pages with `ktx sl` and `ktx wiki`. The instructions also cover MCP server setup and source configuration. The described connections rely on LLM and embedding keys; database access also needs credentials. Secrets can live in `.ktx/secrets.yaml` or environment variables. Without configured keys and access to the sources, ktx cannot build the required project context.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

2. **Manually: put the files in place**
- File: `.cursor/skills/ktx-data-agent-context-layer/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-data-agent-context-layer
```

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill ktx-data-agent-context-layer -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-data-agent-context-layer/SKILL.md

## When to use it
- gather context from warehouse metadata and connected sources
- look up an approved metric definition
- find business rules in wiki pages
- query data through the ktx semantic layer

## Example prompts
- Find the definition of monthly recurring revenue in ktx.
- Search the wiki for our refund rules.
- Use ktx to query revenue by product category for Q4 2024.

## Similar
- [context-layer-health-check](https://affpapa.org/en/nevibecode/skills/context-layer-health-check.md) — skill · 150 installs
- [context-layer-consolidation](https://affpapa.org/en/nevibecode/skills/context-layer-consolidation.md) — skill · 148 installs
- [platform-data-and-tooling-api-context-get](https://affpapa.org/en/nevibecode/skills/platform-data-and-tooling-api-context-get.md) — skill · 3500 installs
- [data-context-extractor](https://affpapa.org/en/nevibecode/skills/data-context-extractor.md) — skill · 3300 installs
- [create-data-context](https://affpapa.org/en/nevibecode/skills/create-data-context.md) — skill · 1 install
- [layer-pixel-art](https://affpapa.org/en/nevibecode/skills/layer-pixel-art.md) — skill · 5100 installs

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
