Create and Manage Skills in Visual Studio Code


The Alexa Skills Kit (ASK) Toolkit for Visual Studio Code (VS Code) is an extension that makes it easier for you to create, test, and deploy Alexa skills. For prerequisites and installation instructions, see Get Started with the ASK Toolkit for VS Code.

Start working with an Alexa skill

You can start working with an Alexa skill by creating a new skill, downloading an existing skill, or opening an existing skill that you've already worked with previously. You can create Alexa-hosted or self-hosted skills with the ASK Toolkit. For more details about Alexa-hosted skills, see Alexa-hosted Skill.

Create a new skill

To create a new skill

  1. In the activity bar, click the Alexa icon.
  2. On the ALEXA SKILLS TOOLKIT sidebar, expand SKILLS MANAGEMENT and then choose Create skill.
  3. On the Create new skill form, enter the following information:

    1. For Skill name, enter the name for your skill.
    2. For Default language, choose the default language for your skill.
    3. For Skill Model, choose Custom to define a custom voice-interaction model for your skill.
      If you want to use a pre-built voice-interaction model for your skill, create your skill by using the Alexa developer console, and then download your skill into VS Code.
    4. For Choose a method to host your skill's backend resources, choose Alexa-hosted or Provision your own. For details, see Alexa-hosted Skills.
    5. For self-hosted skills, for Programming language, choose the programming language for your skill code.
    6. For Alexa-hosted skills, for Hosting runtime, choose the programming language for your skill code.
    7. For Alexa-hosted skills, for Hosting region, choose the region to host your backend resources.
      The hosting region determines the location of your Amazon S3 bucket and Amazon DynamoDB table. For details, see Hosting your skill resources in different AWS Regions.
    8. For Local directory, choose the location for your project files.
  4. Click Create. After about one or two minutes, your skill appears in the sidebar.

Download an existing skill

To download an existing skill

  1. In the activity bar, click the Alexa icon.
  2. On the ALEXA SKILLS TOOLKIT sidebar, expand SKILLS MANAGEMENT, and then choose Download and edit skill.
  3. On the list of your existing skills, click the skill that you want to download, and then choose the location to save the project.
    VS Code creates a child folder for the project in the location that you specify. After about one or two minutes, your skill appears in the sidebar.

Open a local skill project

To open a local skill project

  1. In the activity bar, click the Alexa icon.
  2. On the ALEXA SKILLS TOOLKIT sidebar, expand SKILLS MANAGEMENT and then choose Open local skill.
  3. Choose the folder of project that you want to open, and then choose Select Folder.
    Make sure to open the root folder of your skill, where the skill.json or ask-resource.json file is located.
  4. Your skill project appears in the sidebar.

Build your Alexa skill

You build your Alexa skill in VS Code by editing the project files. The skill manifest file, named skill.json, contains metadata about the skill, including the display name, skill capabilities (video, smart home, custom), and the endpoint for the skill service code, either an AWS Lambda or a web endpoint. For details, see skill manifest schema.

The following image shows the skill package folder in VS Code.

APL

If you want to use Alexa Presentation Language (APL) in your skill, you can use the ASK Toolkit for VS Code to create, edit, and preview APL documents. For details, see Manage and Preview APL Documents.

Interaction model

The voice-interaction model is how the user interacts with Alexa while using your skill. For details, see Create the Interaction Model for Your Skill and Interaction Model Schemas.

For skills that have a custom voice-interaction model, you can edit the interaction model in the following ways:

  • In VS Code, edit the JSON files for the interaction model directly. The files are in the skill folder.
  • In the Alexa developer console, edit the interaction model on the Build page for your skill. Save the changes and build your interaction model. Afterwards, synchronize your interaction model to your local project.
  • In VS Code, use the Edit in console link to open the interaction model for your skill in the Alexa developer console. expand SKILLS, expand your skill, expand Interaction Model, and then choose Edit in console. The Build page for your skill appears. Edit the interaction model, save the changes, and build your interaction model. After the build completes, synchronize your interaction model to your local project.

ACDL

If you want to use Alexa Conversation Descriptive Language (ACDL) in your skill for dialogs, you can use the ASK Toolkit for VS Code to edit ACDL dialogs. For details, see Manage ACDL Files.

Synchronize changes from the console

You can synchronize changes that you made in the Alexa developer console with your local project.

Synchronize your interaction model

For skills that have a custom voice-interaction model, you can create and update the interaction model in the Alexa developer console. If you create or update the interaction model for your skill in the console, download the latest interaction model to your local VS Code project.

To download your interaction model

  1. In the activity bar, click the Alexa icon.
  2. On the ALEXA SKILLS TOOLKIT sidebar, expand your skill.
  3. Expand Interaction Model, and then choose Download.
  4. On the Download latest interaction model page, choose the correct locale, and then click Download.

Synchronize your skill manifest

You can make changes to the configuration of your skill, such as updating publishing details, permissions, supported interfaces, and endpoints, in the Alexa developer console. If you make changes to the configuration of your skill in the console, download the latest skill manifest to your local VS Code project.

To download your skill manifest

  1. In the activity bar, click the Alexa icon.
  2. On the ALEXA SKILLS TOOLKIT sidebar, expand SKILLS, and then expand your skill.
  3. Expand Skill Manifest, and then choose Download.
  4. On the Download latest skill manifest page, click Download.
    The latest version of the manifest replaces the existing skill-package/skill.json file in your skill project.
  5. Open the File menu and choose Save to save the updated manifest.

Test your local Alexa skill

If you want to use test your skill in VS Code, see Test Skills in Visual Studio Code.

Deploy your Alexa skill

When you deploy your skill from VS Code, you overwrite changes that you made to your skill in the Alexa developer console. Therefore, before you deploy your skill, verify the following:

After you have synchronized any changes from the console, you can deploy local changes your skill.

To deploy local changes to your skill

  1. Save local changes to your skill.

    For an Alexa-hosted skill, commit your skill changes to the branch named master. Use the git support in VS Code, or any git client.

    For a self-hosted skill, save changes to your skill project. You must deploy changes to your Lambda code by using the ASK CLI or another method.

  2. In the activity bar, click the Alexa icon.
  3. On the ALEXA SKILLS TOOLKIT sidebar, expand SKILLS, and then expand your skill.
  4. Choose Deploy skill.
  5. On the Skill deploy and build page, view the status of your skill as follows:
    • For an Alexa-hosted skill, the status of both your skill package and your skill code appears.
    • For a self-hosted skill, the status of only your skill package appears. You must deploy changes to your Lambda code by using the ASK CLI or another method.
  6. For an Alexa-hosted skill, to deploy your changes, click Deploy & build.
    If you didn't synchronize your local skill with changes made in the console, the Deploy & build is inactive.
  7. For a self-hosted skill, to deploy your changes, use the ASK CLI to deploy your changes to your Lambda code, or another method for skills hosted as a web service.
  8. For an Alexa-hosted skill, to track the status of your deployment, visit the Code page for your skill in the Alexa developer console.

Was this page helpful?

Last updated: Nov 23, 2023