style

Enforce POSIX-compliant shell script and CLI design standards.

Updated Nov 7, 2024
One-click install
npx skills add https://github.com/patmaddox/lab --skill style-patmaddox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: style
Source: https://github.com/patmaddox/lab/tree/main/.claude/skills/code-style
Command: npx skills add https://github.com/patmaddox/lab --skill style-patmaddox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the inconsistency and fragility often found in shell scripts and CLI tools by enforcing a strict, maintainable coding standard.

Core Features & Use Cases

  • Shell Script Standardization: Ensures all scripts follow POSIX-compliant patterns, including proper error handling and parameter management.
  • CLI Design Consistency: Guides the creation of intuitive command-line interfaces with standardized flag handling and output conventions.
  • Use Case: When writing a new deployment script or utility tool, this Skill ensures the code is robust, readable, and follows the project's established architectural patterns.

Quick Start

Apply the style guide requirements to the current shell script to ensure it meets the project standards for POSIX compliance and error handling.

Frequently Asked Questions about style

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

FAQPage Schema
How do I enforce POSIX compliance and strict mode in shell scripts?

To enforce POSIX compliance and strict mode in shell scripts, apply a coding standard that mandates proper error handling and parameter management. This ensures code maintainability and execution reliability.

What are the best practices for CLI parameter handling and output conventions?

Best practices for CLI parameter handling involve adhering to standardized flag patterns and output conventions. This guides the creation of intuitive command-line interfaces and improves overall design consistency.

How do I standardize shell scripting patterns for deployment scripts?

Standardizing shell scripting patterns involves applying strict coding standards to deployment scripts. This ensures the code is robust, readable, and follows established architectural patterns for maintainability.

Does this shell scripting standard work without external dependencies?

Yes, this shell scripting standard works without external dependencies. It operates by applying project documentation requirements to review and enforce POSIX-compliant patterns, error handling, and parameter management directly.

Why does my shell script fail to meet maintainability and reliability standards?

Shell scripts often fail maintainability standards due to inconsistency and fragility. This is resolved by enforcing strict coding standards that require adherence to strict mode, parameter handling, and output conventions.

When do I need to apply POSIX-compliant standards to command-line interfaces?

You need to apply POSIX-compliant standards when developing or reviewing command-line interfaces and utility tools. This ensures CLI design consistency and improves execution reliability for new scripts.