[Skill] Diagnose and fix overlay issues in Azure Linux components. Use when overlays fail to apply, produce unexpected results, or need debugging. Triggers: overlay error, fix overlay, overlay not applying, spec-search-replace failed, overlay debug.
76
95%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The fastest way to check if overlays apply cleanly:
azldev comp render -p <name>
# Inspect the result
cat specs/<first-char>/<name>/<name>.specIf render fails, the error message will identify which overlay failed and why.
When you need to understand exactly what upstream provides vs. what overlays change:
Use a temp dir for
prep-sourcesoutput. Use--forceto overwrite an existing output dir.
prep-sources -o <dir> writes to a user-specified directory (NOT base/out/ — that's for comp build output).
azldev comp prep-sources -p <name> --skip-overlays --force -o base/build/work/scratch/<name>-pre -q
azldev comp prep-sources -p <name> --force -o base/build/work/scratch/<name>-post -q
diff -r base/build/work/scratch/<name>-pre base/build/work/scratch/<name>-postLook at the pre-overlay output dir — this is what the overlay is trying to modify. Common root cause: upstream changed and the overlay's assumptions no longer hold.
spec-add-tag: "tag already exists"The tag is already in the upstream spec. Fix: use spec-set-tag (replaces value if exists, adds if not) or spec-update-tag (replaces value, but fails if tag doesn't exist — use when you want to guarantee the tag was already present) instead.
spec-search-replace: no matchThe regex doesn't match anything in the spec. Causes:
<pre-dir>/<name>.spec)\\ for literal backslash'...') to avoid escaping: regex = 'RPM_VENDOR=redhat'(?s)/DOTALL is not supported. Use multiple targeted single-line replacements instead.spec-*-lines: section not foundThe spec section (%prep, %build, %install, etc.) doesn't exist or has different casing. Check the actual section names in <pre-dir>/<name>.spec.
file-*: file not foundThe file doesn't exist in the upstream sources. Check ls <pre-dir>/ for actual filenames. Globs (**/*) are supported for file-search-replace.
The overlay applied cleanly but the result is wrong. Compare <post-dir>/<name>.spec against what you expect. Common issues:
For overlay type reference (all 12 types with key fields), see comp-toml.instructions.md. Full schema: azldev.schema.json.
prep-sources. Debugging 10 overlays at once is painful.skill-mock to inspect the build environment.skill-build-component for details.skill-mock.9e308ff
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.