본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트18k · #10729

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Canner/WrenAI/blob/main/core/wren/src/wren/skills_content/usage/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지난 분기에 새 고객이 몇 명이었고, 그 전 분기와 비교하면 어떤지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 에이전트가 설치를 확인하고, 프로젝트의 스키마와 과거 쿼리를 읽고, 시맨틱 모델을 통해 SQL을 쓰고, 실행해서 결과를 보여 주도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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"
    
    # 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]"
    
  5. 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.json via wren 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:

  1. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