Generate multi-format configuration file loaders for YAML, JSON, and TOML formats.
Generates configuration file loaders for YAML, JSON, and TOML formats with auto-detection and save capabilities.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdGenerate multi-format config file loaders.
import fs from 'fs';
import path from 'path';
import yaml from 'yaml';
import toml from '@iarna/toml';
type ConfigFormat = 'json' | 'yaml' | 'toml' | 'auto';
export function loadConfigFile(filepath: string, format: ConfigFormat = 'auto'): unknown {
const content = fs.readFileSync(filepath, 'utf-8');
const ext = format === 'auto' ? path.extname(filepath).toLowerCase() : `.${format}`;
switch (ext) {
case '.json': return JSON.parse(content);
case '.yaml': case '.yml': return yaml.parse(content);
case '.toml': return toml.parse(content);
default: throw new Error(`Unknown config format: ${ext}`);
}
}
export function saveConfigFile(filepath: string, data: unknown, format: ConfigFormat = 'auto'): void {
const ext = format === 'auto' ? path.extname(filepath).toLowerCase() : `.${format}`;
let content: string;
switch (ext) {
case '.json': content = JSON.stringify(data, null, 2); break;
case '.yaml': case '.yml': content = yaml.stringify(data); break;
case '.toml': content = toml.stringify(data as any); break;
default: throw new Error(`Unknown format: ${ext}`);
}
fs.writeFileSync(filepath, content);
}
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.