Token导航 LogoToken导航

Agent Skill · 研究检索

databricks-cli(databricks CLI 搜索)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

databricks-cli 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 64,959。

总安装 291周安装 12GitHub Stars 2下载 95核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:databricks-cli(databricks CLI 搜索)
来源仓库:https://github.com/bmsuisse/skills
仓库路径:skills/databricks-cli
安装命令:
npx skills add https://github.com/bmsuisse/skills --skill databricks-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bmsuisse/skills --skill databricks-cli

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

作为 Databricks 核心 CLI 操作和数据探索的基础技能。支持认证管理、工作区切换及专用产品技能调用(如 jobs、pipelines)。必须安装 v0.292.0+ 版本的 databricks CLI 方可正常使用。推荐优先使用 MCP 工具而非直接编辑 ~/.databrickscfg 文件。

databricks-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/databricks-cli

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bmsuisse/skills --skill databricks-cli;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

databricks-cli 怎么安装?

在终端执行 npx skills add https://github.com/bmsuisse/skills --skill databricks-cli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

databricks-cli 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

databricks-cli 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/bmsuisse/skills --skill databricks-cli 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

databricks-cli 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

databricks-cli 用的人多吗?

公开数据是累计安装 291 次,近一周安装 12 次,下载 95 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

databricks-cli 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
databricks-cli

databricks CLI 搜索 · 本页

2912执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Databricks

Core skill for Databricks CLI, authentication, and data exploration.

Product Skills

For specific products, use dedicated skills:

  • databricks-jobs - Lakeflow Jobs development and deployment
  • databricks-pipelines - Lakeflow Spark Declarative Pipelines (batch and streaming data pipelines)
  • databricks-apps - Full-stack TypeScript app development and deployment
  • databricks-lakebase - Lakebase Postgres Autoscaling project management

Prerequisites

  1. CLI installed: Run databricks --version to check.

- If the CLI is missing or outdated (< v0.292.0): STOP. Do not proceed or work around a missing CLI. - Read the CLI Installation reference file and follow the instructions to guide the user through installation. - Note: In sandboxed environments (Cursor IDE, containers), install commands write outside the workspace and may be blocked. Present the install command to the user and ask them to run it in their own terminal.

  1. Authenticated: databricks auth profiles

- If not: see CLI Authentication

Profile Selection - CRITICAL

NEVER auto-select a profile.

  1. List profiles: databricks auth profiles
  2. Present ALL profiles to user with workspace URLs
  3. Let user choose (even if only one exists)
  4. Offer to create new profile if needed

Claude Code - IMPORTANT

Each Bash command runs in a separate shell session.

# WORKS: --profile flag
databricks apps list --profile my-workspace

# WORKS: chained with &&
export DATABRICKS_CONFIG_PROFILE=my-workspace && databricks apps list

# DOES NOT WORK: separate commands
export DATABRICKS_CONFIG_PROFILE=my-workspace
databricks apps list  # profile not set!

Data Exploration — Use AI Tools

Use these instead of manually navigating catalogs/schemas/tables:

# discover table structure (columns, types, sample data, stats)
databricks experimental aitools tools discover-schema catalog.schema.table --profile <PROFILE>

# run ad-hoc SQL queries
databricks experimental aitools tools query "SELECT * FROM table LIMIT 10" --profile <PROFILE>

# find the default warehouse
databricks experimental aitools tools get-default-warehouse --profile <PROFILE>

See Data Exploration for details.

Quick Reference

⚠️ CRITICAL: Some commands use positional arguments, not flags

# current user
databricks current-user me --profile <PROFILE>

# list resources
databricks apps list --profile <PROFILE>
databricks jobs list --profile <PROFILE>
databricks clusters list --profile <PROFILE>
databricks warehouses list --profile <PROFILE>
databricks pipelines list --profile <PROFILE>
databricks serving-endpoints list --profile <PROFILE>

# ⚠️ Unity Catalog — POSITIONAL arguments (NOT flags!)
databricks catalogs list --profile <PROFILE>

# ✅ CORRECT: positional args
databricks schemas list <CATALOG> --profile <PROFILE>
databricks tables list <CATALOG> <SCHEMA> --profile <PROFILE>
databricks tables get <CATALOG>.<SCHEMA>.<TABLE> --profile <PROFILE>

# ❌ WRONG: these flags/commands DON'T EXIST
# databricks schemas list --catalog-name <CATALOG>    ← WILL FAIL
# databricks tables list --catalog <CATALOG>           ← WILL FAIL
# databricks sql-warehouses list                       ← doesn't exist, use `warehouses list`
# databricks execute-statement                         ← doesn't exist, use `experimental aitools tools query`
# databricks sql execute                               ← doesn't exist, use `experimental aitools tools query`

