> 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. # setup > Initialize the skill and prepare resources. Return false to fail closed. [ref-skillbase]: /docs/server-sdks/reference/typescript/agents/skill-base [ref-addskill]: /docs/server-sdks/reference/typescript/agents/skill-manager/add-skill Initialize the skill: validate environment variables, initialize API clients, and prepare resources. Called once when the skill is loaded, before any tool registration. This is a concrete method with a default that returns `true`. Override it in your [SkillBase][ref-skillbase] subclass when you need initialization logic or need to short-circuit loading on invalid config. > **Note** > > Returning `false` from `setup()` causes [`SkillManager.addSkill()`][ref-addskill] > (and `AgentBase.addSkill()`) to **fail closed**: the skill is not registered > and the call throws. This matches the Python SDK's behavior — never silently > continue with a half-initialized skill. Takes no parameters. ## **Returns** `Promise` — `true` on success, `false` to signal that the skill cannot be loaded (invalid config, missing credentials, failed handshake, etc.). ## **Example** ```typescript {2-9} class MySkill extends SkillBase { override async setup(): Promise { if (!this.hasAllEnvVars()) return false; const missing = await this.validatePackages(); if (missing.length) return false; // Initialize API connections here return true; } } ``` > Initialize the skill and prepare resources. Return false to fail closed.