> This page is for Server SDKs.

> 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.

# addSkill

> Load and activate a skill on the agent.

[list-skills]: /docs/server-sdks/reference/typescript/agents/agent-base/list-skills

[skills-catalog]: /docs/server-sdks/reference/typescript/agents/skills

[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

Load and activate a skill on this agent. Skills are pluggable capability modules that
register their own tools, prompts, hints, and global data. The `addSkill()` method
takes a `SkillBase` instance (not a string name).

> **Note**
>
> This is an `async` method that returns `Promise<this>`. Use `await` when calling.
>
> `addSkill()` **fails closed**: it throws if a duplicate non-multi-instance
> skill is added, if required environment variables or packages are missing,
> if the skill's parameter schema is empty, or if the skill's `setup()`
> returns `false`. The method also registers any DataMap-style tools the
> skill exposes via `getDataMapTools()`.
>
> Check available skills with [`listSkills()`][list-skills] or consult the
> [skills catalog][skills-catalog].

## **Parameters**

**`skill`** `SkillBase` — required

A skill instance to add to the agent. Skills extend `SkillBase` and provide
tools, prompt sections, hints, and global data.

---

## **Returns**

`Promise<this>` -- Returns `this` for method chaining (async).

## **Example**

```typescript {5}
import { AgentBase, DateTimeSkill, MathSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');
await agent.addSkill(new DateTimeSkill());
await agent.addSkill(new MathSkill());
await agent.serve();
```