cross-platform-path-handler

Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.

509 stars

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

$curl -o ~/.claude/skills/cross-platform-path-handler/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/cli-mcp-development/skills/cross-platform-path-handler/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cross-platform-path-handler/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cross-platform-path-handler Compares

Feature / Agentcross-platform-path-handlerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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-bootstrap

Related Skills

survey-platform

509
from a5c-ai/babysitter

Integrate with survey platforms to create, distribute, and analyze user surveys

readme-platform

509
from a5c-ai/babysitter

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

509
from a5c-ai/babysitter

JWT creation, validation, and management for SDK authentication

gsea-pathway-analyzer

509
from a5c-ai/babysitter

Gene Set Enrichment Analysis skill for functional annotation and pathway interpretation

path-planning

509
from a5c-ai/babysitter

Trajectory planning and motion control algorithm development

investor-relations-platform

509
from a5c-ai/babysitter

Investor communications and financial disclosure management for public company stakeholder relations

internal-comms-platform

509
from a5c-ai/babysitter

Employee communications platform integration and analytics

crisis-management-platform

509
from a5c-ai/babysitter

Crisis response platform integration and real-time monitoring

critical-path-analyzer

509
from a5c-ai/babysitter

Perform critical path method (CPM) analysis with forward/backward pass calculations

paid-media-platforms

509
from a5c-ai/babysitter

Cross-platform paid advertising management and optimization

market-research-platform

509
from a5c-ai/babysitter

Integration with market research platforms and survey tools for primary and secondary research

customer-data-platform

509
from a5c-ai/babysitter

CDP operations for unified customer data management and audience activation