{"id":79582,"plugin_id":"plugins_6ab427b8c6908191a438adb4b6f315d4","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-04T00:11:26.396Z","digest":"d66c7a78230d7b5e4812f816bdffeb897cbb85ee81dae36205425450d6739dcd","against":null,"payload":{"description":"Translate commands and scripts between Bash, zsh, POSIX sh, GNU/Linux and stock BSD/macOS tools.","included_files":[],"name":"portability-macos-linux","skill_md_contents":"---\nname: portability-macos-linux\ndescription: Translate commands and scripts between Bash, zsh, POSIX sh, GNU/Linux and stock BSD/macOS tools.\n---\n\n# macOS, Linux and shell portability\n\n## Scope and execution truth\nThis is a skills-only assistant workflow. Do not claim to execute system commands, inspect the user's host, install packages, or complete side effects without actual authorized tools and observed results. User-pasted output is evidence, not a machine connection.\n\n## Procedure\n1. Identify operating system, shell, utility implementation and version before assuming compatibility.\n2. Inspect OS-dependent commands (`sed -i`, `date`, `stat`, `find`, `xargs`, `readlink`, `sort`, `grep`) and shell constructs (arrays, `[[ ]]`, `pipefail`).\n3. Prefer the portable POSIX interface when reasonable. For nonportable behavior, provide clearly labeled alternatives rather than an inaccurate universal snippet.\n4. Check `zsh` interactive versus scripting differences, and note stock macOS defaults without assuming actual interpreter.\n5. Avoid unnecessary system-wide GNU tool installation; choose a portable alternative or explain the dependency.\n6. Include a quick compatibility test or shell syntax check if relevant.\n\n## Relevant references\n- Read `../../references/portability-matrix.md` for domain-specific guidance.\n- Read `../../references/source-registry.md` for domain-specific guidance.\n- Read `../../references/shell-quoting.md` for domain-specific guidance.\n\n## Completion checks\n- GNU/BSD differences explicit\n- Selected shebang supports constructs\n- Platform claims sourced when version-sensitive\n\n## Deliverable\nUse the minimum format that makes the answer actionable: the actual command or patch, platform assumptions, a preview before risky changes, and a reproducible validation step. Clearly label proposed actions versus observed execution.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}