界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

wren-ai

wren-ai

【数据与研究】Use WrenAI and Wren Engine for governed semantic SQL, MDL projects, data-context memory, agent workflow guides, GenBI dashboards, MCP tools, browser WASM queries, framework SDKs, and repository development.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: wren-ai description: "Use WrenAI and Wren Engine for governed semantic SQL, MDL projects, data-context memory, agent workflow guides, GenBI dashboards, MCP tools, browser WASM queries, framework SDKs, and repository development." disable-model-invocation: true metadata: disco-role: operating license: NOASSERTION

WrenAI

Use this skill for WrenAI, the wrenai Python distribution, the wren CLI, wren_core, wren-langchain, wren-pydantic, or @wrenai/wren-core-wasm. It covers the semantic layer that turns SQL written against modeled objects into target-database SQL, plus the project context and agent-facing workflows around it.

Start Here

  1. Install only the components required by the requested workflow:
    pip install wrenai
    # Add one datasource extra only when needed, for example:
    pip install "wrenai[postgres]"
    
  2. Verify the public CLI before relying on a project:
    wren --version
    wren --help
    
  3. If a task needs a Wren project, verify that wren_project.yml and target/mdl.json exist. Build the target after changing source YAML:
    wren context validate
    wren context build
    
  4. Route to the owning sub-skill before giving detailed commands. Wren workflows are order-sensitive: profile/project setup precedes query execution, and model/knowledge changes precede re-indexing or deployment.

Route by Task

  • Projects, profiles, MDL, connections, dbt/OSI import, or type mapping: read sub-skills/cli-projects/SKILL.md.
  • SQL queries, dry plans, dry runs, cubes, connectors, policies, or the Python WrenEngine: read sub-skills/query-engine/SKILL.md.
  • Business rules, knowledge/, query memory, semantic retrieval, recall, stored NL→SQL pairs, or context enrichment: read sub-skills/memory-knowledge/SKILL.md.
  • wren skills, agent onboarding/generation guides, wren ask, dlt/SaaS ingestion, or authoring a CLI-served Wren guide: read sub-skills/agent-workflows/SKILL.md.
  • GenBI apps, Vercel/Cloudflare deployment, wren serve mcp, MCP tools, or browser-side WebAssembly: read sub-skills/genbi-mcp-wasm/SKILL.md.
  • LangChain, LangGraph, Pydantic AI, WrenToolkit, or agent-tool contracts: read sub-skills/sdk-integrations/SKILL.md.
  • wren_core, Rust/PyO3/WASM maintenance, local engine builds, tests, or contributor policy: read sub-skills/engine-development/SKILL.md.

Core Operating Rules

  • Treat the Wren project as portable business context: MDL source, knowledge/, and the compiled target/mdl.json serve different roles. Do not confuse the project-level catalog/schema namespace with a model's physical database table_reference.
  • Profiles hold connection values and should use ${ENV_VAR} placeholders; do not put credentials in project YAML, shell-history flags, agent prompts, or static GenBI files.
  • Write SQL against Wren models and views. For complex or costly work, run wren dry-plan first; use wren dry-run only when a live database validation is intended.
  • Prefer wren cube query for covered aggregation questions. It constrains measure, dimension, time-grain, and filter choices instead of requiring an agent to invent GROUP BY and date logic.
  • Treat knowledge/sql/ as the source of truth for accepted NL→SQL pairs. A LanceDB index is derived state and may be rebuilt; do not delete source knowledge just to repair the index.
  • Keep GenBI deployment credentials server-side or in environment files. A static app is public to its viewers, so a successful deploy is not proof that it is safe or publicly reachable.
  • Optional datasource, memory, MCP, UI, Rust, Node, and browser features must be named explicitly before use. Do not assume wrenai[all] or a database service is installed.

Shared References and Helper

  • Read references/overview.md for the architecture and package map before crossing CLI, SDK, MCP, and WASM boundaries.
  • Read references/install-and-extras.md when choosing a public install command or diagnosing optional dependencies.
  • Read references/troubleshooting.md for cross-cutting installation, profile, project-discovery, dependency, and credential issues.
  • Read references/repo-provenance.md before relying on this skill for a new checkout or deciding whether to refresh it.
  • Run scripts/check_wren_environment.py for a safe public import/CLI check; it does not connect to a database or write a project.

Avoid

  • Do not run wren query against an unreviewed production profile merely to discover schema. Start with project inspection, wren context show, memory context, or a dry plan.
  • Do not pass secrets through --connection-info, GenBI deploy arguments, or static app files when an environment-backed profile is available.
  • Do not treat an optional service connector, semantic-memory stack, MCP server, or WebAssembly build as verified merely because the base package imports.
  • Do not use repository maintainer build commands for ordinary package-user workflows; route those tasks to engine-development.
我的收藏