***

title: Skills
slug: /reference/typescript/agents/skills
description: Built-in skills catalog with configuration parameters and usage patterns.
max-toc-depth: 3
---------------------

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

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

[sw-search]: /docs/server-sdks/reference/typescript/agents/cli/sw-search

[infogathereragent]: /docs/server-sdks/reference/typescript/agents/prefabs#infogathereragent

[skillbase]: /docs/server-sdks/reference/typescript/agents/skill-base

[ref-datamap]: /docs/server-sdks/reference/typescript/agents/data-map

Skills are pluggable capabilities that add tools to your agent. Import a skill class,
instantiate it with optional configuration, and pass the instance to
[`addSkill()`][add-skill]. Each skill registers
one or more SWAIG functions automatically and injects prompt sections, hints, and
global data.

```typescript {8,11-14}
import { AgentBase, DateTimeSkill, WebSearchSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'my-agent', route: '/' });

agent.setPromptText('You are a helpful assistant.');

// No-config skill
await agent.addSkill(new DateTimeSkill());

// Skill with parameters
await agent.addSkill(new WebSearchSkill({
  max_results: 5,
  safe_search: 'high',
}));

agent.run();
```

## Skills Summary

| Skill                                                                                                 | Class                       | Tools   | Env Vars Required | Multi-Instance |
| ----------------------------------------------------------------------------------------------------- | --------------------------- | ------- | ----------------- | -------------- |
| [`datetime`](/docs/server-sdks/reference/typescript/agents/skills/datetime)                           | `DateTimeSkill`             | 1       | No                | No             |
| [`math`](/docs/server-sdks/reference/typescript/agents/skills/math)                                   | `MathSkill`                 | 1       | No                | No             |
| [`joke`](/docs/server-sdks/reference/typescript/agents/skills/joke)                                   | `JokeSkill`                 | 1       | No                | No             |
| [`weather_api`](/docs/server-sdks/reference/typescript/agents/skills/weather-api)                     | `WeatherApiSkill`           | 1       | Yes               | No             |
| [`web_search`](/docs/server-sdks/reference/typescript/agents/skills/web-search)                       | `WebSearchSkill`            | 1       | Yes               | No             |
| [`wikipedia_search`](/docs/server-sdks/reference/typescript/agents/skills/wikipedia-search)           | `WikipediaSearchSkill`      | 1       | No                | No             |
| [`google_maps`](/docs/server-sdks/reference/typescript/agents/skills/google-maps)                     | `GoogleMapsSkill`           | 2       | Yes               | No             |
| [`play_background_file`](/docs/server-sdks/reference/typescript/agents/skills/play-background-file)   | `PlayBackgroundFileSkill`   | 2       | No                | No             |
| [`swml_transfer`](/docs/server-sdks/reference/typescript/agents/skills/swml-transfer)                 | `SwmlTransferSkill`         | 1-2     | No                | No             |
| [`datasphere`](/docs/server-sdks/reference/typescript/agents/skills/datasphere)                       | `DataSphereSkill`           | 1       | Yes               | Yes            |
| [`datasphere_serverless`](/docs/server-sdks/reference/typescript/agents/skills/datasphere-serverless) | `DataSphereServerlessSkill` | 1       | Yes               | Yes            |
| [`native_vector_search`](/docs/server-sdks/reference/typescript/agents/skills/native-vector-search)   | `NativeVectorSearchSkill`   | 1       | No                | Yes            |
| [`info_gatherer`](/docs/server-sdks/reference/typescript/agents/skills/info-gatherer)                 | `InfoGathererSkill`         | 2       | No                | No             |
| [`api_ninjas_trivia`](/docs/server-sdks/reference/typescript/agents/skills/api-ninjas-trivia)         | `ApiNinjasTriviaSkill`      | 1       | Yes               | No             |
| [`spider`](/docs/server-sdks/reference/typescript/agents/skills/spider)                               | `SpiderSkill`               | 1       | Yes               | No             |
| [`ask_claude`](/docs/server-sdks/reference/typescript/agents/skills/ask-claude)                       | `AskClaudeSkill`            | 1       | Yes               | No             |
| [`claude_skills`](/docs/server-sdks/reference/typescript/agents/skills/claude-skills)                 | `ClaudeSkillsSkill`         | Dynamic | No                | Yes            |
| [`custom_skills`](/docs/server-sdks/reference/typescript/agents/skills/custom-skills)                 | `CustomSkillsSkill`         | Dynamic | No                | No             |
| [`mcp_gateway`](/docs/server-sdks/reference/typescript/agents/skills/mcp-gateway)                     | `McpGatewaySkill`           | 1       | No                | No             |

