Skip to content
Back to skills

Overlay Scripts

ASecurity

Use for private overlay path resolution, SectionLoader overlay merging, overlay script resources, or dynamic OverlayScriptTask discovery. Not for ordinary repository scripts or public config alone.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
toolsrustgoshellgit

Works with

  • cli

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add sneivandt/dotfiles --skill overlay-scripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Overlay Scripts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Overlay Scripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sneivandt-overlay-scripts/badge)](https://www.skillsdirectory.com/skills/sneivandt-overlay-scripts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: overlay-scripts
description: >
  Use for private overlay path resolution, SectionLoader overlay merging,
  overlay script resources, or dynamic OverlayScriptTask discovery. Not for
  ordinary repository scripts or public config alone.
---

# Overlay Scripts

Never copy private overlay content into this repository or its skills.

## Overlay resolution

Resolve once at startup:

```text
--overlay > DOTFILES_OVERLAY > repository dotfiles.overlay
```

An explicit linked worktree (`.git` is a file) requires interactive `[y/N]`
confirmation before use or persistence. Empty input and non-interactive runs
decline it.

The normal resolver persists an explicit `--overlay` path; the read-only resolver
does not. Do not invoke the normal resolver against the real checkout merely to
test selection. Use temporary repositories and synthetic overlay fixtures.

## Config and scripts

- `SectionLoader` appends optional overlay sections to public desired state
  under the same category rules; overlays extend rather than replace.
- Script paths are overlay-relative. Reject absolute paths and `..`, and preserve
  canonical containment checks for symlink escapes.
- Scripts implement apply, `--check`, `--dryrun`, and `--remove`.
- Check exits 0 when correct, 1 when apply is needed, and another non-zero on
  failure. Every mode propagates failures.
- Shell scripts are POSIX `sh`; PowerShell runs non-interactively.
- All subprocesses use the executor.
- Dry-run is cooperative: `--check` and `--dryrun` execute overlay code, and the
  engine cannot stop a misbehaving script from mutating. Inspect trusted scripts
  or use fixtures before treating a preview as safe.

## Dynamic task discovery

Build one `OverlayScriptTask` per active entry from the immutable startup
configuration. Dynamic tasks are not catalog entries. The catalog-registered
reporting task is internal. Preserve config order and stable
`script-<normalized-name>` selectors.

When repository synchronization changes the checkout, the guarded child process
reloads configuration and rebuilds the entire task set. Do not add mid-run
configuration reload or late task discovery.

Test merge order, categories, path rejection, all exit mappings, dry-run
failure, startup discovery, and restart selection.

Use [resolution](../../../cli/src/domains/overlay/resolution.rs),
[script execution](../../../cli/src/domains/overlay/resources/script.rs), and
[dynamic tasks](../../../cli/src/domains/overlay/scripts.rs) as the source of
truth; keep private paths and script output out of public reports and fixtures.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.