chatbi-mvp

chatbi-mvp is a skill for Claude Code, Codex from yugef3h/leo-skills. It costs 61 tokens per session (1,413 once invoked), scanned A, original, MIT.

A design guide for building a ChatBI system, where people ask data questions in everyday language and receive database results, charts, and AI-generated insights. BI means business intelligence: using data to understand a business.

In plain words
What is it for?
Use it to plan or build conversational data tools with natural-language-to-SQL, follow-up questions, a knowledge base, visualizations, and attribution of results.
Why use it?
It separates business terms from physical database names, making generated queries easier to control and translate safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan or build conversational data tools with natural-language-to-SQL, follow-up questions, a knowledge base, visualizations, and attribution of results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yugef3h/leo-skills/chatbi-mvp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yugef3h/leo-skills --skill chatbi-mvp
Clone the repo
git clone --depth 1 https://github.com/yugef3h/leo-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chatbi-mvp

README.md
[![agentmods](https://agentmods.dev/badge/skills/yugef3h/leo-skills/chatbi-mvp/github.svg)](https://agentmods.dev/skills/yugef3h/leo-skills/chatbi-mvp)
Your own site
<a href="https://agentmods.dev/skills/yugef3h/leo-skills/chatbi-mvp"><img src="https://agentmods.dev/badge/skills/yugef3h/leo-skills/chatbi-mvp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chatbi-mvp

Your own site · 80×15
<a href="https://agentmods.dev/skills/yugef3h/leo-skills/chatbi-mvp"><img src="https://agentmods.dev/badge/skills/yugef3h/leo-skills/chatbi-mvp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01413
Opus 5 $0.00030 $0.00707
Sonnet 5 $0.00012 $0.00283
Haiku 4.5 $0.00006 $0.00141

Measured 12d ago against content hash 30d12f88c1e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

chatbi-mvp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/chatbi-mvp/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ChatBI MVP Architecture

Overview

Build a ChatBI system: user asks questions in natural language → system generates SQL → executes → displays interactive charts with AI insights.

Architecture: NL → S2SQL (semantic SQL / MQL) → Physical SQL. LLM generates S2SQL using business terms (bizName), a deterministic Translator converts to physical SQL. LLM never touches physical table/column names.

Tech stack assumed: React (frontend) + Python/FastAPI (backend). Architecture is language-agnostic.

Five Core Layers

User: "最近7天各分区播放量怎么样"
         │
         ▼
┌─ Layer 3: RAG ────────────────┐  Trie + Embedding recall
│  "播放量" → views (metric)     │  Identify schema elements
│  "分区"   → category (dim)     │  in user query
│  "最近7天" → DateConf{-7d}     │
└───────────────┬───────────────┘
                │
                ▼
┌─ Layer 1: NL → S2SQL → SQL ──┐  5-stage pipeline
│  MAPPING → PARSING →          │  LLM generates S2SQL (bizName)
│  CORRECTING → TRANSLATING     │  Translator → physical SQL
│  → EXECUTE                    │
└───────────────┬───────────────┘
                │
        ┌───────┴───────┐
        ▼               ▼
┌─ Layer 2 ───┐  ┌─ Layer 5 ──────────┐
│ Multi-turn   │  │ Attribution         │
│ Context save │  │ LLM summary + YoY   │
│ + LLM rewrite│  │ + drill-down recs   │
└──────────────┘  └─────────────────────┘
        │               │
        └───────┬───────┘
                ▼
┌─ Layer 4: Visualization ──────┐
│  Auto chart type → ECharts    │
│  User can toggle chart/table  │
│  Drill-down → re-query        │
└───────────────────────────────┘

File Index

This skill is split into focused files. Read in order, or jump to what you need.

Core Architecture (read first)

File Contents When to read
data-models.md All shared POJOs: SemanticSchema, SchemaMapInfo, SemanticParseInfo, QueryResult Always start here — these connect every layer
nl2sql-pipeline.md Layer 1 in detail: 5-stage pipeline, prompt template, self-consistency, corrector chain, S2SQL→physical translator Core of the system
wiring.md How all layers connect: full request flow, plugin registration, DB tables When you need to see the big picture

Read the full file on GitHub · 115 lines

Files

What ships with it

11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 115 lines · 61 tokens per session scan A 30d12f88c1e7

Subscribe to this mod's changes

chatbi-mvp is a skill published in the GitHub repository yugef3h/leo-skills (11 stars, last pushed 5d ago), licensed MIT. It adds 61 tokens to every session and 1,413 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

doc-parse

A document parser that converts PDFs, PowerPoint files, spreadsheets, and Word files into structured Markdown with metadata and a confidence score.

anbeime/skill · 43 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

rag-architect

Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines, applying reranking, and evaluating retrieval quality. Use when building RAG systems, vector databases, or knowledge-grounded AI applications requiring semantic…

Jeffallan/claude-skills · 73 tokens

convex-agent

Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.

openclaw/clawhub · 25 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens