tmp
Installation
SKILL.md
tmp - Temporary File & Directory Management
The tmp module provides a cross-platform way to handle temporary storage, automatically identifying the system's temporary directory ($TMPDIR) and providing tools for safe creation.
When to Activate
- When a script needs a safe path for intermediate files.
- When creating temporary directories with random suffixes to avoid collisions.
- When managing a custom temporary root for a session or application.
Core Principles & Rules
- Cross-Platform Safety: Always rely on
x tmp pathinstead of hardcoding/tmpto ensure compatibility across OS types (including Termux). - Efficiency for Scripts: Use underscored subcommands (e.g.,
path_,mkdir_) in scripts to store results directly in thex_variable. - Prefixing: Use
--prefixwhen creating directories to ensure unique, identifiable temporary storage.