## Configuration

All skills accept configuration via a config object passed to the skill constructor.
Skills with an `env_var` fallback on a parameter read from `process.env` when the
parameter is not provided directly.

```typescript {4}
import { WebSearchSkill } from '@signalwire/sdk';

// Direct configuration
const skill = new WebSearchSkill({ max_results: 5, safe_search: 'high' });

// Environment variable fallback (api_key falls back to GOOGLE_SEARCH_API_KEY,
// search_engine_id falls back to GOOGLE_SEARCH_CX)
process.env.GOOGLE_SEARCH_API_KEY = 'YOUR_KEY';
process.env.GOOGLE_SEARCH_CX = 'YOUR_ENGINE_ID';
const skillWithEnv = new WebSearchSkill({ max_results: 5 });
```

### SWAIG Field Overrides

Override SWAIG function metadata for any skill by including a `swaig_fields` key:

```typescript {6-11}
import { AgentBase, DateTimeSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');

await agent.addSkill(new DateTimeSkill({
  swaig_fields: {
    fillers: { 'en-US': ['Let me check the time...', 'One moment...'] },
    secure: false,
  },
}));

agent.run();
```

### Multi-Instance Skills

Skills that support multiple instances (`SUPPORTS_MULTIPLE_INSTANCES = true`)
can be added to the same agent more than once with different `tool_name` values:

```typescript {6-9,10-13}
import { AgentBase, DataSphereSkill } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');

await agent.addSkill(new DataSphereSkill({
  tool_name: 'search_products',
  max_results: 3,
}));
await agent.addSkill(new DataSphereSkill({
  tool_name: 'search_policies',
  max_results: 5,
}));

agent.run();
```

### Base Parameters

Every skill inherits these parameters from `SkillBase`:

<ParamField path="swaig_fields" type="object" toc={true}>
  Additional SWAIG fields to merge into each tool definition provided by this skill
  (e.g., `fillers`, `secure`).
</ParamField>

<ParamField path="skip_prompt" type="boolean" default="false" toc={true}>
  When `true`, suppress all prompt sections from this skill.
</ParamField>

***

## Extending SkillBase

Create custom skills by extending [`SkillBase`][skillbase] and registering
them with the `SkillRegistry`.

### Defining a Custom Skill

```typescript {10}
import { SkillBase, FunctionResult } from '@signalwire/sdk';
import type {
  SkillManifest,
  SkillToolDefinition,
  SkillPromptSection,
  SkillConfig,
  ParameterSchemaEntry,
} from '@signalwire/sdk';

export class StockPriceSkill extends SkillBase {
  constructor(config?: SkillConfig) {
    super('stock_price', config);
  }

  static override getParameterSchema(): Record<string, ParameterSchemaEntry> {
    return {
      ...super.getParameterSchema(),
      api_key: {
        type: 'string',
        description: 'Stock API key.',
        hidden: true,
        env_var: 'STOCK_API_KEY',
        required: true,
      },
    };
  }

  getManifest(): SkillManifest {
    return {
      name: 'stock_price',
      description: 'Look up current stock prices.',
      version: '1.0.0',
      requiredEnvVars: ['STOCK_API_KEY'],
    };
  }

  getTools(): SkillToolDefinition[] {
    return [
      {
        name: 'get_stock_price',
        description: 'Get the current price of a stock by ticker symbol.',
        parameters: {
          symbol: {
            type: 'string',
            description: 'Stock ticker symbol (e.g., "AAPL", "GOOG").',
          },
        },
        required: ['symbol'],
        handler: async (args: Record<string, unknown>) => {
          const symbol = args.symbol as string;
          // Your implementation here
          return new FunctionResult(
            'The current price of ' + symbol + ' is $150.00.',
          );
        },
      },
    ];
  }

  protected override _getPromptSections(): SkillPromptSection[] {
    return [
      {
        title: 'Stock Prices',
        body: 'You can look up current stock prices.',
        bullets: [
          'Use the get_stock_price tool when the user asks about a stock price.',
          'Provide the stock ticker symbol (e.g., AAPL for Apple).',
        ],
      },
    ];
  }
}
```

