usage
Fungsinya
Skill ini memandu penjawaban pertanyaan data dengan baris perintah Wren, termasuk mengumpulkan konteks skema, menulis SQL lewat lapisan semantik, dan menjalankannya. Skill ini untuk analis dan pengguna bisnis yang mengajukan pertanyaan seperti berapa banyak, sepuluh teratas, atau tren.
Kapan dipakai
- βSaat Anda bertanya berapa banyak pesanan, pelanggan, atau dolar yang tercatat dalam suatu periode.
- βSaat Anda meminta daftar teratas, rincian, atau tren dalam data bisnis Anda.
- βSaat Anda menginginkan laporan atau analisis metrik bisnis dari basis data yang terhubung.
Link skill
https://github.com/Canner/WrenAI/blob/main/core/wren/src/wren/skills_content/usage/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBerapa banyak pelanggan baru yang kita dapatkan kuartal lalu, dan bagaimana perbandingannya dengan kuartal sebelumnya?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini meminta agent memeriksa pemasangan, membaca skema proyek dan kueri sebelumnya, menulis SQL lewat model semantik, menjalankannya, dan menampilkan hasilnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Wren Engine CLI β Agent Workflow Guide
This guide is served by the
wrenCLI (wren skills get usage), so it always matches your installed wrenai version. Pull the deeper reference docs withwren 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)
- Create one (e.g.,
Step 2 β Check if the wren CLI is installed
Run wren --version. If the command is not found or errors:
Tell the user that the
wrenCLI is not installed.Ask if you should help install it.
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.ymlup to the repository root). If found, read the active profile withcat ~/.wren/profiles.ymlor 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.Install with the detected or chosen extra:
# DuckDB (no extra needed) pip install "wrenai" # Other datasources pip install "wrenai[<datasource>]"To also enable semantic memory, interactive prompts, and web UI (recommended):
pip install "wrenai[<datasource>,main]" # or for DuckDB: pip install "wrenai[main]"Verify:
wren --version
If wren --version succeeds, proceed to the relevant workflow below.
The wren CLI queries databases through an MDL (Model Definition Language) semantic layer. You write SQL against model names, not raw tables. The engine translates to the target dialect.
Two things drive everything:
- Profile β database connection + datasource type, managed via
wren profile(stored in~/.wren/profiles.yml) - Project β MDL model definitions in YAML, compiled to
target/mdl.jsonviawren context build
The CLI reads the active profile for connection info and datasource. Use wren profile list to see which profile is active, wren profile switch <name> to change it. dry-plan also accepts --datasource / -d for transpile-only use without a profile.
For memory-specific decisions, see the memory reference (run wren skills get usage --full).
For SQL syntax, CTE-based modeling, and error diagnosis, see the wren-sql reference (run wren skills get usage --full).
For project structure, MDL field definitions, and CLI workflow details, see the documentation.
Workflow 1: Answering a data question
Step 1 β Gather context
| Situation | Command |
|---|---|
| Default | wren memory fetch -q "<question>" |
| Need specific model's columns | wren memory fetch -q "..." --model <name> --threshold 0 |
| Memory not installed | Read target/mdl.json in the project directory, or run wren context show |
If this is the first query in the conversation, also run:
wren context instructions
If it returns content, treat it as rules that override defaults β apply them to all subsequent queries in this session.
Step 2 β Recall past queries
wren memory recall -q "<question>" --limit 3
Use results as few-shot examples. Skip if empty.
Step 2.5 β Assess complexity (before writing SQL)
If the question involves any of the following, consider decomposing:
- Multiple metrics or aggregations (e.g., "churn rate AND expansion revenue")
- Multi-step calculations (e.g., "month-over-month growth rate")
- Comparisons across segments (e.g., "by plan tier, by region")
- Time-series analysis requiring baseline + change (e.g., "retention curve")
Decomposition strategy:
- Identify the sub-questions (e.g.,
Pertanyaan umum
Apakah saya perlu menulis SQL sendiri?
Tidak. Agent Anda menulis SQL lewat lapisan semantik, dengan memakai definisi proyek.
Apakah skill ini belajar dari pertanyaan sebelumnya?
Ya. Skill ini menyebut mengingat kueri sebelumnya dan belajar dari hasil yang sudah dikonfirmasi.
Bagaimana jika lingkungan tidak punya alat tersebut?
Skill ini memeriksa CLI Wren terlebih dahulu dan menawarkan pemasangan jika alat itu tidak tersedia.
Detail
Deskripsi asli dari pembuat
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 dat
repo: Canner/WrenAI
Popularitas
- Bintang GitHub
- 18k
- Peringkat
- #10729
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
dlt-connector
18kMembantu agent Anda memuat data dari alat SaaS seperti HubSpot atau Stripe ke berkas DuckDB lokal, siap untuk analisis SQL Wren.
enrich-context
18kMembantu agent Anda menambahkan makna bisnis ke proyek data Wren, seperti satuan, nilai enum, sinonim, dan metrik standar.
genbi
18kMembantu agent Anda mengubah proyek data Wren menjadi dasbor peramban yang bisa dibagikan dan men-deploy-nya ke akun hosting Anda sendiri.
generate-mdl
18kMembantu agent Anda membuat proyek semantik Wren dengan menjelajahi skema basis data, menormalkan tipe, dan menghasilkan berkas YAML.
Skill serupa
gitcrawl
394kMemungkinkan agent Anda mencari arsip issue dan pull request GitHub yang tersimpan, mengelompokkan yang duplikat, dan memeriksa status terkininya di GitHub.
slacrawl
394kMemungkinkan agent Anda mencari dan menghitung pesan di arsip Slack lokal, memeriksa seberapa baru arsip itu, dan menyegarkannya bila diperlukan.
goplaces
394kMembantu agent Anda mencari tempat, mendapatkan detail dan ulasannya, serta menentukan nama tempat memakai Google Places, dengan keluaran JSON untuk skrip.