shell-majo

Enforce POSIX sh standards with shellcheck linting and error handling.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/markjoshwel/skills --skill shell-majo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-majo
Source: https://github.com/markjoshwel/skills/tree/main/shell-majo
Command: npx skills add https://github.com/markjoshwel/skills --skill shell-majo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

POSIX shell standards for Mark's workflow unify portable, defensive scripting practices to reduce errors and portability issues.

Core Features & Use Cases

  • Enforces POSIX sh as default and documents when Bash is acceptable with explicit justification
  • Standardizes shebang usage, licensing headers, variable naming conventions, quoting, and error handling
  • Encourages shellcheck linting and cross-shell compatibility to improve reliability and maintainability
  • Use Case: Create new automation scripts or refactor existing ones to ensure they run reliably on /bin/sh across environments

Quick Start

Audit an existing shell script and refactor it to strictly use POSIX sh, add the Unlicense header, and implement proper error handling.

Frequently Asked Questions about shell-majo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a shell script portable across different Unix environments?

Make a shell script portable by enforcing POSIX sh standards for shebangs, variable quoting, and error handling so it runs reliably on /bin/sh across Unix-like environments. Refactoring existing scripts ensures compatibility and reduces portability issues.

What is the best way to refactor an existing shell script to be POSIX compliant?

The best way to refactor a shell script to be POSIX compliant is by applying consistent error handling, standardizing variable naming conventions, and running shellcheck-based linting to identify non-portable syntax for reliable cross-shell execution.

When do I need to use POSIX sh instead of Bash for automation scripts?

You need to use POSIX sh instead of Bash when scripts must run reliably across diverse Unix-like environments without Bash-specific dependencies. Bash is only acceptable with explicit justification for features unavailable in standard POSIX sh.

Does shellcheck work with POSIX sh scripts to improve error handling?

Shellcheck works with POSIX sh scripts to improve error handling by linting code for defensive scripting practices. It identifies non-compliant syntax and enforces consistent quoting practices to increase reliability and maintainability for portable shell scripts.

What are the limitations of using POSIX sh for complex scripting?

A limitation of using POSIX sh is the lack of arrays and advanced string manipulation found in Bash. For complex scripting requiring these features, Bash is acceptable but requires explicit justification and careful documentation for cross-shell compatibility.