> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# loadSkillByName

> Look up a skill class in the global registry by name and load it.

[ref-addskill]: /docs/server-sdks/reference/typescript/agents/skill-manager/add-skill

[ref-registry]: /docs/server-sdks/reference/typescript/agents/skill-registry

Look up a registered skill class by name in the global
[`SkillRegistry`][ref-registry], construct an instance, and add it via
[`addSkill`][ref-addskill]. Returns `[false, message]` if the name is not
registered, the instantiation fails, or `addSkill` throws.

## **Parameters**

<ParamField path="skillName" type="string" required={true} toc={true}>
  Registered skill name (read from the target class's `SKILL_NAME`).
</ParamField>

<ParamField path="config" type="SkillConfig" toc={true}>
  Optional configuration forwarded to the skill constructor.
</ParamField>

## **Returns**

`Promise<[boolean, string]>` — `[true, '']` on success, `[false, errorMessage]`
otherwise.

## **Example**

```typescript {1}
const [ok, err] = await agent.skillManager.loadSkillByName('datetime');
if (!ok) throw new Error(err);
```