Create and Manage Skills in Visual Studio Code

The Alexa Skills Toolkit (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. Currently, you can only create Alexa-hosted skills with the Alexa Skills Toolkit. For more details about Alexa-hosted skills, see Build a Skill End-to-end Using an Alexa-hosted Skill.

Create a new skill

To create a new skill

  1. In the activity bar, click the Alexa icon. The Alexa Skills Toolkit side bar appears.
  2. Expand Skills Management and then choose Create Alexa-hosted skill. The Create new skill form appears.
  3. Fill out the form and click Create. After about one or two minutes, your skill appears in the side bar.

Download an existing skill

This procedure performs a git clone of your Alexa-hosted skill project into your selected directory.

To download an existing skill

  1. In the activity bar, click the Alexa icon. The Alexa Skills Toolkit side bar appears.
  2. Expand Skills Management and then choose Download and edit skill. A list of your existing Alexa-hosted skills appears.
  3. Click the skill you want to download, and then choose the location to save the project. A child folder is created for the project in the location that you specify. After about one or two minutes, your skill appears in the side bar.

Open a local skill project

To open a local skill project

  1. In the activity bar, click the Alexa icon. The Alexa Skills Toolkit side bar appears.
  2. 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. Your skill project appears in the side bar.

Build your Alexa skill

You build your Alexa skill in VS Code by editing the project files.

Interaction Model

The 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.

You can edit the interaction model for your skill 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. Afterwards, synchronize your interaction model to your local project.

APL

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

Synchronize changes from the console

Synchronize your interaction model

You can create and update the interaction model for your skill in the Alexa developer console. If you create or update the interaction 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. The Alexa Skills Toolkit side bar appears.
  2. Expand Skills, expand your skill, expand Interaction Model, and then choose Download. The Download latest interaction model page appears.
  3. 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. The configuration for your skill is stored in the skill manifest. 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. The Alexa Skills Toolkit side bar appears.
  2. Expand Skills, expand your skill, expand Skill Manifest, and then choose Download. The Download latest skill manifest page appears.
  3. Click Download. The latest version of the manifest appears and replaces the existing skill-package/skill.json file in your skill project.
  4. 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 can overwrite changes that you made to your skill in the Alexa developer console. Before you deploy your skill, verify the following:

After you have downloaded any changes from the console, you can deploy your skill. You deploy your Alexa-hosted skill from VS Code by using git commands.

To deploy changes to your skill

  1. Commit your skill changes to the master branch for your skill. Use the git support in VS Code, or any git client.
  2. In the activity bar, click the Alexa icon. The Alexa Skills Toolkit side bar appears.
  3. Expand Skills, expand your skill, and then choose Deploy skill. The Skill deploy and build page appears.
  4. Click Deploy & build. Your changes are pushed to the remote git repository for your Alexa-hosted skill.

To track the status of your deployment, visit the Code page for your skill in the Alexa developer console.