usage
하는 일
이 스킬은 Wren 명령줄로 데이터 질문에 답하는 방법을 안내합니다. 스키마 맥락 수집, 시맨틱 계층을 통한 SQL 작성, 실행을 포함합니다. 몇 개인지, 상위 열 개, 추세 같은 질문을 하는 분석가와 업무 사용자를 위한 스킬입니다.
사용하는 경우
- ✓특정 기간에 주문, 고객, 금액이 얼마나 되었는지 물을 때.
- ✓업무 데이터에서 상위 목록, 분석, 추세를 물을 때.
- ✓연결된 데이터베이스의 업무 지표에 대한 보고서나 분석이 필요할 때.
스킬 링크
https://github.com/Canner/WrenAI/blob/main/core/wren/src/wren/skills_content/usage/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지난 분기에 새 고객이 몇 명이었고, 그 전 분기와 비교하면 어떤지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 에이전트가 설치를 확인하고, 프로젝트의 스키마와 과거 쿼리를 읽고, 시맨틱 모델을 통해 SQL을 쓰고, 실행해서 결과를 보여 주도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.,
자주 묻는 질문
SQL을 직접 써야 하나요?
아니요. 에이전트가 프로젝트 정의를 써서 시맨틱 계층을 통해 SQL을 씁니다.
과거 질문에서 배우나요?
네. 스킬은 과거 쿼리를 기억하고, 확인된 결과에서 배우는 것을 언급합니다.
도구가 없으면 어떻게 하나요?
스킬은 먼저 Wren 명령줄을 확인하고, 사용할 수 없으면 설치를 제안합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 18k
- 순위
- #10729
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
dlt-connector
18k에이전트가 HubSpot이나 Stripe 같은 SaaS 데이터를 로컬 DuckDB 파일로 불러와 Wren SQL 분석에 쓸 수 있게 합니다.
enrich-context
18k에이전트가 단위, 열거형 값, 동의어, 표준 지표처럼 업무 의미를 Wren 데이터 프로젝트에 더하도록 돕습니다.
genbi
18k에이전트가 Wren 데이터 프로젝트를 공유 가능한 브라우저 대시보드로 바꾸고, 사용자의 호스팅 계정에 배포하도록 돕습니다.
generate-mdl
18k에이전트가 데이터베이스 스키마를 탐색하고, 타입을 정리하고, YAML 파일을 생성해 Wren 시맨틱 프로젝트를 만들도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.