Use with Claude Code
Wren AI is designed to work as Claude Code's grounding layer for any database it needs to query. With the Wren skills installed, Claude Code stops guessing about your schema — it discovers tables, looks up canonical models, recalls similar past queries, and generates SQL through the semantic layer.
Prerequisites
- Claude Code installed and authenticated
- A Wren AI project with at least one profile
Install the Wren skills
npx skills add Canner/WrenAI --skill '*'
Or via the install script:
curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash
The CLI auto-detects Claude Code. If you have multiple agents installed and want to target Claude Code specifically:
npx skills add Canner/WrenAI --skill '*' --agent claude-code
What each skill does
| Skill | When to use |
|---|---|
wren-generate-mdl | One-time setup — explore a new database and write the initial MDL project. |
wren-usage | Day-to-day querying — fetch context, recall similar queries, write and execute SQL, store the result for future recall. |
wren-onboarding | First-time install — set up the environment, scaffold a project, run a first query. |
wren-dlt-connector | Connect a SaaS data source via dlt and scaffold a Wren project from the loaded data. |
Typical workflow
-
Open Claude Code in your Wren project directory —
cd ~/my-wren-project && claude -
Ask a question in natural language:
How many customers placed more than one order this month? -
Claude Code uses
wren-usageto fetch context, recall examples, write SQL, execute viawren --sql "...", and store the result.
Tips
- Re-run
wren memory indexafter editinginstructions.mdor model descriptions so the new content is searchable. - If Claude Code picks the wrong table, add a
## Canonical tablessection toinstructions.mdand rebuild.