config-reader

majesticlabs-dev's avatarfrom majesticlabs-dev

Read project config from .agents.yml and .agents.local.yml with local overrides. Supports dot notation for nested fields. Invoke with args "<field> <default>".

⭐13stars🔀0forks📁View on GitHub🕐Updated Jan 3, 2026

When & Why to Use This Skill

The Config Reader skill empowers Claude agents to dynamically retrieve and manage project-specific configurations from YAML files. It features a robust hierarchical system that merges base settings from '.agents.yml' with local overrides from '.agents.local.yml', supporting dot notation for deep-field access. This ensures agents remain context-aware and adaptable to different development environments without manual reconfiguration.

Use Cases

  • Environment Customization: Automatically adjust agent behavior, such as tech stack selection or Git workflow styles, based on project-specific configuration files.
  • Workflow Automation Toggling: Enable or disable automated features like 'auto_preview' for markdown or 'auto_create_task' for project management by reading boolean flags from the config.
  • Local Path Management: Override shared team defaults with local-only settings, such as specific design system paths or local tool locations, ensuring the agent works correctly on individual developer machines.
nameconfig-reader
descriptionRead project config from .agents.yml and .agents.local.yml with local overrides. Supports dot notation for nested fields. Invoke with args "<field> <default>".
argument-hint"<field> [default]"

Config Reader

Read and merge .agents.yml and .agents.local.yml configuration files. Local config overrides base config.

Requires: yq (brew install yq or snap install yq)

Arguments

$ARGUMENTS format: <field> [default]

Examples:

  • auto_preview false - get top-level field, default to "false"
  • plan.auto_create_task false - get nested field, default to "false"
  • tech_stack generic - get top-level field, default to "generic"
  • browser.type chrome - get nested browser type
  • toolbox.build_task.design_system_path - get deeply nested field

Execution

Run the config reader script with parsed arguments:

bash {baseDir}/scripts/config_reader.sh FIELD DEFAULT

Replace FIELD and DEFAULT with the parsed arguments from $ARGUMENTS.

Return Value

Return ONLY the config value (single line):

  • true
  • rails
  • github

Merge Logic

  1. Local checked first - .agents.local.yml wins if key exists
  2. Fall back to base - .agents.yml if not in local
  3. Default - provided default if neither has the key

Common Fields

Field Description Typical Default
auto_preview Auto-open markdown files false
plan.auto_create_task Auto-create tasks from plans false
tech_stack Primary tech stack generic
task_management Task tracking backend none
workflow Git workflow style branches
toolbox.build_task.design_system_path Design system location (none)