mcpField
C
config-reader

config-reader

github.com/majesticlabs-devAgent workflows5064 installsUpdated 7w ago
Repository

About config-reader

config-reader is a skill that retrieves values from `.agents.yml` and `.agents.local.yml`. It checks local overrides first, falls back to the base file, then uses an optional default; it requires yq.

Key features

  1. 01Reads base and local YAML config
  2. 02Local values override base values
  3. 03Supports nested field paths
  4. 04Returns a provided default when absent
  5. 05Requires yq

Use cases

  1. 01Checking a project's tech stack setting
  2. 02Reading nested workflow options
  3. 03Retrieving a browser type setting
  4. 04Using a fallback for missing fields

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill config-reader

After installing, type/config-readerin Claude Code to confirm it loaded.

Bundled filesscripts/config_reader.sh

Details

From the project README

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

FieldDescriptionTypical Default
auto_previewAuto-open markdown filesfalse
plan.auto_create_taskAuto-create tasks from plansfalse
tech_stackPrimary tech stackgeneric
task_managementTask tracking backendnone
workflowGit workflow stylebranches
toolbox.build_task.design_system_pathDesign system location(none)

Comments

Markdown supported