My Second Alexa Skill

My first skill was a simple trivia game, built after the template Amazon outlined. The skill I built this time simply stated a fact from a given list when prompted. It really wasn’t any more complicated than the first tutorial, and you can follow along without any prior experience with Alexa. It took me about the same amount of time, roughly a few hours. Again, most of my time was invested in choosing and creating a list of interesting facts for the skill to give when asked.

A major difference between deploying this skill and the last one, however, is that Amazon has created a Software Development Kit (SDK). I was unfamiliar with SDK’s and how they are useful. In a nutshell, alexa-sdk is a Node package that helps you build skills faster while allowing you to avoid unneeded complexity by handling things like session attributes, skill state persistence, response building and behavior modeling.

It wasn’t too complicated to incorporate alexa-sdk. You just have to run
npm install --save alexa-sdk
within your Node.js environment. You can then import it into your app by including the following in your index.js file: