Skip to content

Commit 9fcbae3

Browse files
GABRIELLE DOMPREHGABRIELLE DOMPREH
authored andcommitted
refactor(serverless-storage-check): nest as sub-skill under databricks-serverless-migration
Moves skills/databricks-serverless-storage-check/ → skills/databricks-serverless-migration/databricks-serverless-storage-check/ to physically reflect the parent/sub-skill hierarchy. - Update scripts/skills.py iter_skill_dirs() to yield one level of nested skill directories (sub-skills alongside top-level skills) - Fix relative SKILL.md links: ../databricks-serverless-migration/ → ../ and ../databricks-{dabs,jobs,core}/ → ../../databricks-{dabs,jobs,core}/ - Fix databricks-serverless-migration/SKILL.md links: ../databricks-serverless-storage-check/ → databricks-serverless-storage-check/ - Regenerate manifest.json (skill count unchanged: 9) - Confirmed: python3 scripts/skills.py validate → Everything is up to date - Confirmed: stf lint → 0 errors, 0 warnings Co-authored-by: Isaac
1 parent dcff5b0 commit 9fcbae3

20 files changed

Lines changed: 64 additions & 18 deletions

File tree

manifest.json

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": "2",
3-
"updated_at": "2026-05-18T12:22:38Z",
3+
"updated_at": "2026-06-08T10:21:37Z",
44
"skills": {
55
"databricks-apps": {
66
"version": "0.1.1",
@@ -152,12 +152,29 @@
152152
"version": "0.1.0",
153153
"description": "Migrate Databricks workloads from classic compute to serverless compute, including compatibility checks and concrete fixes",
154154
"experimental": false,
155-
"updated_at": "2026-05-18T12:22:14Z",
155+
"updated_at": "2026-06-08T10:21:11Z",
156156
"files": [
157157
"SKILL.md",
158158
"agents/openai.yaml",
159159
"assets/databricks.png",
160160
"assets/databricks.svg",
161+
"databricks-serverless-storage-check/SKILL.md",
162+
"databricks-serverless-storage-check/agents/openai.yaml",
163+
"databricks-serverless-storage-check/assets/databricks.png",
164+
"databricks-serverless-storage-check/assets/databricks.svg",
165+
"databricks-serverless-storage-check/eval/evaluation_results.json",
166+
"databricks-serverless-storage-check/eval/ground_truth.yaml",
167+
"databricks-serverless-storage-check/eval/manifest.yaml",
168+
"databricks-serverless-storage-check/eval/output_instructions.md",
169+
"databricks-serverless-storage-check/eval/report.html",
170+
"databricks-serverless-storage-check/eval/tests/conftest.py",
171+
"databricks-serverless-storage-check/eval/tests/test_integration.py",
172+
"databricks-serverless-storage-check/eval/tests/test_unit.py",
173+
"databricks-serverless-storage-check/eval/thinking_instructions.md",
174+
"databricks-serverless-storage-check/references/pattern-catalog.md",
175+
"databricks-serverless-storage-check/references/remediation-guide.md",
176+
"databricks-serverless-storage-check/scripts/preflight.py",
177+
"databricks-serverless-storage-check/scripts/test_preflight.py",
161178
"references/code-patterns.md",
162179
"references/compatibility-checks.md",
163180
"references/configuration-guide.md",
@@ -166,15 +183,24 @@
166183
]
167184
},
168185
"databricks-serverless-storage-check": {
169-
"version": "0.1.0",
186+
"version": "0.2.0",
170187
"description": "Detect cross-task file-sharing antipatterns in serverless jobs (writes to /local_disk0, /tmp, or trustedTemp that are read by sibling or child tasks) and recommend UC Volumes or /Workspace handoff",
171188
"experimental": false,
172-
"updated_at": "2026-05-18T12:21:52Z",
189+
"updated_at": "2026-06-08T10:21:01Z",
173190
"files": [
174191
"SKILL.md",
175192
"agents/openai.yaml",
176193
"assets/databricks.png",
177194
"assets/databricks.svg",
195+
"eval/evaluation_results.json",
196+
"eval/ground_truth.yaml",
197+
"eval/manifest.yaml",
198+
"eval/output_instructions.md",
199+
"eval/report.html",
200+
"eval/tests/conftest.py",
201+
"eval/tests/test_integration.py",
202+
"eval/tests/test_unit.py",
203+
"eval/thinking_instructions.md",
178204
"references/pattern-catalog.md",
179205
"references/remediation-guide.md",
180206
"scripts/preflight.py",

scripts/skills.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757

5858
def iter_skill_dirs(repo_root: Path):
59-
"""Yield skill directories that contain SKILL.md."""
59+
"""Yield skill directories that contain SKILL.md (top-level and one level nested)."""
6060
skills_dir = repo_root / "skills"
6161
for item in sorted(skills_dir.iterdir()):
6262
if not item.is_dir():
@@ -66,6 +66,14 @@ def iter_skill_dirs(repo_root: Path):
6666
if not (item / "SKILL.md").exists():
6767
continue
6868
yield item
69+
for subitem in sorted(item.iterdir()):
70+
if not subitem.is_dir():
71+
continue
72+
if subitem.name.startswith("."):
73+
continue
74+
if not (subitem / "SKILL.md").exists():
75+
continue
76+
yield subitem
6977

7078

7179
def extract_version_from_skill(skill_path: Path) -> str:

skills/databricks-serverless-migration/SKILL.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ parent: databricks-core
1313

1414
Analyze existing Databricks code for serverless compute compatibility and guide migration from classic clusters. The skill follows a 4-step migration lifecycle: **Ingest** the workload → **Analyze** for compatibility → **Test** via A/B comparison → **Validate** and iterate.
1515

16+
## Sub-skills
17+
18+
This skill is the top of a small hierarchy. Once a single-notebook migration is done, hand off to the niche sub-skill below for multi-task hardening before deploying to serverless:
19+
20+
| Sub-skill | Use when |
21+
|-----------|----------|
22+
| [`databricks-serverless-storage-check`](databricks-serverless-storage-check/SKILL.md) | The job has **multiple tasks** (parent/child notebooks via `dbutils.notebook.run`, sibling `notebook_task`s, or a `pipeline_task` downstream of a `notebook_task`) and shares files between them. Detects the `INTERNAL_ERROR: [Errno 13] Permission denied` / `/local_disk0/.../trustedTemp/...` failure class and rewrites the handoff to UC Volumes / `/Workspace` / `taskValues`. Invoke after this skill's single-notebook port, before the Step-3 test run. |
23+
24+
The sub-skill is a **diagnostic + fix** layer, not a replacement — keep this skill's 4-step lifecycle as the spine and call into the sub-skill only when the multi-task triggers fire.
25+
1626
## When to Use This Skill
1727

1828
- Migrating notebooks, jobs, or pipelines from classic compute to serverless
@@ -118,7 +128,7 @@ Scan the code for patterns that are incompatible with the serverless compute arc
118128
| Pattern | Severity | Fix |
119129
|---------|----------|-----|
120130
| `dbfs:/` or `/dbfs/` paths (persistent data) | Blocker | Replace with `/Volumes/<your_catalog>/schema/volume/path` |
121-
| `dbfs:/tmp/`, `/dbfs/tmp/`, paths with `cache`/`scratch`/`temp` | Warning | Use `/tmp/` or `/local_disk0/tmp/` (local driver disk) — do not use Volumes for temp files due to performance. **Per-task scratch only**: if another task (child notebook, sibling job task, or pipeline) needs to read the file, use UC Volumes or `/Workspace` — see [`databricks-serverless-storage-check`](../databricks-serverless-storage-check/SKILL.md). |
131+
| `dbfs:/tmp/`, `/dbfs/tmp/`, paths with `cache`/`scratch`/`temp` | Warning | Use `/tmp/` or `/local_disk0/tmp/` (local driver disk) — do not use Volumes for temp files due to performance. **Per-task scratch only**: if another task (child notebook, sibling job task, or pipeline) needs to read the file, use UC Volumes or `/Workspace` — see [`databricks-serverless-storage-check`](databricks-serverless-storage-check/SKILL.md). |
122132
| `file:///dbfs/` FUSE mount paths | Warning | Replace persistent paths with `/Volumes/...`; replace temp paths with `/local_disk0/tmp/` |
123133
| `dbutils.fs.mount(...)` | Blocker | Create UC external location + external volume |
124134
| `hive_metastore.db.table` | Warning | Migrate to UC or use HMS Federation: `CREATE FOREIGN CATALOG ... USING CONNECTION hms_connection` |

skills/databricks-serverless-storage-check/SKILL.md renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/SKILL.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: databricks-serverless-storage-check
33
description: "Detect cross-task file-sharing antipatterns in Databricks serverless jobs (writes to /local_disk0, /tmp, or trustedTemp that are read by sibling or child tasks on potentially different compute nodes) and recommend UC Volumes or /Workspace for handoff. Use when a serverless job fails with `INTERNAL_ERROR: [Errno 13] Permission denied` on /local_disk0 paths, when parallel child notebooks fail intermittently, when reviewing a DAB job before deploying to serverless, or when the user mentions trustedTemp, fan-out, or cross-task file handoff. Complements databricks-serverless-migration (which covers single-notebook migration)."
44
compatibility: Requires databricks CLI (>= v0.292.0) for --job-id and --run-id modes; --notebook / --dir / --job-yaml modes have no external dependencies.
55
metadata:
6-
version: "0.1.0"
7-
parent: databricks-core
6+
version: "0.2.0"
7+
parent: databricks-serverless-migration
88
---
99

1010
# Serverless Storage Check
1111

12-
**FIRST**: Use the parent `databricks-core` skill for CLI basics, authentication, and profile selection.
12+
**FIRST**: Use the parent `databricks-serverless-migration` skill for the overall classic-to-serverless migration workflow (Ingest → Analyze → Test → Validate), CLI auth (which it inherits from `databricks-core`), and per-task scratch guidance (`/local_disk0/tmp`). This skill is a niche sub-skill of that workflow — it focuses **only** on the cross-task handoff antipattern that the parent skill explicitly delegates here (see the Category B → DBFS-paths row in `databricks-serverless-migration/SKILL.md`).
1313

1414
This skill detects a specific class of serverless failure: **cross-task file handoffs through local disk**. On serverless compute, each task may run on a different node, so a path written by a parent task to `/local_disk0`, `/tmp`, or a `trustedTemp` directory is not guaranteed to be visible to a child task. The typical symptom is:
1515

@@ -32,14 +32,16 @@ Use this skill when any of these triggers appear:
3232
- The user mentions "trustedTemp", "fan-out", "cross-task file sharing", or `/local_disk0`
3333
- A new serverless job design needs a sanity check before first run
3434

35-
This skill is **complementary to**, not a replacement for, [`databricks-serverless-migration`](../databricks-serverless-migration/SKILL.md). That skill handles single-notebook migration and explicitly recommends `/local_disk0/tmp` for per-task scratch which is correct *inside* a task. The boundary between the two skills:
35+
This skill is a **niche sub-skill** of [`databricks-serverless-migration`](../SKILL.md) — the parent owns single-notebook migration and explicitly recommends `/local_disk0/tmp` for per-task scratch (which is correct *inside* a task). This sub-skill picks up where the parent leaves off: anything that crosses a task boundary. The boundary between the two skills:
3636

3737
| Concern | Use skill |
3838
|---------|-----------|
39-
| Migrating one notebook from classic DBR to serverless | `databricks-serverless-migration` |
40-
| Per-task scratch storage (intra-task) | `databricks-serverless-migration` (recommends `/local_disk0/tmp`) |
41-
| **Cross-task file handoff between parent/child notebooks or sibling tasks** | **this skill** |
42-
| Permission-denied on `/local_disk0` during a multi-task run | **this skill** |
39+
| Migrating one notebook from classic DBR to serverless | `databricks-serverless-migration` (parent) |
40+
| Per-task scratch storage (intra-task) | `databricks-serverless-migration` (parent — recommends `/local_disk0/tmp`) |
41+
| **Cross-task file handoff between parent/child notebooks or sibling tasks** | **this skill (sub-skill)** |
42+
| Permission-denied on `/local_disk0` during a multi-task run | **this skill (sub-skill)** |
43+
44+
Always invoke the parent skill **first** for the overall migration plan, then return here to harden cross-task handoffs before deploying a multi-task serverless job.
4345

4446
## Quick start
4547

@@ -131,10 +133,10 @@ If the scanner emits `ENV001`:
131133

132134
## Related skills
133135

134-
- [`databricks-serverless-migration`](../databricks-serverless-migration/SKILL.md)single-notebook classic-to-serverless migration. **Use that skill first** if the workload hasn't been migrated yet.
135-
- [`databricks-dabs`](../databricks-dabs/SKILL.md) — DAB structure and resource definitions. Use when authoring or fixing the `job.yml` flagged by `FANOUT003` or `FANOUT004`.
136-
- [`databricks-jobs`](../databricks-jobs/SKILL.md) — Lakeflow Jobs orchestration. Use when restructuring task dependencies to avoid the fan-out antipattern.
137-
- [`databricks-core`](../databricks-core/SKILL.md)parent skill for CLI auth and profile selection.
136+
- [`databricks-serverless-migration`](../SKILL.md)**parent skill**. Single-notebook classic-to-serverless migration and the overall Ingest → Analyze → Test → Validate lifecycle. **Always invoke first** if the workload hasn't been migrated yet — this sub-skill assumes you've already done the single-notebook port and are now hardening cross-task handoffs.
137+
- [`databricks-dabs`](../../databricks-dabs/SKILL.md) — DAB structure and resource definitions. Use when authoring or fixing the `job.yml` flagged by `FANOUT003` or `FANOUT004`.
138+
- [`databricks-jobs`](../../databricks-jobs/SKILL.md) — Lakeflow Jobs orchestration. Use when restructuring task dependencies to avoid the fan-out antipattern.
139+
- [`databricks-core`](../../databricks-core/SKILL.md)grandparent skill, inherited via `databricks-serverless-migration`, for CLI auth and profile selection.
138140

139141
## Reference docs
140142

skills/databricks-serverless-storage-check/agents/openai.yaml renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/agents/openai.yaml

File renamed without changes.

skills/databricks-serverless-storage-check/assets/databricks.png renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/assets/databricks.png

File renamed without changes.

skills/databricks-serverless-storage-check/assets/databricks.svg renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/assets/databricks.svg

File renamed without changes.

skills/databricks-serverless-storage-check/eval/evaluation_results.json renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/eval/evaluation_results.json

File renamed without changes.

skills/databricks-serverless-storage-check/eval/ground_truth.yaml renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/eval/ground_truth.yaml

File renamed without changes.

skills/databricks-serverless-storage-check/eval/manifest.yaml renamed to skills/databricks-serverless-migration/databricks-serverless-storage-check/eval/manifest.yaml

File renamed without changes.

0 commit comments

Comments
 (0)