Skip to main content

AI-native data analysis skill. Connect Excel/CSV/MySQL/PostgreSQL, understand business semantics, query with natural language.

Project description

lucid-skill

AI-native data analysis skill. Connect Excel, CSV, MySQL, PostgreSQL — understand business semantics, query with SQL.

No API key required. No LLM inside — the AI agent is the brain; lucid-skill is the hands.


Features

  • Multi-source: Excel (.xlsx/.xls), CSV, MySQL, PostgreSQL — all unified into SQL
  • Semantic Layer: Define business meanings for tables and columns; persist as YAML, Git-friendly
  • JOIN Discovery: Automatically find join paths between tables (direct + indirect)
  • Domain Clustering: Auto-group tables into business domains
  • Embedding Search: Optional multilingual vector search for table discovery
  • Read-only Safety: Only SELECT allowed — mutating SQL is blocked at the engine level

Install

pip install lucid-skill

# Or with uv (recommended for OpenClaw)
uv tool install lucid-skill

# Optional: database drivers
pip install "lucid-skill[db]"       # MySQL + PostgreSQL

# Optional: embedding search
pip install "lucid-skill[embedding]" # sentence-transformers

Quick Start

# Connect a data source
lucid-skill connect csv /path/to/sales.csv

# Explore schema and semantics
lucid-skill init-semantic

# Search tables by business meaning
lucid-skill search "销售额 客户"

# Query with SQL
lucid-skill query "SELECT product, SUM(amount) FROM sales GROUP BY product ORDER BY 2 DESC LIMIT 10"

Architecture

Agent ──→ lucid-skill CLI ──→ Connectors (Excel/CSV/MySQL/PG)
                │                      │
                ├── Catalog (DuckDB)   └── DuckDB (in-memory query engine)
                └── Semantic Store (YAML)
  • No LLM inside — lucid-skill provides data access; the AI agent handles reasoning
  • DuckDB unified — catalog storage + query engine, single dependency, no compilation needed
  • Semantic persistence — YAML definitions survive restarts, shareable via Git

Supported Data Sources

Type Format Notes
Excel .xlsx, .xls Multiple sheets supported
CSV .csv Auto-detects encoding and delimiter
MySQL 5.7+ / 8.0+ Reads foreign keys and column comments (pip install lucid-skill[db])
PostgreSQL 12+ Reads foreign keys and column comments (pip install lucid-skill[db])

Environment Variables

Variable Default Description
LUCID_DATA_DIR ~/.lucid-skill/ Data directory (catalog, semantic store, models)
LUCID_EMBEDDING_ENABLED false Enable vector search (~460 MB model download on first use)

Security

  • Read-only: Only SELECT / WITH statements are allowed; all mutating SQL is blocked
  • No credentials stored: Database passwords are never written to disk
  • Local only: All data stays on your machine

MCP Server Mode

lucid-skill also works as an MCP Server for platforms that support it:

lucid-skill serve

Development

git clone https://github.com/WiseriaAI/lucid-skill
cd lucid-skill
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lucid_skill-2.0.0.tar.gz (47.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lucid_skill-2.0.0-py3-none-any.whl (58.8 kB view details)

Uploaded Python 3

File details

Details for the file lucid_skill-2.0.0.tar.gz.

File metadata

  • Download URL: lucid_skill-2.0.0.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for lucid_skill-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3d25846304be7857e3d178c6a245cc763fca4de472583d7e6cc87a965c6bd7ac
MD5 f883e8d780b0276e45ee851214cb7bb3
BLAKE2b-256 4cf561b74ec0ecc4e709a2f2e71cd8d382ae769b3cdede13773daa4037146043

See more details on using hashes here.

File details

Details for the file lucid_skill-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: lucid_skill-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for lucid_skill-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a3e0ea8aa2a756a3af10b50ce23f3d7c8356f5a283d6fbd2e9634c1ef6bd488
MD5 c385d25841cc46e2ec74345be56808b4
BLAKE2b-256 7d1ae4ee0bba52ef8dc4a60898df0be909b197d9b505306efd6a2cc816f29aba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page