Config File Patterns

Patterns for managing CLI configuration files across multiple scopes and formats. Load this file only when the task involves config loading, dotfiles, XDG compl

SEOCRO
bySamuelca63991,046 words

What is Config File Patterns?

What this skill does

Config File Patterns provides a structured approach to managing CLI configuration files across multiple scopes and formats, ensuring consistent loading, validation, and merging of settings. It covers handling user config directories following XDG standards, supports common formats like JSON, YAML, TOML, and TypeScript, and enforces schema validation to catch errors before runtime. This skill helps maintain reliable and predictable config resolution from defaults, files, environment variables, and CLI flags.

Who it's for

This skill is designed for performance marketers and growth leads working with developer tools or internal CLI utilities that require flexible yet robust configuration management. SEO and PPC operators managing automation scripts or reporting tools with complex environment setups will find it useful. Agency strategists integrating multiple client tools can leverage these patterns to standardize configuration handling and reduce errors during deployment or customization.

Key workflows

Practitioners typically start by defining a clear config schema using validation libraries like Zod or Pydantic, establishing default values and type constraints. Next, they implement a hierarchical loading process that merges hardcoded defaults, config files discovered via cosmiconfig or dynaconf, environment variables prefixed with the tool name, and finally CLI flags with the highest priority. They select appropriate file formats—JSON and YAML minimally, optionally TypeScript for enhanced developer experience—and structure config files within XDG-compliant directories. Finally, they validate the assembled config object at load time, reporting aggregated errors to prevent runtime failures.

Common questions

How should I organize config files across different environments? Use the XDG base directory specification to separate user config, state, cache, and data files, placing tool-specific files under these standard paths for consistency. Can I support multiple config formats in one tool? Yes, by using loaders like cosmiconfig or dynaconf that automatically detect and merge JSON, YAML, TOML, and TypeScript config files. What’s the best way to handle environment variables? Prefix each variable with the tool name in SCREAMING_SNAKE_CASE, map flags directly, and support boolean and list values using conventional formats like true/false and comma-separated strings.

How to use in Metaflow

Attach the Config File Patterns skill to any Metaflow agent task that involves CLI config loading, environment setup, or dotfile management. The skill will guide the agent through resolving config paths, detecting and merging multiple config sources, validating schemas, and applying environment variable conventions to ensure reliable and predictable configuration. This approach reduces errors and simplifies troubleshooting when deploying or updating CLI-driven workflows within Metaflow.

For broader context, see our roundup of claude skills marketing, and read Claude skills for SEO for related setup guidance.

Related skills

Paywall & Upgrade Flow Optimization

When the user wants to create or optimize in-app paywalls, upgrade screens, upsell modals, or feature gates. Also use when the user mentions "paywall," "upgrade screen," "upgrade modal," "upsell," "feature gate," "convert free to paid," "freemium conversion," "trial expiration screen," "limit reached screen," "plan upgrade prompt," "in-app pricing," "free users won't upgrade," "trial to paid conversion," or "how do I get users to pay." Use this for any in-product moment where you're asking users

View →

SERP Analysis

SERP analysis techniques for intent classification, feature identification, and competitive intelligence. Use when analyzing search results for content strategy.

View →

Schema Markup & Structured Data

When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," "breadcrumb schema," "Google rich results," "knowledge panel," "star ratings in search," or "add structured data." Use this whenever someone wants their pages to show enhanced results in Google. For broader SEO issues, see seo-audit. For AI search

View →

User Onboarding & Activation Optimization

When the user wants to optimize post-signup onboarding, user activation, first-run experience, or time-to-value. Also use when the user mentions "onboarding flow," "activation rate," "user activation," "first-run experience," "empty states," "onboarding checklist," "aha moment," "new user experience," "users aren't activating," "nobody completes setup," "low activation rate," "users sign up but don't use the product," "time to value," or "first session experience." Use this whenever users are si

View →

Signup Flow Optimization

When the user wants to optimize signup, registration, account creation, or trial activation flows. Also use when the user mentions "signup conversions," "registration friction," "signup form optimization," "free trial signup," "reduce signup dropoff," "account creation flow," "people aren't signing up," "signup abandonment," "trial conversion rate," "nobody completes registration," "too many steps to sign up," or "simplify our signup." Use this whenever the user has a signup or registration flow

View →

SEO Audit

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," or "SEO health check." For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup.

View →