🔧Tool Prompts/system

Config Tool

src/tools/ConfigTool/prompt.ts

Prompt Engineering Insight

The Config tool prompt dynamically generates its settings list from a SUPPORTED_SETTINGS registry at runtime, making it a self-documenting tool. The get/set pattern uses structured output with concrete JSON examples that serve as few-shot templates. The separation of global vs. project settings teaches the model about configuration scoping, and the examples cover diverse setting types (strings, booleans, enums).

Techniques Used

structured-outputfew-shot-examplescontext-injectiontaxonomy
prompt
Get or set Claude Code configuration settings.
View or change Claude Code settings. Use when the user requests configuration changes, asks about current settings, or when adjusting a setting would benefit them.
Usage
  • Get current value: Omit the "value" parameter
  • Set new value: Include the "value" parameter
Configurable settings list
The following settings are available for you to change:
Global Settings (stored in ~/.claude.json)
[Dynamic list generated from SUPPORTED_SETTINGS registry — includes settings like theme, editorMode, verbose, etc. with their types and descriptions]
Project Settings (stored in settings.json)
[Dynamic list generated from SUPPORTED_SETTINGS registry — includes project-level configuration]
Model
  • model - Override the default model. Available options:
[Dynamic list from getModelOptions() — includes sonnet, opus, haiku, best, or full model ID]
Examples
  • Get theme: { "setting": "theme" }
  • Set dark theme: { "setting": "theme", "value": "dark" }
  • Enable vim mode: { "setting": "editorMode", "value": "vim" }
  • Enable verbose: { "setting": "verbose", "value": true }
  • Change model: { "setting": "model", "value": "opus" }
  • Change permission mode: { "setting": "permissions.defaultMode", "value": "plan" }

Tags

configurationsettingspreferencesthememodel-selection