shell

Review bash and POSIX shell scripts for security and portability issues.

193|17|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/pproenca/dot-skills --skill shell-pproenca
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell
Source: https://github.com/pproenca/dot-skills/tree/main/skills/.experimental/shell
Command: npx skills add https://github.com/pproenca/dot-skills --skill shell-pproenca

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you write shell scripts that are more secure, portable across different systems, and less prone to errors, saving you debugging time and preventing critical failures.

Core Features & Use Cases

  • Security Best Practices: Avoids common vulnerabilities like command injection and path hijacking.
  • Portability: Ensures your scripts work reliably on various Unix-like systems (Linux, macOS, containers).
  • Error Handling: Implements robust error detection and reporting to prevent silent failures.
  • Use Case: When writing a new deployment script for a CI/CD pipeline, use this Skill to ensure it's secure and runs consistently across different build environments.

Quick Start

Use the shell skill to review the attached script 'deploy.sh' for potential security and portability issues.

Frequently Asked Questions about shell

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

FAQPage Schema
How do I write safe and portable bash scripts for CI pipelines?

Safe and portable bash scripts for CI pipelines require enforcing rules for static analysis, explicit error checking, and secure command execution. This prevents critical failures and ensures consistent operation across different build environments.

What are the best practices for shell scripting security and command injection prevention?

Best practices for shell scripting security involve avoiding common vulnerabilities like command injection and path hijacking. Applying secure command execution rules and robust error detection prevents silent failures and protects your system.

How do I ensure POSIX portability across Unix-like systems in shell scripts?

POSIX portability in shell scripts is achieved by following comprehensive best practices that ensure reliable execution across various Unix-like systems, including Linux, macOS, and containers. This avoids environment-specific failures and maintains compatibility.

Can I use shell scripting best practices for Dockerfile RUN commands and Makefile recipes?

Yes, shell scripting best practices are fully applicable to Dockerfile RUN commands and Makefile recipes. They ensure secure command execution and robust error detection, preventing silent failures during container builds and automation tasks.

Why do my shell scripts fail silently and how do I implement proper error handling?

Shell scripts fail silently when they lack robust error detection and explicit error checking. Implementing comprehensive error handling rules ensures failures are reported immediately, preventing critical issues and saving debugging time.

What is the best way to review a deployment script for portability and security issues?

The best way to review a deployment script for portability and security issues is to check it against established rules for quoting, static analysis, and secure command execution. This identifies vulnerabilities and ensures cross-system compatibility.