# When in doubt, check help:
# databricks schemas list --help

# get details
databricks apps get <NAME> --profile <PROFILE>
databricks jobs get --job-id <ID> --profile <PROFILE>
databricks clusters get --cluster-id <ID> --profile <PROFILE>

# bundles
databricks bundle init --profile <PROFILE>
databricks bundle validate --profile <PROFILE>
databricks bundle deploy -t <TARGET> --profile <PROFILE>
databricks bundle run <RESOURCE> -t <TARGET> --profile <PROFILE>

Clusters

Default: general-purpose

Use for all standard workloads (data exploration, SQL, non-GPU notebooks).

ItemValue
Cluster ID*(look up via databricks clusters list --profile <PROFILE>)*
Runtime17.3 LTS (Spark 4.0.0, Scala 2.13)
Worker typeStandard_D8ads_v5 (32 GB, 8 cores)
Autoscaling1–12 workers
Idle termination60 min
Access modeStandard
Unity Catalog✓

GPU/ML: machine-learning (gpu)

Use for GPU-accelerated training, inference, and embedding workloads.

ItemValue
Cluster ID0303-075313-aono4t6a
Runtime17.3 LTS (Spark 4.0.0, Scala 2.13)
Node typeStandard_NV36ads_A10_v5 (440 GB, 1× A10 GPU, 36 cores)
ModeSingle node
Idle termination60 min
Access modeDedicated — bms_dev
Unity Catalog✓

Running Notebooks on the Cluster

Upload a local .py notebook to the Databricks workspace and execute it on the cluster via the generic runner job, with automatic error fixing and retry.

Default cluster: general-purpose — use machine-learning (gpu) only when GPU acceleration is needed.

Config

ItemValue
Profilepremium
Runner job ID194658749253431
Workspace base/Users/dominik.peter@bmsuisse.ch/AIActionPlan/notebooks/
Cluster ID (default)*(general-purpose — see Clusters section above)*
Cluster ID (GPU)0303-075313-aono4t6a
Max retries3

Steps

1. Derive workspace path — strip .py, keep filename:

local:     notebooks/3.1-sales-visit-scoring.py
workspace: /Users/dominik.peter@bmsuisse.ch/AIActionPlan/notebooks/3.1-sales-visit-scoring

2. Upload:

databricks workspace import "<WORKSPACE_PATH>" \
  --file "<LOCAL_PATH>" --format SOURCE --language PYTHON \
  --overwrite --profile premium

3. Trigger:

databricks jobs run-now --profile premium --json '{
  "job_id": 194658749253431,
  "notebook_params": {"notebook_path": "<WORKSPACE_PATH>"}
}'

Capture both the top-level run_id and tasks[0].run_id (task run ID) from the response.

4. Check result — look at state.result_state: SUCCESS → done, FAILED → fix and retry.

5. Fetch error using the task run_id:

databricks api get "/api/2.1/jobs/runs/get-output" \
  --profile premium --json '{"run_id": <TASK_RUN_ID>}'

Read error (short) and error_trace (full traceback).

6. Fix and retry — read the local notebook, fix the root cause, re-upload, rerun. After 3 failed attempts stop and explain what was tried.

Common error fixes

ErrorFix
ModuleNotFoundErrorAdd %pip install <pkg> at top of notebook
Table not foundVerify with SQL query below
KeyError / ColumnNotFoundInspect schema with SQL
FileNotFoundError (DBFS)Verify path on DBFS
Syntax errorFix the offending line

Ad-hoc Job Submit

Run a notebook (or Python script already uploaded to the workspace) directly as a one-time job — no runner job wrapper needed.

⚠️ The CLI uses a tasks array, not top-level existing_cluster_id / notebook_task.

databricks jobs submit --profile premium --json '{
  "run_name": "my_ad_hoc_run",
  "tasks": [{
    "task_key": "main",
    "existing_cluster_id": "<CLUSTER_ID>",
    "notebook_task": {
      "notebook_path": "<WORKSPACE_PATH>",
      "base_parameters": {"sample": "500", "epochs": "1"}
    }
  }]
}'

Capture the run_id from the response, then poll and fetch output the same way as the runner job (steps 4–6 above).

For Python scripts (not notebooks), use spark_python_task instead:

databricks jobs submit --profile premium --json '{
  "run_name": "my_script_run",
  "tasks": [{
    "task_key": "main",
    "existing_cluster_id": "<CLUSTER_ID>",
    "spark_python_task": {
      "python_file": "<WORKSPACE_PATH>.py",
      "parameters": ["--sample", "500"]
    }
  }]
}'

Scripts

All scripts are accessed through the single entrypoint scripts/cli.py. run.py and metadata.py are libraries — do not invoke them directly.

