Steps to Build a Custom Skill
For skills with a custom voice interaction model, you define the phrases or utterances that users can say to interact with your skill . This guide provides the steps to build a new custom skill. For a step-by-step tutorial to create a simple custom skill, see Tutorial: Build Your First Alexa Skill in the Developer Console.
Is a custom interaction model the right model for what you want to build? See About Voice Interaction Models to learn about the differences between the custom interaction model and the pre-built models.
Complete the following steps to build a custom skill.
Before you build a custom skill, make sure that you have the following items:
- An Amazon developer account. You can use an existing Amazon account to sign in, or you can create a new Amazon developer account. The account is free.
- An Amazon Web Services (AWS) account. The AWS account gives you access to resources as part of the free tier of services. You host your skill code on AWS Lambda.
- An Alexa-enabled device, such as an Amazon Echo. Make sure that you sign in to the Echo with the same credentials as your Alexa developer account.
- The Amazon Alexa app on your mobile device. For instructions about how to download the Alexa app, see Download the Alexa app on the Amazon website. Make sure that you sign in to the Alexa app on your mobile device with the same credentials as your Alexa developer account.
Steps to build a custom skill
To build a custom skill, complete the following steps:
- Plan and design your skill.
- Create a skill in the developer console.
- Build your interaction model.
- Write and test skill code.
- Beta test your skill (optional).
- Submit your skill for certification.
Step 1: Plan and design your skill
Before you write any code, consider the user experience and plan and design your skill.
To plan and design your skill
- Think about the value that you want your skill to provide to users. For more details, see Determine the value proposition of your skill.
- Consider how you might enhance the user experience. For example, you can add in-skill purchasing, support screen interaction, change the audio, make your skill accessible to all, define your skill as a paid skill, and publish your skill to additional markets.
- Design a voice user interface. The interface defines how users interact with your skill. For guidance and best practices, see Build Your Design Artifact.
- Learn how users invoke custom skills.
- Choose the Invocation Name for a Custom Skill.
- Episode 1 of Building Alexa Skills from Scratch - Introduction
- Episode 2 of Building Alexa Skills from Scratch - What is an Alexa Skill?
- Episode 3 of Building Alexa Skills from Scratch - Start With the Script
Step 2: Create a skill in the developer console
Follow the steps to create a new skill in the developer console. When prompted to choose a model, select the Custom model. You can choose to
Step 3: Build your interaction model
The interaction model refers to your collection of intents, sample utterances, and the dialog model:
- The requests your skill can handle are represented as intents.
- Intents can optionally have arguments called slots.
- Sample utterances map the intents to the words and phrases users can say to interact with your skill.
- A dialog model identifies information your skill requires and the prompts Alexa can use to collect and confirm that information in a conversation with the user.
There are two different ways to create these components:
Use the developer console. This provides an updated console for the entire skill-building process, including the interaction model. You can also enter and edit the JSON for the interaction model in the JSON Editor. This is useful for pasting in the JSON provided in sample projects.
Create the JSON for the interaction model and create or update your skill with the Skill Management API or the ASK Command Line Interface.
- Best practices for sample utterances
- Episode 4 of Building Alexa Skills from Scratch - From Script to VUI
Step 4: Write and test skill code
Your primary coding task for your skill is to create a service that can accept requests from the Alexa service and send back responses.
For the quickest start, create an AWS Lambda function to host the service for your skill. AWS Lambda (an Amazon Web Services offering) is a service that lets you run code in the cloud without managing servers.
See: Create an AWS Lambda Function for a Skill.
Alternatively, you can build a web service for your skill and host it with any cloud provider. See Hosting a Custom Skill as a Web Service.
Write the code for your skill. If you're using Lambda, you can code in Node.js, Java, Python, C#, Go, Ruby, or PowerShell. If you're hosting your skill as a web service, you can use any programming language.
In the developer console, update your skill with your endpoint (for instance, the Lambda ARN).
Test your skill with the Alexa simulator or an Alexa-enabled device.
See Test Your Skill.
Update the metadata about your skill that appears in the Alexa Skills Store in the Alexa app.
- Episode 5 of Building Alexa Skills from Scratch - Adding Our Backend Part 1
- Episode 6 of Building Alexa Skills from Scratch - Adding Our Backend Part 2
- Episode 7 of Building Alexa Skills from Scratch - Adding Our Backend Part 3
- Episode 8 of Building Alexa Skills from Scratch - ASK Sound Library
Step 5: Beta test your skill (optional)
After your skill is finished, you have the option of setting up a beta test for your skill. With a beta test, you can make your skill available to a limited group of testers that you have personally selected, rather than to the general public. For more details, see Skill Beta Testing for Alexa Skills.
Step 6: Submit your skill for certification
When you're ready to make your skill public, submit it for certification. If your skill is currently in a beta test, you can still proceed with certification.
- Run the validation and functional tests on the Certification page in the developer console. These tests help you identify issues that you need to fix before you submit the skill.
- Review the submission checklist. This checklist includes the tests performed by Amazon's certification team, so passing all of these tests can speed up the certification process.
- When you're ready for your skill to be made public, and you have ensured that your skill fulfills the requirements on the certification checklist, submit your skill for certification.
- Certification Requirements for Custom Skills.
- Test and Submit Your Skill for Certification
- Episode 9 of Building Alexa Skills from Scratch - Certification Part 1
- Episode 10 of Building Alexa Skills from Scratch - Certification Part 2
Your skill is published, now what?
After your skill is published, Amazon customers can see it in the Alexa app and choose to enable and use it.
You can (and should) continue to work on your skill, enhancing its features, fixing any problems, and improving the experience for your end users. For recommendations for ongoing skill development and when you need to re-submit the skill, see Test and Submit Your Skill for Certification: Revise and Update Your Skill after Publication
Last updated: Apr 03, 2023