> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Build an App Skills Extension in Studio Two

## Article: Build an App Skills Extension in Studio Two

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/build-an-app-skills-extension-in-studio-two.md

## Article Content:

# Build an App Skills Extension in Studio Two

An [App Skills](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/about-app-skills.md) extension is a single configuration file. You generate the file first, then write the skills in it.

This article walks through generating the file and writing a skill that guides Aria through a refund request.

Follow the instructions below to:

1. Scaffold the extension.
2. Keep the configuration.
3. Declare a skill.

## Step 1 | Scaffold the extension

Start from a generated App Skills extension rather than an empty folder, so the file structure and registration are already in place.

For the full procedure, see [Add an App Skills Extension in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/add-an-app-skills-extension-in-studio-two.md).

This step gives you a generated App Skills extension in your site.

You can find the new file under `src/extensions/backend/app-skills/<extension-name>/`. You spend most of this article in `<extension-name>.extension.ts`. For what's in the file, see [App Skills Extension Files and Code](https://dev.wix.com/docs/backend-extensions/app-skills/app-skills-extension-files-and-code.md).

## Step 2 | Keep the configuration

`<extension-name>.extension.ts` is the configuration file. It uses the `extensions.appSkills()` builder:

```ts
import { extensions } from '@wix/custom-extensions';

export default extensions.appSkills({
  id: '<generated-by-the-extension-builder>',
  name: 'support-skills',
  skills: [],
});
```

The `id` and `name` uniquely identify the extension.
 `skills` is the array of skill declarations, which you configure in step 3. 

## Step 3 | Declare a skill

Each object in the `skills` array declares 1 skill. To declare a skill:

1. Add an object to the `skills` array with a `slug`, `description`, and `guidelines`.
2. Set `activated` to `true`. A skill with `activated` set to `true` must have `guidelines`
3. Save the file.

For example, to declare a skill that guides Aria through a refund request, open `<extension-name>.extension.ts` and add the object below.

With 1 skill in the array, the file looks like this:

```ts
import { extensions } from '@wix/custom-extensions';

export default extensions.appSkills({
  id: '<generated-by-the-extension-builder>',
  name: 'support-skills',
  skills: [
    {
      slug: 'refund-request',
      displayName: 'Refund request',
      description:
        'Guides the handling of a customer refund request. ' +
        'Use when a Wix user asks how to respond to a customer who wants a refund.',
      guidelines:
        '# Refund request\n\n' +
        '1. Ask for the order number and the reason for the refund.\n' +
        '2. Summarize the request in 2 sentences.\n' +
        '3. Draft a polite reply that confirms the request was received.\n\n' +
        'Do not promise a refund amount or a date.',
      tags: ['refunds', 'customer support'],
      examples: ['A customer wants a refund for order #4521. What should I reply?'],
      activated: true,
    },
  ],
});
```

Aria decides whether a skill fits a request from its `examples`, `tags`, and `description`, so write them the way a Wix user would phrase the request.

For every field and its limits, see [App Skills Extension Files and Code](https://dev.wix.com/docs/backend-extensions/app-skills/app-skills-extension-files-and-code.md#app-skills-extension-configuration). If your site can't publish after you change the file, see [Common errors](https://dev.wix.com/docs/backend-extensions/app-skills/app-skills-extension-files-and-code.md#common-errors).

When you're happy with the skill, click **Publish** in the Studio Two editor to ship it with your site. Aria can use your skills only after you publish.

To check that Aria uses the skill, see [Add an App Skills Extension in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/add-an-app-skills-extension-in-studio-two.md#step-4--check-that-aria-uses-a-skill).

## See also

- [About App Skills](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/about-app-skills.md)
- [Add an App Skills Extension in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/app-skills/add-an-app-skills-extension-in-studio-two.md)
- [App Skills Extension Files and Code](https://dev.wix.com/docs/backend-extensions/app-skills/app-skills-extension-files-and-code.md)
- [App Skills](https://dev.wix.com/docs/overview/extensions-framework/backend-extensions/app-skills.md)
- [About the App Skills API](https://dev.wix.com/docs/api-reference/app-management/app-skills/introduction.md)