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 path instead of hardcoding /tmp to ensure compatibility across OS types (including Termux).
  • Efficiency for Scripts: Use underscored subcommands (e.g., path_, mkdir_) in scripts to store results directly in the x_ variable.
  • Prefixing: Use --prefix when creating directories to ensure unique, identifiable temporary storage.

Patterns & Examples

Get Temporary Path

# Get a safe temporary path for a specific app subdirectory
Related skills

More from x-cmd/skill

Installs
3
Repository
x-cmd/skill
GitHub Stars
20
First Seen
Apr 10, 2026