uv run scripts/cli.py <subcommand> [flags]

run — Execute code on a cluster

Opens an execution context, runs Python or SQL, polls for the result, prints output, and cleans up.

# Python — inline
uv run scripts/cli.py run \
  --profile premium \
  --cluster-id <CLUSTER_ID> \
  --lang python \
  --code "print(spark.version)"

# Python — from a local file (language inferred from .py extension)
uv run scripts/cli.py run \
  --profile premium \
  --cluster-id <CLUSTER_ID> \
  --file path/to/script.py

# SQL
uv run scripts/cli.py run \
  --profile premium \
  --cluster-id <CLUSTER_ID> \
  --lang sql \
  --code "SELECT * FROM catalog.schema.table LIMIT 10"

# Pass arguments to a Python script (injected as ARGS dict)
uv run scripts/cli.py run \
  --profile premium \
  --cluster-id <CLUSTER_ID> \
  --file migrate.py \
  --args '{"catalog": "prod", "dry_run": true}'

Inside the script, read from ARGS instead of sys.argv:

catalog = ARGS["catalog"]
dry_run = ARGS.get("dry_run", False)

Flags

FlagDefaultDescription
--profile*(required)*Databricks CLI profile
--cluster-id*(required)*Cluster to run on
--langinferred from file extpython \sql \r \scala
--code—Inline code string (mutually exclusive with --file)
--file—Local script file
--args—JSON dict injected as ARGS variable (Python only)
--formattexttext \markdown (renders SQL results as a table)
--poll-interval2.0Seconds between status polls
--no-destroyoffKeep context open after run

Stdout goes to stdout; errors and tracebacks go to stderr with a non-zero exit code.

tables — List tables in a schema

uv run scripts/cli.py tables \
  --profile premium \
  --catalog <CATALOG> \
  --schema <SCHEMA>

Outputs a markdown table with fully qualified name, table type, and description. No cluster needed.

describe — Full metadata for a table

uv run scripts/cli.py describe \
  --profile premium \
  <CATALOG.SCHEMA.TABLE>

Outputs table type, owner, comment, and a column-level table with types, nullability, and per-column descriptions. No cluster needed.

search — Find tables by keyword

# Search across all catalogs
uv run scripts/cli.py search --profile premium <KEYWORD>

# Restrict to a specific catalog
uv run scripts/cli.py search --profile premium <KEYWORD> --catalog <CATALOG>

Queries system.information_schema.tables via experimental aitools tools query. No cluster needed.

Running SQL on the Cluster

Use the execution context API to run SQL directly on the cluster — full Spark + Unity Catalog access, no separate warehouse needed. Prefer this over the SQL warehouse when debugging notebook errors (same Spark session, sees temp views and uncommitted Delta writes).

Use general-purpose for standard SQL; use machine-learning (gpu) (0303-075313-aono4t6a) for GPU workloads.

# 1. Create context (use general-purpose cluster ID; swap for GPU cluster if needed)
databricks api post /api/1.2/contexts/create --profile premium \
  --json '{"clusterId": "<CLUSTER_ID>", "language": "python"}'

# 2. Execute (use spark.sql() for SQL, or any Python)
databricks api post /api/1.2/commands/execute --profile premium --json '{
  "clusterId": "<CLUSTER_ID>",
  "contextId": "<CONTEXT_ID>",
  "language": "python",
  "command": "spark.sql(\"SELECT * FROM transf.sales LIMIT 5\").show(truncate=False)"
}'

# 3. Poll until status = Finished
databricks api get /api/1.2/commands/status --profile premium --json '{
  "clusterId": "0303-075313-aono4t6a",
  "contextId": "<CONTEXT_ID>",
  "commandId": "<COMMAND_ID>"
}'

Useful diagnostic queries:

spark.sql("DESCRIBE EXTENDED <catalog>.<schema>.<table>").show(truncate=False)
spark.sql("SELECT * FROM <table> LIMIT 10").show(truncate=False)
spark.sql("SHOW TABLES IN <schema>").show()

Troubleshooting

ErrorSolution
cannot configure default credentialsUse --profile flag or authenticate first
PERMISSION_DENIEDCheck workspace/UC permissions
RESOURCE_DOES_NOT_EXISTVerify resource name/id and profile

Required Reading by Task

TaskREAD BEFORE proceeding
First time setupCLI Installation
Auth issues / new workspaceCLI Authentication
Exploring tables/schemasData Exploration
Deploying jobs/pipelinesAsset Bundles

Reference Guides

平台分布

Codex

35.16%
按下载量换算33

Claude

29.31%
按下载量换算28

Cursor

19.32%
按下载量换算18

Gemini CLI

10.62%
按下载量换算10

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/bmsuisse/skills --skill databricks-cli 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills