sudo
Installation
SKILL.md
sudo - Enhanced Privilege Elevation
The sudo module provides a smarter way to escalate privileges, automatically choosing between sudo, doas, or su. It ensures that custom PATH settings and the x-cmd environment are preserved in the elevated session.
When to Activate
- When the user needs to perform system-level tasks (e.g., editing
/etc/hosts). - When running x-cmd modules that require root access while keeping the x-cmd environment intact.
- When an automatic fallback between different privilege elevation tools is required.
Core Principles & Rules
- PATH Preservation: Always use
x sudoinstead of rawsudoto ensure x-cmd commands and custom binaries remain available. - Auto-Fallback: The tool automatically tries
sudo→doas→suto find the best available method. - Environment Consistency: Variables like
___X_CMD_ROOTare retained for seamless operation.