***

title: getInstanceKey
slug: /reference/typescript/agents/skill-base/get-instance-key
description: Get the unique key used to track this skill instance.
max-toc-depth: 3
---------------------

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

Get the unique key used to track this skill instance.

## **Returns**

`string` -- By default, returns `this.skillName`. Subclasses that support multiple
instances typically override this to return a more specific key (e.g.,
`"<skillName>_<toolName>"` derived from `config`).

## **Example**

```typescript {2}
class MySkill extends SkillBase {
  getInstanceKey(): string {
    const toolName = this.getConfig<string>('tool_name');
    return toolName ? `${this.skillName}_${toolName}` : this.skillName;
  }
}
```

Instance key behavior:

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

const agent = new AgentBase({ name: 'demo' });
agent.addSkill("notify")
// Instance key: "notify"

agent.addSkill("notify", {"tool_name": "email"})
// Instance key: "notify_email"

agent.addSkill("notify", {"tool_name": "sms"})
// Instance key: "notify_sms"
```