mcpbeat Sign in

Create Runtime Setting Agent Skill

Create a new RuntimeSetting that can be changed at runtime via `agent config set/get` and the config API

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3695
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/DataDog/datadog-agent --skill create-runtime-setting

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting
Glob reads your files

The instruction itself

9 sections, as written by the author

Create a new RuntimeSetting implementation for the Datadog Agent. RuntimeSettings are settings that can be read and changed at runtime via:

  • The CLI: agent config get <setting>, agent config set <setting> <value>, agent config list-runtime
  • The HTTP API: GET /config/{setting}, POST /config/{setting}

Instructions

Step 1: Gather information from the user

Use AskUserQuestion to collect the following. If $ARGUMENTS provides the setting name, skip that question.

  • Setting name (the config key, e.g. log_payloads, dogstatsd_stats): the name used to register and access the setting via the API.
  • Value type: What type of value does this setting hold?
  • Boolean (true/false)
  • Integer
  • String
  • String slice (list of strings)
  • Description: A human-readable description of what this setting controls (shown in /config/list-runtime).
  • Hidden: Should this setting be hidden from the public runtime settings list? (default: false)
  • Scope: Where should this setting live?
  • Shared (pkg/config/settings/) — Used by multiple agent services (agent, trace-agent, process-agent, etc.)
  • Agent-specific (cmd/agent/subcommands/run/internal/settings/) — Only used by the core agent
  • Config key: The datadog.yaml config key this setting maps to (e.g. log_payloads, internal_profiling.enabled). Often the same as the setting name, but can differ.
  • Which services should register it: Ask which services should have this setting registered:
  • Core Agent (cmd/agent/subcommands/run/command.go)
  • Cluster Agent (cmd/cluster-agent/subcommands/start/command.go)
  • Trace Agent (cmd/trace-agent/subcommands/run/command.go)
  • Process Agent (cmd/process-agent/subcommands/run/command.go)
  • Security Agent (cmd/security-agent/subcommands/runtime/command.go)
  • System Probe (cmd/system-probe/subcommands/run/command.go)
  • DogStatsD (cmd/dogstatsd/subcommands/start/command.go)

Step 2: Read reference examples from the codebase

Before writing any code, read the appropriate reference files to follow existing patterns exactly.

  • Read the interface defined in comp/core/settings/component.go to understand the RuntimeSetting methods.
  • Read an existing implementation matching the chosen value type. Use Glob with pattern pkg/config/settings/runtime_setting_*.go to list available examples, then read one that matches the desired type (boolean, integer, string, etc.).
  • Read the test file alongside the chosen reference to see the test pattern.
  • Read a registration site: Look at one of the command.go files listed in Step 1.7 to see how settings are added to the Settings map.

Step 3: Create the RuntimeSetting implementation file

File naming convention: runtime_setting_<feature_name>.go

File location:

  • Shared: pkg/config/settings/runtime_setting_<feature>.go
  • Agent-specific: cmd/agent/subcommands/run/internal/settings/runtime_setting_<feature>.go

Create the implementation following the patterns from the reference file read in Step 2. Every RuntimeSetting needs:

  • Struct with a ConfigKey string field
  • Constructor New<Name>RuntimeSetting() that sets the config key
  • Description() — returns the human-readable description
  • Hidden() — returns whether hidden from list-runtime
  • Name() — returns the config key
  • Get(config) — reads the current value using the appropriate typed getter
  • Set(config, v, source) — validates/converts the input value, then calls config.Set()

Type conversion in Set(): for Boolean and Integer types, use the GetBool(v) / GetInt(v) helper functions from pkg/config/settings — these handle string-to-type conversion. For agent-specific settings, import the helpers via settings "github.com/DataDog/datadog-agent/pkg/config/settings".

Step 4: Create a unit test file

Create a test file alongside the implementation: runtime_setting_<feature>_test.go

Follow the test patterns from the reference test file read in Step 2. The test should verify:

  • Name(), Description(), Hidden() return expected values
  • Get returns the correct value from config
  • Set with a valid value updates the config
  • Set with a string representation works (e.g. "true"/"false" for bools)
  • Set with an invalid value returns an error

Step 5: Register the setting

Find the settings.Params provider in the appropriate command.go file(s) for each selected service (from Step 1.7). Add the new setting to the Settings map following the existing pattern in that file. The import alias convention and registration format are visible in the existing entries.

Step 6: Verify

  • Run the new test:
   dda inv test --targets=<package_path>
  • Run the linter on changed files:
   dda inv linter.go
  • Report the results to the user. If tests or linting fail, fix the issues.

Important Notes

  • The RuntimeSetting interface is defined in comp/core/settings/component.go
  • Helper functions GetBool and GetInt are in pkg/config/settings/runtime_setting.go
  • All Set methods receive a model.Source parameter for config source tracking — always pass it through to config.Set()
  • Settings are exposed via HTTP at /config/{setting_name} (GET to read, POST to write) and via the CLI: agent config get <setting>, agent config set <setting> <value>, agent config list-runtime
  • Follow existing code style: use the same comment patterns, error formatting, and naming conventions as existing RuntimeSettings

Usage

  • /create-runtime-setting — Interactive: prompts for all details
  • /create-runtime-setting my_new_setting — Pre-fills the setting name, prompts for the rest

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take datadog/create-runtime-setting from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.