src/remote-skills
Startup provisioning of remote Agent-Skill sources for a Mastra workspace.
A RemoteSkillSource names WHERE a SKILL.md tree comes from - the
AITOOLS_SOURCE constant, a GitHub owner/repo, any git / GitLab URL,
or a direct download URL - and optional per-source policy.
provisionRemoteSkills materializes every source into a local
SKILL.md tree at app boot and returns read-only filesystem backings plus
their stable virtual workspace mounts.
Resolution per source, in order:
- the AITOOLS_SOURCE constant (
"aitools"): Databricks’ own skill set, read straight from the public repo thedatabricks aitoolsCLI sources from. No CLI, no Databricks auth - which is what makes it usable inside a Databricks App container, where the CLI is not installed; - the OPTIONAL
skillsnpm CLI (peer dep): if installed, each source is copied into a staging dir withskills add <source> --agent <dir> --copy, which understands every source format the ecosystem does (GitHub shorthand, git URLs, archive/download URLs); - otherwise a plain fetch of the source URL (built with
net.urlBuilder), writing the downloaded
SKILL.mdto a staging dir.
A source that resolves through neither path fails app startup, unless the
source (or the top-level call) sets failOnError: false, in which case it is
logged and skipped so one bad source never takes the app down.
AI Tools uses the shared @dbx-tools/cache project cache with a one-day TTL,
then hydrates one process-memory filesystem mounted at
AITOOLS_SKILLS_MOUNT for every default workspace. Other sources keep
a METADATA_FILE beside their provisioned tree and default to a
seven-day refresh window. Pass refreshTtlMs: 0 to download on every boot.
For non-AI-Tools sources, the default destination is the Databricks workspace
Assistant skills tree (/Workspace/.assistant/skills). Pass userEmail or
databricksBasePath to select another destination. When it is unavailable,
the tree is exposed through a stable read-only local mount instead.
Interfaces
Section titled “Interfaces”- LocalSkillDirectoryMount
- MemorySkillMount
- ProvisionedRemoteSkills
- ProvisionRemoteSkillsOptions
- RemoteSkillCacheEntry
- RemoteSkillsMetadata
- RemoteSkillSourceOptions