[Yandex Cloud documentation](../../index.md) > [Yandex Cloud Functions](../index.md) > [Tutorials](index.md) > Integration with Yandex and Yandex Cloud services > Creating a skill for Alice

# Creating a skill for Alice


As an example, we will create a skill called <q>Parrot</q>, which repeats everything a user writes or says. The example is available in two programming languages: Python and Node.js.

To add a skill for Alice based on a [function](../concepts/function.md):

1. [Get your cloud ready](#before-you-begin).
1. [Prepare the skill code](#prepare-code).
1. [Create a function and a function version](#create-function).
1. [Add the function link to Alice's skill](#add-link).
1. [Test the skill](#test).

If you no longer need the resources you created, [delete them](#clear-out).

More on [developing a skill for Alice](https://yandex.ru/dev/dialogs/alice/doc/development-docpage/#test__dev-cycle).

## Getting started {#before-you-begin}

Sign up for Yandex Cloud and create a [billing account](../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../billing/quickstart/index.md) and [link](../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../resource-manager/concepts/resources-hierarchy.md).

## Prepare the code for Alice's skill {#prepare-code}

To create a [version](../concepts/function.md#version) of a function, you can use one of the [code upload formats](../concepts/function.md#upload). As an example, we will upload the code as a ZIP archive.

{% list tabs group=programming_language %}

- Python {#python}

    1. Download a sample file from GitHub: [parrot.py](https://github.com/yandex-cloud-examples/yc-alice-skill-python/blob/main/parrot/parrot.py).
    1. Create a ZIP archive named `parrot-py.zip` with the `parrot.py` file.

- Node.js {#node}

    1. Download a sample file from GitHub: [index.js](https://github.com/yandex-cloud-examples/yc-alice-skill-node/blob/main/parrot/index.js).
    1. Create a ZIP archive named `parrot-js.zip` with the `index.js` file.

{% endlist %}

## Create a function and a function version {#create-function}

Once created, the function will contain only information about itself: name, description, unique ID, etc. The actual skill code will be added to the function version.

1. In the [management console](https://console.yandex.cloud), select the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) to create the function in.
1. Click ![plus](../../_assets/console-icons/plus.svg) **Create resource** and select ![curly-brackets-function](../../_assets/console-icons/curly-brackets-function.svg) **Function**.
1. Enter a function name. Follow these naming requirements:

    * Length: between 3 and 63 characters.
    * It can only contain lowercase Latin letters, numbers, and hyphens.
    * It must start with a letter and cannot end with a hyphen.

1. Click **Create**.
1. Create a [function version](../concepts/function.md#version):

    {% list tabs group=programming_language %}

    - Python {#python}

      1. From the list of programming languages, select `Python 3.12`.
      1. Disable **Add files with code examples** and click **Continue**.
      1. Prepare the function code:

          * In the **Code source** field, select `ZIP archive` and attach the `parrot-py.zip` archive you created earlier.
          * In the **Entry point** field, specify `parrot.handler`.
      1. Set the version parameters:

          * **Timeout**: `2`.
          * **Memory**: `128 MB`.
          * Leave the rest of the parameters at their defaults.
      1. Click **Save changes**.

    - Node.js {#node}

      1. From the list of programming languages, select `Node.js 18`.
      1. Disable **Add files with code examples** and click **Continue**.
      1. Prepare the function code:

          * In the **Code source** field, select `ZIP archive` and attach the `parrot-js.zip` archive you created earlier.
          * In the **Entry point** field, specify `index.handler`.
      1. Set the version parameters:

          * **Timeout**: `2`.
          * **Memory**: `128 MB`.
          * Leave the rest of the parameters at their defaults.
      1. Click **Save changes**.

    {% endlist %}

## Add the function link to Alice's skill {#add-link}

1. Go to the Alice skill page in your [dashboard](https://dialogs.yandex.ru/developer/).
1. Click **Create dialog**. In the window that opens, select **Skill**.
1. On the **Settings** tab:

    1. In the **Skill name** field, specify a unique name for the skill you are creating.
    1. In the **Backend** field, select **Function in Yandex Cloud**. Select the function you created earlier from the drop-down list.

    {% note warning %}
    
    The list shows the functions that you are allowed to view. To attach a function to a skill, you need permission to launch the function. This permission is included in the [functions.functionInvoker](../security/index.md#serverless-functions-invoker) and [editor](../security/index.md#functions-editor) roles or higher.
    
    {% endnote %}

    1. At the bottom of the page, click **Save**.

## Test the skill {#test}

1. Open the **Testing** tab on the skill page in your [dashboard](https://dialogs.yandex.ru/developer/).
1. If everything is set up correctly, the **Chat** section will display a message inviting you to start a conversation: `Hello! I'll repeat anything you say to me.`.
1. Send a message and make sure the response is the same.

## How to delete the resources you created {#clear-out}

To stop the skill, [delete](../operations/function/function-delete.md) the function.