{"id":79590,"plugin_id":"plugins_6ab427b8c6908191a438adb4b6f315d4","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-04T00:11:26.662Z","digest":"33d191fe1a414051afd1da2be4e345801b296eec39de66602660033c51e8c84c","against":null,"payload":{"description":"Author maintainable Bash, zsh or POSIX shell scripts with input checks, cleanup, safe paths and tests.","included_files":[],"name":"write-shell-script","skill_md_contents":"---\nname: write-shell-script\ndescription: Author maintainable Bash, zsh or POSIX shell scripts with input checks, cleanup, safe paths and tests.\n---\n\n# Write a shell script\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. Decide shell/interpreter and portability requirement first. Use an explicit shebang and check declared dependencies.\n2. Define arguments, input/output contracts, expected errors and idempotency before adding code.\n3. Quote expansions; use `\"$@\"` or arrays where supported; protect leading-dash filenames and handle weird filenames where relevant.\n4. Handle nonzero exit statuses explicitly for critical steps. `set -e` and `pipefail` are not magic guarantees; document shell-specific support.\n5. Use secure temporary files, `trap` cleanup when needed, and stage → validate → publish for important outputs.\n6. Add dry-run or preview mode for write operations when practical, plus simple representative tests and usage examples.\n\n## Relevant references\n- Read `../../references/shell-debugging.md` for domain-specific guidance.\n- Read `../../references/shell-quoting.md` for domain-specific guidance.\n- Read `../../references/automation-and-recovery.md` for domain-specific guidance.\n\n## Completion checks\n- Shell-specific features match shebang\n- Failure and cleanup cases addressed\n- Repeat-run behavior considered\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":{}}