This guide provides the steps to create a new custom skill.
Is a custom skill the right type of skill for what you want to build? See Understanding the Different Types of Skills to learn about other options like the Smart Home Skill API.
- Step 1: Design a Voice User Interface
- Step 2: Set Up the Skill in the Developer Portal
- Step 3: Use the Voice Design to Build Your Interaction Model
- Step 4: Write and Test the Code for Your Skill
- Step 5: Beta Test Your Skill (Optional)
- Step 6: Submit Your Skill For Certification
- Your Skill is Published, Now What?
Step 1: Design a Voice User Interface
Designing an effective voice user interface for your skill is a critical first step that you should do before writing any code. This is the primary way users will interact with your skill.
Create a flow diagram that maps out how users will interact with the skill. This flow diagram should show the requests users will make and the possible outcomes of those requests. You use this diagram when designing the detailed elements of your interface. If the skill is not designed to support screen interfaces, but the user accesses the skill with Echo Show, the voice interaction will be the same as for a device without a screen, and the user will see the same cards as in the Alexa app. If you as the developer want the skill to specifically support Echo Show, then the flow diagram must also include a flow for the screens and their visual and touch elements. For more information about developing for Echo Show, see Build Skills for Echo Show.
Use the flow diagram to identify the user requests that your skill will handle. These will become intents.
If your skill is designed to include images, gather that content and store them on a publicly accessible site. Note that the skill icon is uploaded directly to the skill, so that image does not have to be stored publicly.
- Review Alexa Voice Design Guide as you plan out your voice user interface.
- Learn how users invoke custom skills.
- Review best practices for choosing your invocation name.
Step 2: Set Up the Skill in the Developer Portal
Create a new skill in the developer portal. At this point, you can enter a Name and Invocation Name for your new skill.
You can also set up or modify a skill from the command line. To follow that workflow, see Alexa Skills Kit Command Line Interface and Alexa Skill Management API Overview.
Step 3: Use the Voice Design to 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 the skill builder (beta). The skill builder provides a visual interface for defining all components of your interaction model.
You must use the skill builder (beta) to create a dialog model.
This option does not include support for the dialog model.
Also see our best practices for sample utterances as you write your utterances.
Step 4: Write and Test the Code for Your Skill
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.
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 are using Lambda, you can code in Node.js, Java, Python, or C#. If you are hosting your skill as a web service, you can use any programming language.
In the developer portal, update your skill with your endpoint (for instance, the Lambda ARN).
Test your skill with the Service Simulator or an Alexa-enabled device.
Update the metadata about your skill that will appear in the Alexa Skills Store in the Alexa app.
Step 5: Beta Test Your Skill (Optional)
Once 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.
See: Skills Beta Testing
Step 6: Submit Your Skill For Certification
When you are 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.
To proceed to certification, first test your skill against 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 are 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.
Your Skill is Published, Now What?
Once 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 the “Creating a New Version of a Live Skill” section in Submitting the Skill for Certification.