> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ai:skill:create

> Generate a new AI skill class with its test file.

Scaffold an AI skill class and a matching test file. The command writes `modules/<module>/src/ai/skills/<Name>Skill.ts`, writes `modules/<module>/tests/ai/skills/<Name>Skill.spec.ts`, creates the target module if it does not exist, and installs `@talosjs/ai` when it is missing.

## Usage

```bash theme={null}
talos ai:skill:create [options]
```

## Examples

Run with no flags to be prompted for the skill name:

```bash theme={null}
talos ai:skill:create
```

Create a skill in the default module:

```bash theme={null}
talos ai:skill:create --name=OrderRefund
```

Create a skill in a specific module:

```bash theme={null}
talos ai:skill:create --name=OrderRefund --module=commerce
```

Overwrite an existing skill file without confirmation:

```bash theme={null}
talos ai:skill:create --name=OrderRefund --module=commerce --override
```

## Options

| Option       | Description                                                                                                 | Default             |
| ------------ | ----------------------------------------------------------------------------------------------------------- | ------------------- |
| `--no-cache` | Bypass the skeleton cache and re-download templates.                                                        | `false`             |
| `--name`     | Skill name. Normalized to PascalCase with a `Skill` suffix; the template also receives the kebab-case name. | Prompted if omitted |
| `--module`   | Target module the skill is created in.                                                                      | `shared`            |
| `--override` | Overwrite the skill file without confirmation when it already exists.                                       | `false`             |

## Generated files

The source file is rendered from the `ai-skill.txt` skeleton template, and the spec file is rendered from `ai-skill.test.txt`. The generated class uses the `Skill` suffix; for example, `orderRefund` becomes `OrderRefundSkill`.

## AI Skill

This command ships a matching `ai:skill:create` skill. After generating the class and test file, it guides your AI agent through completing an `ISkill` implementation from `@talosjs/ai` and registering it on the chat that should use it.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    talos agent:skills:create
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    talos agent:skills:create
    ```
  </Tab>
</Tabs>
