> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/ai-agent-skill.md).

# AI agent skill

Koinju ships an open **agent skill** that teaches AI coding assistants — [Claude Code](https://claude.com/claude-code), Cursor, GitHub Copilot, Windsurf, Gemini, and 15+ others — how to work with this API.

## Why use it

* Fast development environement setup for testing the API
* Auto-discoverability of API capabilities (endpoints, SQL tables, data types)
* Help with optimisation of SQL queries and API calls
* Help with integration of API data into research, backtesting, and production pipelines

It bundles:

* **Schema knowledge** — every `api.*` table and column
* **Auth + setup** — a one-command project bootstrap (`uv`/`venv`, dependencies, `.koinju.env`)
* **REST + SQL routing** — when to hit the public `/market/*` endpoints vs. ClickHouse SQL.
* **Cookbook recipes** — How to run common financial data analysis (Sortino, max drawdown, Bollinger, historical volatility, cross-exchange arbitrage, …) inside the koinju DB.
* **Integration patterns** — wiring Koinju into existing trading and research stacks.

## Install

Via the [skills.sh](https://skills.sh) CLI:

```bash
npx skills add https://gitlab.com/koinju-public/agent-skill        # into ./.claude/skills/
npx skills add https://gitlab.com/koinju-public/agent-skill -g     # global ~/.claude/skills/
```

Update later with `npx skills update koinju`. The skill is open source at [gitlab.com/koinju-public/agent-skill](https://gitlab.com/koinju-public/agent-skill).

## Example prompts it handles

Once installed, describe what you want in plain language — the agent picks the right interface (REST vs SQL), writes the query, handles credentials, and returns a working result:

* "Set up a project to test the Koinju API."
* "What Bitcoin products are available on Koinju?"
* "Plot the BTC option smile for OKX and Bybit using Koinju data."
* "Retrieve the implied volatility for BTC options."
* "Optimize the query that computes the average price of LINK-USDT over the past year."
* "Benchmark this strategy against buy-and-hold using Koinju data."
* "We have a Postgres database of crypto prices — how do I integrate it with Koinju?"

{% hint style="info" %}
Don't have credentials yet? Sign up at [koinju.io/pricing](https://koinju.io/pricing). The skill walks the agent (and you) through the rest.
{% endhint %}
