os
Installation
SKILL.md
os - Operating System Information
The os module provides detailed information about the current operating system, including its name, architecture, release details, load averages, and more. It is essential for writing cross-platform scripts.
When to Activate
- When the user needs to identify the system architecture (e.g., x86_64, arm64).
- When checking if the environment is Linux, macOS, WSL, or Termux.
- When monitoring system load or uptime.
- When retrieving release information for software compatibility checks.
Core Principles & Rules
- Efficient Scripting: Use variables like
name_,arch_, anduptime_in scripts for high-performance data retrieval. - Cache Control: Subcommands starting with
get(e.g.,getname) bypass caches for real-time detection. - Cross-Platform Readiness: Leverage
os is <type>for robust conditional logic in shell scripts.