language-shell
Shell scripting standards and safety practices. Use when language shell guidance is required or when selecting Shell as a thin wrapper or OS-near glue layer.
When & Why to Use This Skill
This Claude skill provides expert-level shell scripting guidance, focusing on industry standards, safety practices, and automated validation. It leverages tools like Shellcheck and syntax checkers for Bash, Sh, and Zsh to identify security vulnerabilities, ensure POSIX compliance, and optimize OS-level glue code for production environments. By integrating static analysis and strict mode validation, it helps developers maintain robust and secure automation scripts.
Use Cases
- Automated Script Validation: Perform deep static analysis using Shellcheck to identify logic errors, security risks, and deprecated syntax in Bash or Zsh scripts.
- Cross-Platform Compatibility Checks: Validate scripts for POSIX compliance to ensure they run reliably across different Unix-like environments and shell versions.
- Security Auditing: Scan shell-based 'glue code' and infrastructure-as-code scripts for common vulnerabilities, such as improper quoting or unsafe command execution.
- CI/CD Pipeline Integration: Use as a pre-deployment check to catch syntax errors and coding standard violations before scripts are executed in production.
| name | language-shell |
|---|---|
| description | Shell scripting standards and safety practices. Use when language shell guidance is required or when selecting Shell as a thin wrapper or OS-near glue layer. |
Key Execution Capabilities
Script Validation
- Run syntax checking:
bash -n,sh -n,zsh -n - Execute static analysis with shellcheck
- Validate shebang lines and strict mode compliance
- Check for security vulnerabilities and coding violations
Tool Integration
- Use
shellcheckfor comprehensive linting - Leverage shell-specific parameter expansion features
- Apply POSIX vs bash vs zsh feature detection
- Implement platform-specific compatibility checks
Execution Context
- Process script files from filesystem layer
- Generate structured reports with line-by-line findings
- Create minimal, rule-compliant patches for violations
- Maintain separation between governance rules and execution tools
Error Handling
This skill provides execution-layer error handling for shell script analysis:
- Invalid file formats or permissions
- Tool availability issues (missing shellcheck, etc.)
- Platform-specific limitations
- Syntax validation failures
Usage Notes
- Always delegate to governance rules for policy decisions
- Focus on concrete tool execution and result processing
- Provide deterministic, tool-first analysis results
- Maintain separation between rule definition and rule application