add-config-field

Guide adding a new config field across types, defaults, config.yaml, and optional state/env wiring.

16 stars

Best use case

add-config-field is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Guide adding a new config field across types, defaults, config.yaml, and optional state/env wiring.

Teams using add-config-field should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/add-config-field/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/add-config-field/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/add-config-field/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How add-config-field Compares

Feature / Agentadd-config-fieldStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Guide adding a new config field across types, defaults, config.yaml, and optional state/env wiring.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

You are a guided assistant for adding new configuration fields to the claude-code-reviewer project. You will gather requirements, show current state, and produce an implementation checklist with exact file locations.

## Step 1: Gather Requirements

Ask the user for:

1. **Field name** — camelCase (e.g., `maxConcurrentReviews`)
2. **Config section** — which interface it belongs to: `ReviewConfig`, `PollingConfig`, `WebhookConfig`, `GithubConfig`, or top-level `AppConfig`
3. **Type** — TypeScript type (e.g., `number`, `boolean`, `string`, `string[]`)
4. **Default value** — what the default should be
5. **Description** — one-line description for config.yaml comment
6. **Is it also a PRState field?** — does it need to be tracked per-PR in the state file?
7. **Is it a ReviewRecord field?** — does it need to be stored per-review in the reviews array?
8. **Needs env override?** — should there be an environment variable override (like `GITHUB_TOKEN`)?

## Step 2: Show Current State

Read and display the relevant sections:

- The target interface from `src/types.ts` (e.g., `ReviewConfig`)
- The corresponding DEFAULTS section from `src/config.ts`
- The corresponding section from `config.yaml`
- If PRState field: show `PRState` interface, `getOrCreate` defaults, and V2 backfill loop from `src/state/store.ts`
- If ReviewRecord field: show `ReviewRecord` interface and the nested backfill loop (`for (const rev of entry.reviews)`) in `src/state/store.ts`

## Step 3: Generate Implementation Checklist

Produce a numbered checklist with exact file paths and locations:

### A. Add to interface — `src/types.ts`

Show the exact line to add the field to the interface, matching existing style (field name, type, with a comment if other fields have comments).

### B. Add to DEFAULTS — `src/config.ts`

Show the exact line to add in the `DEFAULTS` constant, matching existing indentation and value format.

### C. Document in config.yaml — `config.yaml`

Show the exact line to add under the relevant section, with a trailing comment matching the style of existing entries.

### D. (Optional) Add env override — `src/config.ts`

If an env override is needed, show the `if (process.env.X)` block to add in the env override section of `loadConfig()`, matching the pattern of existing overrides:
- `GITHUB_TOKEN` → string, no validation
- `WEBHOOK_SECRET` → string, no validation
- `WEBHOOK_PORT` → numeric, range validation (1-65535)
- `POLLING_INTERVAL` → numeric, `>= 1` validation
- `MODE` → enum, allowed-values validation

Use the appropriate validation pattern for the field's type. Also add a `# or ENV_VAR_NAME env var` comment to the field's entry in `config.yaml`, matching the pattern used for `secret` and `token`.

### E. (Optional) Add to PRState — `src/types.ts` + `src/state/store.ts`

If it's also a PRState field:
- Add to `PRState` interface in `src/types.ts`
- Add default in `getOrCreate()` in `src/state/store.ts`
- Add backfill in the V2 backfill loop in `store.ts` (using `entry.field ??= defaultValue`)
- Add field in the V1 migration `migrateV1()` in `store.ts`

### F. (Optional) Add to ReviewRecord — `src/types.ts` + `src/state/store.ts`

If it's a ReviewRecord field:
- Add to `ReviewRecord` interface in `src/types.ts`
- Add backfill in the nested loop in `store.ts` (`for (const rev of entry.reviews) { rev.field ??= defaultValue; }`)
- Add field in the V1 migration `migrateV1()` ReviewRecord object in `store.ts`

## Step 4: Recommend Verification

After implementation, recommend running `/verify-build` to confirm:
- Build passes
- Config defaults are complete
- Config.yaml docs are complete
- State backfill covers the new field (if applicable)

## Notes

- Do NOT make the changes yourself — present the checklist for the user to review, then implement only after confirmation
- Match existing code style exactly (indentation, trailing commas, comment format)
- If the field affects review behavior, mention that `decisions.ts` or `reviewer.ts` may need updates to actually use the field

Related Skills

ameba-configuration

16
from diegosouzapw/awesome-omni-skill

Use when configuring Ameba rules and settings for Crystal projects including .ameba.yml setup, rule management, severity levels, and code quality enforcement.

akka-net-aspire-configuration

16
from diegosouzapw/awesome-omni-skill

Configure Akka.NET with .NET Aspire for local development and production deployments. Covers actor system setup, clustering, persistence, Akka.Management integration, and Aspire orchestration patterns.

add-app-config

16
from diegosouzapw/awesome-omni-skill

Use when adding configuration for a new application to the dotfiles, setting up a new tool's config, or when user says "add config for X"

abaqus-field

16
from diegosouzapw/awesome-omni-skill

Define initial conditions and predefined fields. Use when user mentions initial temperature, pre-stress, residual stress, or import from previous analysis.

a2a-server-config

16
from diegosouzapw/awesome-omni-skill

Agent-to-Agent (A2A) server configuration patterns for HTTP, STDIO, SSE, and WebSocket transports. Use when building A2A servers, configuring MCP transports, setting up server endpoints, or when user mentions A2A configuration, server transport, MCP server setup, or agent communication protocols.

configure-downstream

16
from diegosouzapw/awesome-omni-skill

Configure Konflux for new Submariner version - creates overlays, tenant config, and RPAs for Y-stream releases.

aerospace-config

16
from diegosouzapw/awesome-omni-skill

Complete AeroSpace tiling window manager configuration assistant for macOS. Use for any AeroSpace configuration task including keybindings, workspace management, window rules, layouts (BSP, columns, rows, accordion), focus behavior, gaps, floating windows, app-specific settings, exec commands, or any window management customization. Also use for debugging and troubleshooting AeroSpace issues including log inspection, window state analysis, and diagnosing layout problems. This skill fetches fresh documentation for each request to ensure accurate, up-to-date guidance.

aceternity-ui-configuration

16
from diegosouzapw/awesome-omni-skill

Specifies that Aceternity UI dependencies should be considered during code generation or modification.

openclaw-config-validator

16
from diegosouzapw/awesome-omni-skill

Validate, analyze, and explain OpenClaw configuration files. Use when users need to check config.json for errors, understand what a config field does, compare configs, or safely modify OpenClaw configuration. Triggers on config validation requests, schema questions, or config editing tasks.

import-existing-ai-config

16
from diegosouzapw/awesome-omni-skill

Import existing AI tool configurations (from Claude, Copilot, or Cursor) into universal-ai-config templates. Converts target-specific files into universal templates.

excel-field-analyzer

16
from diegosouzapw/awesome-omni-skill

分析Excel/CSV字段结构,AI自动生成中英文映射,验证翻译质量,输出统计报告。用于电子表格分析、数据字典创建、字段映射场景。

EchoKit Config Generator

16
from diegosouzapw/awesome-omni-skill

Generate config.toml for EchoKit servers with interactive setup for ASR, TTS, LLM services, MCP servers, API key entry, and server launch