Basic Alexa Skill Template
This is a fork / simplified version of the Amazon How to build a skill example.
Usage
Alexa, launch "How old is"
How old is Chris
How old is Mandy
How old is Madeleine
Repository Contents
/.ask
- ASK CLI (Command Line Interface) Configuration/lambda/custom
- Back-End Logic for the Alexa Skill hosted on AWS Lambda/models
- Voice User Interface and Language Specific Interaction Modelsskill.json
- Skill Manifest
Setup w/ ASK CLI
Pre-requisites
- Node.js (> v4.3)
- Register for an AWS Account
- Register for an Amazon Developer Account
- Install and Setup ASK CLI
Installation
-
Clone the repository.
$ git clone https://github.com/MrChrisBarker/AlexaSkillTemplate.git
-
Initiatialize the ASK CLI by Navigating into the repository and running npm command:
ask init
. Follow the prompts.$ cd AlexaSkillTemplate $ ask init
-
Install npm dependencies by navigating into the
/lambda/custom
directory and running the npm command:npm install
$ cd lambda/custom $ npm install
Deployment
ASK CLI will create the skill and the lambda function for you. The Lambda function will be created in us-east-1 (Northern Virginia)
by default.
-
Deploy the skill and the lambda function in one step by running the following command:
$ ask deploy
Testing
- To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab.
Lambda Updates
-
Once your skill has been deployed you can make changes directly on the Alexa Developer Console (utterances, slots, slot values etc..). However if you require changes to your Lambda you can re-deploy this straight though the ASK CLI.
$ ask deploy --target lambda
Customization
-
./skill.json
Change the skill name, example phrase, icons, testing instructions etc ...
Remember that many information is locale-specific and must be changed for each locale (en-GB and en-US)
See the Skill Manifest Documentation for more information.
-
./lambda/custom/index.js
Modify messages, and facts from the source code to customize the skill.
-
./models/*.json
Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support.
Additional Resources
Community
- Amazon Developer Forums - Join the conversation!
- Hackster.io - See what others are building with Alexa.
Tutorials & Guides
- Voice Design Guide - A great resource for learning conversational and voice user interface design.
- CodeAcademy: Learn Alexa - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on CodeAcademy!
Documentation
- Official Alexa Skills Kit Node.js SDK - The Official Node.js SDK Documentation
- Official Alexa Skills Kit Documentation - Official Alexa Skills Kit Documentation
Contact
- Twitter - MrChrisBarker
- Blog - Cocoa-Cabana