From databricks-skills
Build apps on Databricks Apps platform. Use when asked to create dashboards, data apps, analytics tools, or visualizations. Evaluates data access patterns (analytics vs Lakebase synced tables) before scaffolding. Invoke BEFORE starting implementation.
npx claudepluginhub databricks/databricks-agent-skillsThis skill uses the workspace's default tool permissions.
**FIRST**: Use the parent `databricks-core` skill for CLI basics, authentication, and profile selection.
agents/openai.yamlassets/databricks.pngassets/databricks.svgreferences/appkit/appkit-sdk.mdreferences/appkit/files.mdreferences/appkit/frontend.mdreferences/appkit/genie.mdreferences/appkit/jobs.mdreferences/appkit/lakebase.mdreferences/appkit/model-serving.mdreferences/appkit/overview.mdreferences/appkit/proto-contracts.mdreferences/appkit/proto-first.mdreferences/appkit/sql-queries.mdreferences/appkit/trpc.mdreferences/other-frameworks.mdreferences/platform-guide.mdreferences/testing.mdBuilds Python Databricks apps with Streamlit, Dash, Gradio, Flask, FastAPI, or Reflex, handling OAuth, SQL/Lakebase connectivity, model serving, LLMs, and deployment.
Create, configure, validate, deploy, run, and manage DABs — Declarative Automation Bundles (formerly Databricks Asset Bundles) — for Databricks resources including dashboards, jobs, pipelines, alerts, volumes, and apps
Manages Microsoft Fabric workspaces/lakehouses, develops PySpark notebooks/data pipelines/orchestration, provisions infrastructure as code for Spark workflows.
Share bugs, ideas, or general feedback.
FIRST: Use the parent databricks-core skill for CLI basics, authentication, and profile selection.
Build apps that deploy to Databricks Apps platform.
| Phase | READ BEFORE proceeding |
|---|---|
| Scaffolding | ⚠️ STOP — complete the Data Access Decision Gate below before scaffolding. Parent databricks-core skill (auth, warehouse discovery); then run databricks apps manifest + databricks apps init with --features and --set (see AppKit section below) |
| Writing SQL queries | SQL Queries Guide |
| Writing UI components | Frontend Guide |
Using useAnalyticsQuery | AppKit SDK |
| Adding API endpoints | tRPC Guide |
| Using Lakebase (OLTP database) | Lakebase Guide |
| Adding Genie chat / Genie-powered apps | Genie Guide — follow the Genie agent workflow below |
| Using Model Serving (ML inference) | Model Serving Guide |
| Typed data contracts (proto-first design) | Proto-First Guide and Plugin Contracts |
| Managing files in UC Volumes | Files Guide |
| Triggering / monitoring Lakeflow Jobs from the app | Jobs Guide |
| Platform rules (permissions, deployment, limits) | Platform Guide — READ for ALL apps including AppKit |
| Non-AppKit app (Streamlit, FastAPI, Flask, Gradio, Next.js, etc.) | Other Frameworks |
databricks apps validate --profile <PROFILE> before deploying.tests/smoke.spec.ts selectors BEFORE running validation. Default template checks for "Minimal Databricks App" heading and "hello world" text — these WILL fail in your custom app. See testing guide.databricks-core skill.databricks apps init --features analytics)client/src/App.tsx — main React component (start here)config/queries/*.sql — SQL query files (queryKey = filename without .sql)server/server.ts — backend entry (tRPC routers)tests/smoke.spec.ts — smoke test (⚠️ MUST UPDATE selectors for your app)client/src/appKitTypes.d.ts — auto-generated types (npm run typegen)databricks apps init --features lakebase)server/server.ts — backend with Lakebase pool + tRPC routesclient/src/App.tsx — React frontendapp.yaml — manifest with database resource declarationpackage.json — includes @databricks/lakebase dependencyconfig/queries/ — Lakebase apps use pool.query() in tRPC, not SQL filesBefore writing any SQL, use the parent databricks-core skill for data exploration — search information_schema by keyword, then batch discover-schema for the tables you need. Do NOT skip this step.
Data Access Decision Gate (REQUIRED before scaffolding):
If the app reads from Unity Catalog / lakehouse tables, you MUST show the comparison below to the user and ask them to choose. Do not skip this. Do not choose for them.
| (A) Lakebase synced tables | (B) Analytics | |
|---|---|---|
| Speed | Sub-second responses | Takes a few seconds |
| Best for | Search, lookups, catalogs, real-time data, operational apps | Dashboards, charts, aggregations, KPIs |
| How it works | Data synced from Delta into Lakebase Postgres | Queries run on SQL warehouse at read time |
After showing the table, add a brief recommendation. Default to recommending Lakebase synced tables (A) unless the use case is clearly about aggregations, charts, or dashboards where seconds of latency is acceptable. For lookups, searches, serving data to users, or any interactive use case, recommend Lakebase synced tables. Always let the user make the final call.
After the user chooses:
--features lakebase. See Lakebase Guide for full workflow.--features analytics.--features analytics,lakebase if the app needs both patterns.--features flag.Analytics apps (--features analytics):
config/queries/npm run typegen — verify all queries show ✓client/src/appKitTypes.d.ts to see generated typesApp.tsx using the generated typestests/smoke.spec.ts selectorsdatabricks apps validate --profile <PROFILE>DO NOT write UI code before running typegen — types won't exist and you'll waste time on compilation errors.
Lakebase apps (--features lakebase): No SQL files or typegen. See Lakebase Guide for the tRPC pattern: initialize schema at startup, write procedures in server/server.ts, then build the React frontend.
After completing the decision gate above, use this routing table:
queryKey propuseAnalyticsQuery hookuseAnalyticsQuery, transform client-sidegenie() plugin — see Genie Guidejobs() plugin — see Jobs Guideconfig/queries/useAnalyticsQuery for Lakebase data — it queries the SQL warehouse onlyTypeScript/React framework with type-safe SQL queries and built-in components.
Official Documentation — the source of truth for all API details:
npx @databricks/appkit docs # ← ALWAYS start here to see available pages
npx @databricks/appkit docs <query> # view a section by name or doc path
npx @databricks/appkit docs --full # full index with all API entries
npx @databricks/appkit docs "appkit-ui API reference" # example: section by name
npx @databricks/appkit docs ./docs/plugins/analytics.md # example: specific doc file
DO NOT guess doc paths. Run without args first, pick from the index. The <query> argument accepts both section names (from the index) and file paths. Docs are the authority on component props, hook signatures, and server APIs — skill files only cover anti-patterns and gotchas.
App Manifest and Scaffolding
Agent workflow for scaffolding: get the manifest first, then build the init command.
Get the manifest (JSON schema describing plugins and their resources):
databricks apps manifest --profile <PROFILE>
# See plugins available in a specific AppKit version:
databricks apps manifest --version <VERSION> --profile <PROFILE>
# Custom template:
databricks apps manifest --template <GIT_URL> --profile <PROFILE>
The output defines:
--features), plus requiredByTemplate, and resources.--features (it is included automatically); you must still supply all of its required resources via --set. If false or absent, the plugin is optional — add it to --features only when the user's prompt indicates they want that capability (e.g. analytics/SQL), and then supply its required resources via --set.resources.required and resources.optional (arrays). Each item has resourceKey and fields (object: field name → description/env). Use --set <plugin>.<resourceKey>.<field>=<value> for each required resource field of every plugin you include.Scaffold (DO NOT use npx; use the CLI only):
databricks apps init --name <NAME> --features <plugin1>,<plugin2> \
--set <plugin1>.<resourceKey>.<field>=<value> \
--set <plugin2>.<resourceKey>.<field>=<value> \
--description "<DESC>" --run none --profile <PROFILE>
# --run none: skip auto-run after scaffolding (review code first)
# With custom template:
databricks apps init --template <GIT_URL> --name <NAME> --features ... --set ... --profile <PROFILE>
Optionally use --version <VERSION> to target a specific AppKit version.
--name, --profile. Name: ≤26 chars, lowercase letters/numbers/hyphens only. Use --features only for optional plugins the user wants (plugins with requiredByTemplate: false or absent); mandatory plugins must not be listed in --features.--set for every required resource (each field in resources.required) for (1) all plugins with requiredByTemplate: true, and (2) any optional plugins you added to --features. Add --set for resources.optional only when the user requests them.databricks-core skill to resolve IDs (e.g. warehouse: databricks warehouses list --profile <PROFILE> or databricks experimental aitools tools get-default-warehouse --profile <PROFILE>).DO NOT guess plugin names, resource keys, or property names — always derive them from databricks apps manifest output. Example: if the manifest shows plugin analytics with a required resource resourceKey: "sql-warehouse" and fields: { "id": ... }, include --set analytics.sql-warehouse.id=<ID>.
READ AppKit Overview for project structure, workflow, and pre-implementation checklist.
Genie Agent Workflow — when the user wants a Genie-powered app, do not start by asking for a Genie Space ID. Instead:
catalog.schema.table).databricks genie create-space (see Genie Guide for syntax and serialized space format).databricks genie list-spaces --profile <PROFILE> and let the user pick.--set keys from databricks apps manifest.Read the Genie Guide for configuration, SSE endpoints, and frontend integration.
# ❌ WRONG: name is NOT a positional argument
databricks apps init --features analytics my-app-name
# → "unknown command" error
# ✅ CORRECT: use --name flag
databricks apps init --name my-app-name --features analytics --set "..." --profile <PROFILE>
databricks apps init creates directories in kebab-case matching the app name.
App names must be lowercase with hyphens only (≤26 chars).
Databricks Apps supports any framework that runs as an HTTP server. LLMs already know these frameworks — the challenge is Databricks platform integration.
READ Other Frameworks Guide BEFORE building any non-AppKit app. It covers port/host configuration, app.yaml and databricks.yml setup, dependency management, networking, and framework-specific gotchas.