npx skills add https://github.com/astronomer/agents --skill analyzing-data通过查询数据仓库来回答业务问题。内核在首次调用 exec 时自动启动。
以下所有 CLI 命令均相对于此技能的目录。 在运行任何 scripts/cli.py 命令之前,请先 cd 到包含此文件的目录。
模式查找 — 检查缓存的查询策略:
uv run scripts/cli.py pattern lookup "<用户的问题>"
如果存在模式,则遵循其策略。执行后记录结果:
uv run scripts/cli.py pattern record <名称> --success # 或 --failure
2. 概念查找 — 查找已知的表映射:
uv run scripts/cli.py concept lookup <概念>
3. 表发现 — 如果缓存未命中,则搜索代码库 () 或查询 。请参阅 。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Grep pattern="<概念>" glob="**/*.sql"INFORMATION_SCHEMA执行查询:
uv run scripts/cli.py exec "df = run_sql('SELECT ...')"
uv run scripts/cli.py exec "print(df)"
缓存学习成果 — 在呈现结果前始终进行缓存:
# 缓存概念 → 表映射
uv run scripts/cli.py concept learn <概念> <TABLE> -k <KEY_COL>
# 缓存查询策略(如果需要发现)
uv run scripts/cli.py pattern learn <名称> -q "问题" -s "步骤" -t "TABLE" -g "注意事项"
向用户呈现发现结果。
| 函数 | 返回 |
|---|---|
run_sql(query, limit=100) | Polars DataFrame |
run_sql_pandas(query, limit=100) | Pandas DataFrame |
pl (Polars) 和 pd (Pandas) 已预导入。
uv run scripts/cli.py warehouse list # 列出数据仓库
uv run scripts/cli.py start [-w 名称] # 启动内核(可选指定数据仓库)
uv run scripts/cli.py exec "..." # 执行 Python 代码
uv run scripts/cli.py status # 内核状态
uv run scripts/cli.py restart # 重启内核
uv run scripts/cli.py stop # 停止内核
uv run scripts/cli.py install <包名> # 安装包
uv run scripts/cli.py concept lookup <名称> # 查找
uv run scripts/cli.py concept learn <名称> <TABLE> -k <KEY_COL> # 学习
uv run scripts/cli.py concept list # 列出所有
uv run scripts/cli.py concept import -p /path/to/warehouse.md # 批量导入
uv run scripts/cli.py pattern lookup "问题" # 查找
uv run scripts/cli.py pattern learn <名称> -q "..." -s "..." -t "TABLE" -g "注意事项" # 学习
uv run scripts/cli.py pattern record <名称> --success # 记录结果
uv run scripts/cli.py pattern list # 列出所有
uv run scripts/cli.py pattern delete <名称> # 删除
uv run scripts/cli.py table lookup <TABLE> # 查找模式
uv run scripts/cli.py table cache <TABLE> -c '[...]' # 缓存模式
uv run scripts/cli.py table list # 列出已缓存的
uv run scripts/cli.py table delete <TABLE> # 删除
uv run scripts/cli.py cache status # 统计信息
uv run scripts/cli.py cache clear [--stale-only] # 清除
每周安装量
400
仓库
GitHub 星标数
269
首次出现
2026年1月23日
安全审计
安装于
opencode294
codex287
github-copilot285
cursor279
gemini-cli270
claude-code245
Answer business questions by querying the data warehouse. The kernel auto-starts on first exec call.
All CLI commands below are relative to this skill's directory. Before running any scripts/cli.py command, cd to the directory containing this file.
Pattern lookup — Check for a cached query strategy:
uv run scripts/cli.py pattern lookup "<user's question>"
If a pattern exists, follow its strategy. Record the outcome after executing:
uv run scripts/cli.py pattern record <name> --success # or --failure
2. Concept lookup — Find known table mappings:
uv run scripts/cli.py concept lookup <concept>
3. Table discovery — If cache misses, search the codebase (Grep pattern="<concept>" glob="**/*.sql") or query INFORMATION_SCHEMA. See reference/discovery-warehouse.md.
Execute query :
uv run scripts/cli.py exec "df = run_sql('SELECT ...')"
uv run scripts/cli.py exec "print(df)"
Cache learnings — Always cache before presenting results:
# Cache concept → table mapping
uv run scripts/cli.py concept learn <concept> <TABLE> -k <KEY_COL>
# Cache query strategy (if discovery was needed)
uv run scripts/cli.py pattern learn <name> -q "question" -s "step" -t "TABLE" -g "gotcha"
Present findings to user.
| Function | Returns |
|---|---|
run_sql(query, limit=100) | Polars DataFrame |
run_sql_pandas(query, limit=100) | Pandas DataFrame |
pl (Polars) and pd (Pandas) are pre-imported.
uv run scripts/cli.py warehouse list # List warehouses
uv run scripts/cli.py start [-w name] # Start kernel (with optional warehouse)
uv run scripts/cli.py exec "..." # Execute Python code
uv run scripts/cli.py status # Kernel status
uv run scripts/cli.py restart # Restart kernel
uv run scripts/cli.py stop # Stop kernel
uv run scripts/cli.py install <pkg> # Install package
uv run scripts/cli.py concept lookup <name> # Look up
uv run scripts/cli.py concept learn <name> <TABLE> -k <KEY_COL> # Learn
uv run scripts/cli.py concept list # List all
uv run scripts/cli.py concept import -p /path/to/warehouse.md # Bulk import
uv run scripts/cli.py pattern lookup "question" # Look up
uv run scripts/cli.py pattern learn <name> -q "..." -s "..." -t "TABLE" -g "gotcha" # Learn
uv run scripts/cli.py pattern record <name> --success # Record outcome
uv run scripts/cli.py pattern list # List all
uv run scripts/cli.py pattern delete <name> # Delete
uv run scripts/cli.py table lookup <TABLE> # Look up schema
uv run scripts/cli.py table cache <TABLE> -c '[...]' # Cache schema
uv run scripts/cli.py table list # List cached
uv run scripts/cli.py table delete <TABLE> # Delete
uv run scripts/cli.py cache status # Stats
uv run scripts/cli.py cache clear [--stale-only] # Clear
Weekly Installs
400
Repository
GitHub Stars
269
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode294
codex287
github-copilot285
cursor279
gemini-cli270
claude-code245
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
42,600 周安装
Vite Flare Starter:开箱即用的全栈Cloudflare应用模板,集成React 19、Hono、D1
375 周安装
VectorBT + OpenAlgo Python回测环境一键配置指南 | 量化交易开发
375 周安装
Turso数据库测试指南:SQL兼容性、Rust集成与模糊测试方法详解
375 周安装
LLM硬件模型匹配器:自动检测系统配置,推荐最佳LLM模型,支持GPU/CPU/量化
375 周安装
MySQL数据库管理、优化与开发实战指南 - 生产环境技能全解析
375 周安装
Cosmos dbt Core 集成指南:Airflow 中运行 dbt 任务的完整配置清单
376 周安装