agentsclimarketplace

Cosmiconfig setup

Skill a5c-ai/babysitter/library/specializations/cli-mcp-development/skills/cosmiconfig-setup

Babysitter enforces obedience on agentic workforces and enables them to manage extremely complex tasks and workflows through deterministic, hallucination-free self-orchestration

Install
npx -y skills add a5c-ai/babysitter --skill cosmiconfig-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Set up cosmiconfig for hierarchical configuration loading from multiple sources and formats.

SKILL.md

1.8 KB, as published. Nobody here has run it

Cosmiconfig Setup

Set up cosmiconfig for hierarchical config loading.

Capabilities

  • Configure cosmiconfig search paths
  • Set up format loaders (JSON, YAML, TOML)
  • Create TypeScript config support
  • Implement config caching
  • Handle config validation

Generated Patterns

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 };
}

Target Processes

  • configuration-management-system
  • cli-application-bootstrap
  • mcp-server-bootstrap

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.