ai-dev-kit icon indicating copy to clipboard operation
ai-dev-kit copied to clipboard

Install most skills from databricks-agent-skills via databricks aitools

Open dustinvannoy-db opened this issue 5 months ago • 0 comments

Summary

Reworks both installers (install.sh / install.ps1) so that most Databricks skills are sourced from databricks/databricks-agent-skills by delegating to databricks aitools install (Databricks CLI v1.0.0+), instead of bundling them in this repo. Implements .local/implementation_plan_INSTALL_DAS.md.

New skill source map

Source Skills Mechanism
databricks/databricks-agent-skills 26 skills (9 stable + 17 experimental; databricks-execution-compute excluded from defaults) databricks aitools install --scope … --agents … --skills …
This repo (bundled) databricks-genie copy, as before
mlflow/skills 8 MLflow skills raw fetch @ main (MLFLOW_REF override)
databricks-solutions/apx databricks-app-apx raw fetch @ latest stable tag, currently v0.3.8 (APX_REF override)

The agent-skills inventory is discovered live via databricks aitools list -o json (so new upstream skills flow into the all profile automatically), with a hardcoded v0.2.3 snapshot as offline fallback.

Key behaviors

  • CLI gate: agent skills require Databricks CLI v1.0.0+. Interactive installs get a guided upgrade loop (run upgrade / re-check / skip / abort); silent installs fail with instructions.
  • Ownership: aitools owns the agent skills after install (aitools list|update|uninstall). The installer manifest only tracks skills it installs directly. Profile changes uninstall dropped agent skills via aitools uninstall.
  • Stale-copy cleanup: aitools will not overwrite a pre-existing real directory with the same skill name (verified against CLI v1.0.0), so the manifest cleanup removes old bundled copies of now-agent-managed names before delegating. Upgrades from older installs were validated end to end.
  • Gemini CLI / Windsurf / Kiro (not supported by aitools): skills are symlinked from the aitools canonical store (.databricks/aitools/skills); if no aitools-supported tool is selected, a throwaway temp-dir install stages the files for copying so no unselected agent dirs are touched. Windows falls back to copying when symlink creation is not permitted.
  • Renames (breaking): adopts upstream names — databricks-bundles → databricks-dabs, databricks-spark-declarative-pipelines → databricks-pipelines; databricks-config replaced by databricks-core, databricks-lakebase-autoscale/-provisioned by databricks-lakebase. Explicit --skills requests for old names are migrated with a warning; unknown names fail loudly.
  • Ref resolution: apx latest resolves to the highest stable semver tag via git ls-remote (no GitHub API rate limits; INCLUDE_PRERELEASES=1 to allow -rc tags). New env vars: APX_REF, MLFLOW_REF, SKILLS_CHANNEL, INCLUDE_PRERELEASES.
  • New --dry-run prints resolved refs, the exact aitools command, and the delivery plan, then exits without changes. A skills.lock in the scope-local state dir records resolved refs/SHAs and the aitools release.
  • Profiles, --list-skills, the interactive custom picker, and help text are reworked around the new names/sources.

Deviations from the plan (evidence-driven)

  1. Copilot agent token is copilot, not github-copilot (verified against the CLI).
  2. Added the stale-copy cleanup above — required because aitools silently skips existing real dirs.
  3. Tag/SHA resolution uses git ls-remote instead of the GitHub tags API after hitting 403 rate limits during testing.
  4. Old skill names warn-and-migrate on explicit requests instead of silently not matching, so saved profiles and scripted installs survive the rename.
  5. Inventory drift since the plan was written (v0.2.1 → v0.2.3): databricks-vector-search is now stable and databricks-lakeflow-connect exists; handled by the dynamic discovery.

Testing

  • install.sh: full silent project installs in sandbox dirs (claude+gemini and gemini-only), profile-change cleanup incl. aitools uninstall, stale-copy upgrade replacement, rename migration, unknown-skill failure, --dry-run, --list-skills against the live 0.2.3 inventory, apx tag resolution to v0.3.8, lockfile contents.
  • install.ps1: parses clean (PowerShell 7.5.4 parser), --list-skills and silent --dry-run produce output identical to bash on macOS pwsh. Not yet executed on real Windows — the symlink-privilege fallback and winget upgrade path need a Windows smoke test before merge.

Follow-ups (out of scope)

  • Remove the now-unbundled skill directories from databricks-skills/.
  • Update old skill names mentioned in databricks-builder-app/README.md and databricks-mcp-server/README.md.

This pull request and its description were written by Isaac.

dustinvannoy-db avatar Jun 11 '26 18:06 dustinvannoy-db