Set up cosmiconfig for hierarchical configuration loading from multiple sources and formats.
Configures hierarchical application settings from multiple file formats and search locations.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdSet up cosmiconfig for hierarchical config loading.
import { cosmiconfig, cosmiconfigSync } from 'cosmiconfig';
import { TypeScriptLoader } from 'cosmiconfig-typescript-loader';
const moduleName = 'myapp';
const explorer = cosmiconfig(moduleName, {
searchPlaces: [
'package.json',
`.${moduleName}rc`,
`.${moduleName}rc.json`,
`.${moduleName}rc.yaml`,
`.${moduleName}rc.yml`,
`.${moduleName}rc.js`,
`.${moduleName}rc.ts`,
`.${moduleName}rc.cjs`,
`${moduleName}.config.js`,
`${moduleName}.config.ts`,
`${moduleName}.config.cjs`,
],
loaders: {
'.ts': TypeScriptLoader(),
},
});
export async function loadConfig(searchFrom?: string) {
const result = await explorer.search(searchFrom);
if (!result || result.isEmpty) {
return { config: getDefaultConfig(), filepath: null };
}
return { config: { ...getDefaultConfig(), ...result.config }, filepath: result.filepath };
}
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.