Skills

Usage

Wren Engine CLI workflow guide for AI agents.

Install

npx skills add Canner/WrenAI --skill usage -g -a claude-code -y
Repository
Canner/WrenAI18k
Category
Data and ML
Updated
5d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Wren Engine CLI workflow guide for AI agents. Answer data questions end-to-end using the wren CLI: gather schema context, recall past queries, write SQL through the MDL semantic layer, execute, and learn from confirmed results. Use when: user asks a data question, requests a report or analysis, asks about metrics, revenue, customers, orders, trends, or any business data; user says 'how many', 'show me', 'what is the', 'top N', 'compare', 'trend', 'growth', 'breakdown'; user wants to explore, analyze, filter, aggregate, or summarize data from a database; agent needs to query data, connect a data source, handle errors, or manage MDL changes via the wren CLI.

Wren Engine CLI, Agent Workflow Guide

This guide is served by the wren CLI (wren skills get usage), so it always matches your installed wrenai version. Pull the deeper reference docs with wren skills get usage --full.

Preflight, Verify environment and installation

Goal: Ensure the wren CLI is available before entering any workflow.

Step 1, Check Python virtual environment

Run python -c "import sys; print(sys.prefix)" (or equivalent) to determine whether a virtual environment is active.

  • If no venv is active, warn the user and ask whether to:
    • Create one (e.g., python -m venv .venv && source .venv/bin/activate)
    • Continue without a venv (not recommended, may pollute global packages)

Step 2, Check if the wren CLI is installed

Run wren --version. If the command is not found or errors:

  1. Tell the user that the wren CLI is not installed.

  2. Ask if you should help install it.

  3. If the user agrees, determine the datasource extra to install:

    Auto-detect from project: Check whether the current directory is inside a wren project (look for wren_project.yml up to the repository root). If found, read the active profile with cat ~/.wren/profiles.yml or look for a datasource hint in the project's profile configuration. Extract the datasource type from there.

    Ask the user: If no project is detected or no datasource can be inferred, ask the user which database they plan to connect to. Valid extras: postgres (for Aurora Postgres), mysql (for Aurora MySQL), bigquery, snowflake, clickhouse, trino, mssql, databricks, redshift, spark, athena, oracle. DuckDB is included by default, no extra needed.

  4. Install with the detected or chosen extra:

    # DuckDB (no extra needed)
    pip install "wrenai"
    
Read the whole SKILL.md on GitHub

More in Data and ML