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

# addSkillByName

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

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

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

Look up a skill class by name in the global
[`SkillRegistry`][ref-registry], instantiate it, and add it to the agent via
[`addSkill`][ref-addskill]. Fails closed like `addSkill`.

## **Parameters**

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

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

## **Returns**

`Promise<this>` — the agent for method chaining.

## **Example**

```typescript {3}
const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');
await agent.addSkillByName('datetime');
await agent.addSkillByName('web_search', { num_results: 3 });
```