---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/skills/in_memory/classes/InMemorySkillSource.md
description: 'A mutable, deterministic SkillSource backed by SKILL.md strings.'
---

# Class: InMemorySkillSource

Defined in: [src/batteries/skills/in\_memory/index.ts:29](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L29)

A mutable, deterministic SkillSource backed by SKILL.md strings.

## Implements

* [`SkillSource`](../../interfaces/SkillSource.md)

## Constructors

### Constructor

```ts
new InMemorySkillSource(id: string, entries: readonly {
  descriptor: SkillDescriptor;
  files?: Readonly<Record<string, string | Uint8Array<ArrayBufferLike>>>;
  id: string;
  manifest: string;
  version: string;
}[]): InMemorySkillSource;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:34](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L34)

#### Parameters

| Parameter | Type                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`      | `string`                                                                                                                                                                                                                                                                                                                                                                                                            |
| `entries` | readonly { `descriptor`: [`SkillDescriptor`](../../interfaces/SkillDescriptor.md); `files?`: [`Readonly`](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `string` | `Uint8Array`<`ArrayBufferLike`>>>; `id`: `string`; `manifest`: `string`; `version`: `string`; }\[] |

#### Returns

`InMemorySkillSource`

## Properties

| Property                      | Modifier   | Type     | Description                                                | Defined in                                                                                                                                    |
| ----------------------------- | ---------- | -------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|  `id` | `readonly` | `string` | Source provenance stamped onto every discovered reference. | [src/batteries/skills/in\_memory/index.ts:31](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L31) |

## Methods

### descriptor()

```ts
descriptor(ref: SkillRef): Promise<SkillDescriptor>;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:76](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L76)

Returns the live descriptor for a discovered id.

#### Parameters

| Parameter | Type                                         |
| --------- | -------------------------------------------- |
| `ref`     | [`SkillRef`](../../type-aliases/SkillRef.md) |

#### Returns

`Promise`<[`SkillDescriptor`](../../interfaces/SkillDescriptor.md)>

#### Implementation of

[`SkillSource`](../../interfaces/SkillSource.md).[`descriptor`](../../interfaces/SkillSource.md#descriptor)

***

### discover()

```ts
discover(): AsyncIterable<DiscoveredSkill>;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:71](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L71)

Yields the precomputed routing metadata without loading descriptors.

#### Returns

`AsyncIterable`<[`DiscoveredSkill`](../../interfaces/DiscoveredSkill.md)>

#### Implementation of

[`SkillSource`](../../interfaces/SkillSource.md).[`discover`](../../interfaces/SkillSource.md#discover)

***

### list()

```ts
list(ref: SkillRef): Promise<readonly string[]>;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:100](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L100)

Enumerate bundled files for materialization.
MUST include every path named by a `SkillScriptSpec`, and MUST NOT include the body.

#### Parameters

| Parameter | Type                                         |
| --------- | -------------------------------------------- |
| `ref`     | [`SkillRef`](../../type-aliases/SkillRef.md) |

#### Returns

`Promise`\<readonly `string`\[]>

#### Implementation of

[`SkillSource`](../../interfaces/SkillSource.md).[`list`](../../interfaces/SkillSource.md#list)

***

### read()

```ts
read(ref: SkillRef, path?: string): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:82](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L82)

Read a file from the skill. **An omitted `path` means the skill BODY** — the `SKILL.md`
equivalent — whatever the source calls it internally. Every channel needs the body.

#### Parameters

| Parameter | Type                                         |
| --------- | -------------------------------------------- |
| `ref`     | [`SkillRef`](../../type-aliases/SkillRef.md) |
| `path?`   | `string`                                     |

#### Returns

`Promise`<`ReadableStream`<`Uint8Array`<`ArrayBufferLike`>>>

#### Implementation of

[`SkillSource`](../../interfaces/SkillSource.md).[`read`](../../interfaces/SkillSource.md#read)

***

### stat()

```ts
stat(ref: SkillRef, path?: string): Promise<{
  size: number;
  version: string;
}>;
```

Defined in: [src/batteries/skills/in\_memory/index.ts:92](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/in_memory/index.ts#L92)

Reports byte size and current entry version for the body or a bundled file.

#### Parameters

| Parameter | Type                                         |
| --------- | -------------------------------------------- |
| `ref`     | [`SkillRef`](../../type-aliases/SkillRef.md) |
| `path?`   | `string`                                     |

#### Returns

`Promise`<{
`size`: `number`;
`version`: `string`;
}>

#### Implementation of

[`SkillSource`](../../interfaces/SkillSource.md).[`stat`](../../interfaces/SkillSource.md#stat)
