Generate cross-platform path handling utilities for Windows, macOS, and Linux compatibility in CLI applications.
Generates cross-platform path utilities for CLI applications to ensure Windows, macOS, and Linux compatibility.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdGenerate cross-platform path handling utilities.
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);
}
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.