dirs

Resolve platform-specific config, data, and cache directories for Rust applications.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill dirs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dirs
Source: https://github.com/yankeeinlondon/rusty-biscuit/tree/main/.claude/skills/dirs
Command: npx skills add https://github.com/yankeeinlondon/rusty-biscuit --skill dirs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Platform-specific directory resolution for Rust applications. Use when working with config, cache, data, or home directories. Covers XDG spec on Linux, ~/Library on macOS, %APPDATA% on Windows, and cross-platform fallback strategies.

Core Features & Use Cases

  • Platform-aware directory resolution for config, data, and caches across platforms.
  • Returns paths without creating directories, enabling the app to decide when to create them.
  • Safe fallbacks to platform-specific defaults and predictable behavior.

Quick Start

Locate the appropriate platform directories for your Rust project without creating them.

Frequently Asked Questions about dirs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve platform-specific config, data, and cache directories in Rust?

Platform-specific directory resolution in Rust maps to XDG on Linux, macOS Library locations, and Windows Known Folders. It returns Option paths for config, data, and cache directories without creating them, letting your app decide when to instantiate the resolved paths.

Does Rust directory resolution follow the XDG Base Directory specification on Linux?

Yes, Rust directory resolution follows the XDG spec on Linux, mapping config, data, and cache variables to their appropriate directories. It provides safe fallbacks to platform-specific defaults when XDG variables are not set.

What is the best way to handle cross-platform path resolution for a Rust application?

The best way to handle cross-platform path resolution is using a platform-aware approach that enforces predictable behavior across Linux, macOS, and Windows. It returns Option paths instead of automatically creating directories, ensuring safe fallbacks to platform-specific defaults.

Why does my Rust directory resolution return paths without creating the directories?

Rust directory resolution intentionally returns paths without creating directories to enforce non-creation behavior. This enables your application to decide exactly when to instantiate the resolved config, data, or cache directories, preventing premature or unwanted folder generation.

Can I use Rust directory resolution to locate the user home directory across different operating systems?

Yes, Rust directory resolution supports locating the user home directory across Linux, macOS, and Windows. It sits alongside resolving user-level config, data, and cache directories, providing predictable paths based on platform-specific defaults and safe fallbacks.

What are the limitations of using platform-aware path resolution in Rust?

A limitation of platform-aware path resolution in Rust is that it returns Option paths and does not create directories, requiring your application to handle instantiation separately. It relies on platform-specific defaults and safe fallbacks rather than custom path overrides.