> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # getConfig > Look up a configuration value passed to the skill's constructor. Look up a configuration value by key, with an optional default. The `config` object is whatever was passed to the skill's constructor (typed as `SkillConfig`, a string-keyed record). Values are returned as-is; the caller provides the type argument for casting. ## **Parameters** **`key`** `string` — required The configuration key to look up. --- **`defaultValue`** `T | undefined` Value to return when the key is not present. The result is cast to `T`. --- ## **Returns** `T` -- the configured value cast to the generic type, or the default value. ## **Example** ```typescript {9,10} import { SkillBase } from '@signalwire/sdk'; export class WeatherSkill extends SkillBase { static SKILL_NAME = 'weather'; static SKILL_DESCRIPTION = 'Fetches current weather for a city.'; async setup(): Promise { const apiKey = this.getConfig('api_key'); const units = this.getConfig<'metric' | 'imperial'>('units', 'metric'); if (!apiKey) return false; this.logger.info(`Weather skill configured in ${units} units`); return true; } } ``` > Look up a configuration value passed to the skill's constructor.