cross-platform-path-handler
Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.
Best use case
cross-platform-path-handler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.
Teams using cross-platform-path-handler should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cross-platform-path-handler/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How cross-platform-path-handler Compares
| Feature / Agent | cross-platform-path-handler | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Cross-Platform Path Handler
Generate cross-platform path handling utilities.
## Capabilities
- Normalize path separators
- Handle home directory expansion
- Create platform-specific path utilities
- Configure config directory locations
- Handle UNC paths on Windows
- Generate path manipulation helpers
## Generated Patterns
### TypeScript Path Utilities
```typescript
import path from 'path';
import os from 'os';
import fs from 'fs';
export function normalizePath(p: string): string {
return p.replace(/\\/g, '/');
}
export function toPlatformPath(p: string): string {
return p.split('/').join(path.sep);
}
export function expandHome(p: string): string {
if (p.startsWith('~')) {
return path.join(os.homedir(), p.slice(1));
}
return p;
}
export function getConfigDir(appName: string): string {
const platform = process.platform;
if (platform === 'win32') {
return path.join(process.env.APPDATA || '', appName);
}
if (platform === 'darwin') {
return path.join(os.homedir(), 'Library', 'Application Support', appName);
}
return path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'), appName);
}
export function getDataDir(appName: string): string {
const platform = process.platform;
if (platform === 'win32') {
return path.join(process.env.LOCALAPPDATA || '', appName);
}
if (platform === 'darwin') {
return path.join(os.homedir(), 'Library', 'Application Support', appName);
}
return path.join(process.env.XDG_DATA_HOME || path.join(os.homedir(), '.local', 'share'), appName);
}
export function getCacheDir(appName: string): string {
const platform = process.platform;
if (platform === 'win32') {
return path.join(process.env.LOCALAPPDATA || '', appName, 'Cache');
}
if (platform === 'darwin') {
return path.join(os.homedir(), 'Library', 'Caches', appName);
}
return path.join(process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache'), appName);
}
```
## Target Processes
- cross-platform-cli-compatibility
- configuration-management-system
- cli-application-bootstrapRelated Skills
survey-platform
Integrate with survey platforms to create, distribute, and analyze user surveys
readme-platform
ReadMe.com platform integration for API documentation. Sync OpenAPI specs, manage versions, configure API reference settings, automate changelogs, and integrate with metrics dashboards.
jwt-handler
JWT creation, validation, and management for SDK authentication
gsea-pathway-analyzer
Gene Set Enrichment Analysis skill for functional annotation and pathway interpretation
path-planning
Trajectory planning and motion control algorithm development
investor-relations-platform
Investor communications and financial disclosure management for public company stakeholder relations
internal-comms-platform
Employee communications platform integration and analytics
crisis-management-platform
Crisis response platform integration and real-time monitoring
critical-path-analyzer
Perform critical path method (CPM) analysis with forward/backward pass calculations
paid-media-platforms
Cross-platform paid advertising management and optimization
market-research-platform
Integration with market research platforms and survey tools for primary and secondary research
customer-data-platform
CDP operations for unified customer data management and audience activation