### Registering with SkillRegistry

```typescript {4-5}
import { SkillRegistry } from '@signalwire/sdk';
import { StockPriceSkill } from './stock-price-skill.js';

const registry = SkillRegistry.getInstance();
registry.register('stock_price', (config) => new StockPriceSkill(config));
```

### Using a Custom Skill

```typescript {7}
import { AgentBase } from '@signalwire/sdk';
import { StockPriceSkill } from './stock-price-skill.js';

const agent = new AgentBase({ name: 'finance-bot', route: '/' });
agent.setPromptText('You are a financial assistant.');

await agent.addSkill(new StockPriceSkill());

agent.run();
```

For more details on the skill base class, see [`SkillBase`][skillbase].

***

## All Skills

<CardGroup cols={3}>
  <Card title="DateTimeSkill" href="/docs/server-sdks/reference/typescript/agents/skills/datetime">
    Get the current date and time with optional timezone support.
  </Card>

  <Card title="MathSkill" href="/docs/server-sdks/reference/typescript/agents/skills/math">
    Evaluate mathematical expressions safely.
  </Card>

  <Card title="JokeSkill" href="/docs/server-sdks/reference/typescript/agents/skills/joke">
    Tell jokes from a built-in collection.
  </Card>

  <Card title="WeatherApiSkill" href="/docs/server-sdks/reference/typescript/agents/skills/weather-api">
    Get current weather conditions using OpenWeatherMap.
  </Card>

  <Card title="WebSearchSkill" href="/docs/server-sdks/reference/typescript/agents/skills/web-search">
    Search the web using Google Custom Search.
  </Card>

  <Card title="WikipediaSearchSkill" href="/docs/server-sdks/reference/typescript/agents/skills/wikipedia-search">
    Search Wikipedia for article summaries.
  </Card>

  <Card title="GoogleMapsSkill" href="/docs/server-sdks/reference/typescript/agents/skills/google-maps">
    Get directions and search for places using Google Maps.
  </Card>

  <Card title="PlayBackgroundFileSkill" href="/docs/server-sdks/reference/typescript/agents/skills/play-background-file">
    Control background audio playback during calls.
  </Card>

  <Card title="SwmlTransferSkill" href="/docs/server-sdks/reference/typescript/agents/skills/swml-transfer">
    Transfer calls using SWML transfer actions.
  </Card>

  <Card title="DataSphereSkill" href="/docs/server-sdks/reference/typescript/agents/skills/datasphere">
    Search SignalWire DataSphere documents.
  </Card>

  <Card title="DataSphereServerlessSkill" href="/docs/server-sdks/reference/typescript/agents/skills/datasphere-serverless">
    Search DataSphere documents serverlessly.
  </Card>

  <Card title="NativeVectorSearchSkill" href="/docs/server-sdks/reference/typescript/agents/skills/native-vector-search">
    In-memory document search using word overlap scoring.
  </Card>

  <Card title="InfoGathererSkill" href="/docs/server-sdks/reference/typescript/agents/skills/info-gatherer">
    Collect structured information from the user.
  </Card>

  <Card title="ApiNinjasTriviaSkill" href="/docs/server-sdks/reference/typescript/agents/skills/api-ninjas-trivia">
    Fetch trivia questions from API Ninjas.
  </Card>

  <Card title="SpiderSkill" href="/docs/server-sdks/reference/typescript/agents/skills/spider">
    Scrape webpage content using the Spider API.
  </Card>

  <Card title="AskClaudeSkill" href="/docs/server-sdks/reference/typescript/agents/skills/ask-claude">
    Send prompts to Anthropic's Claude AI.
  </Card>

  <Card title="ClaudeSkillsSkill" href="/docs/server-sdks/reference/typescript/agents/skills/claude-skills">
    Load Claude Code-style SKILL.md files as tools.
  </Card>

  <Card title="CustomSkillsSkill" href="/docs/server-sdks/reference/typescript/agents/skills/custom-skills">
    Register user-defined tools from configuration.
  </Card>

  <Card title="McpGatewaySkill" href="/docs/server-sdks/reference/typescript/agents/skills/mcp-gateway">
    Model Context Protocol server integration.
  </Card>
</CardGroup>