In a regular week, I spend a lot of time working on, and building, Alexa skills. I often discover new tools and technologies that are available to developers to help them build skills more efficiently. Here’s a roundup of the tools that I’ve discovered and use on a regular basis to enhance my skill-building process.
Tools to Generate Code Faster
Alexa Code Generator
The Alexa Code Generator, built by Alexa evangelist Rob McCauley, is invaluable when you are starting to build a new Alexa skill using Node.js. You provide it with your interaction model JSON, which you can create on the Alexa Developer Console, and it will produce the necessary Node.js code to support that interaction model. It creates all of your intent handlers and even includes some handy helper functions for things like grabbing your slot values from a request.
The Alexa Code Generator includes a rich set of instructions on the page, so you’ll know exactly how to use it to accelerate your initial development of an Alexa skill.
Slotinator is another code generation tool created by UK-based Alexa evangelist Andrea Muttoni. In many development situations, you have a list of data that you want to add to a slot in your Alexa skill, but generating all of the JSON to wrap those slot values can be very time consuming.
This tool allows you to provide a line-delimited list of data values, and it will generate the appropriate JSON for those values. Having built several skills that have slots with hundreds of values, this tool saved me several hours (and headaches).
Tools to Increase Productivity
Alexa Skills Kit Command Line Interface
When I started creating my first Alexa skills, I used the developer console to create my interaction models, slots, and sample utterances. I would then have a second browser tab open to the AWS Console, where I would manage uploading a ZIP file to AWS Lambda every time that I wanted to update my code. In the back of my mind, however, I was convinced there was a better way. I want to write all of my code in one place, and quickly upload those files to the appropriate locations when necessary.
The Alexa Skills Kit (ASK) Command Line Interface (CLI) does all of this for me, and more. With one simple command, “ask deploy,” the CLI will upload all of my interaction model to the developer console, while also deploying my Lambda function to AWS. For the skills I’ve built that include in-skill purchasing, the CLI also validates and uploads those products to the server to make them available for purchase.
The ASK CLI has become, without question, the most valuable tool I use for Alexa development. Creating, editing, and deploying skills could not be easier.
Visual Studio Code
Every developer has a strong opinion about the code editor they use, and for good reason. When you know all of the keyboard shortcuts, and can write all of your software in one tool, you can be far more productive. For the last year or so, I’ve been using Visual Studio Code to write my Alexa skills.
In addition to being a great text editor, the addition of an integrated terminal (with the ASK CLI), and a rich ecosystem of extensions make it ideal for my development productivity. I can manage an entire GitHub repository at once, see which files have changed, and quickly see if there are any syntax errors in my code.
Tools to Help You Test and Debug
If you haven’t played with the testing tools in the developer console recently, you’re in for a nice surprise. Earlier this year, we updated the testing tools to include a robust new Alexa simulator. The core feature of the simulator allows you to type or talk to your skill through the browser, and there’s an excellent visualization of the conversation as it happens. You can even click back through the conversation to see the different JSON input and output values that happened as you progressed.
In addition, there is also an Echo Show and Echo Spot display simulation so you can see what your Display Directives look like, even when you’re not using an actual device.
One final tool that I find myself using constantly is the Voice & Tone simulator. This is an invaluable resource for determining how Alexa is going to say something. I use this tool to determine when to add pauses in speech, correct words that are difficult to pronounce, and confirm that my short audio files are playing properly before adding that content to my skill.
As an example, try to get Alexa to say the chemical element “Lead.” The interpretation of that word is pronounced “leed,” like someone getting ready to lead a parade. I updated my speech content to use the spelling “led” instead, since it gives me the correct pronunciation.) It is also fun to change the language settings in this tool to hear how each of the different Alexa languages treats my content.
Echosim is one of those invaluable tools that I sometimes take for granted. Echosim is a free Alexa device in your browser. When possible, I prefer to test my Alexa skills on an Echo device. In fact, I have a small device lab in my office that features each of the currently available devices for testing. (I also have a Fire TV Cube hooked up to my home television.)
As great as it is to test on a real device, there are just times where that isn’t possible. Open floorplan offices, co-working spaces, coffee shops, and many other locations aren’t great for testing and debug my skills.
Echosim provides an easy way for me to have a device on the go that responds like a real device, especially with reprompts and timeouts. The testing tool in the developer console is fantastic, but it was designed specifically with testing in mind, and so things like timeouts would be incredibly inconvenient there. I highly recommend using Echosim any time that you don’t have access to a physical Echo device.
Tools to Manage Data and Memory
For many skills, you need to persist data between sessions for your customer. Maybe it’s their first name, or perhaps you’re saving more advanced data like number of questions answered, user preferences, or even logging all of your errors to a convenient location. For many cases, AWS DynamoDB might be a perfect solution for you. It plugs right in to the Alexa Skills Kit SDKs, and is an easy way to persist your user data.
For several of the skills I have built, however, I needed a data source that could be easily edited by non-technical teammates. A good example of this is the Dev Tips skill. The skill is designed to give you the latest Alexa developer news, as well as answer many of the common questions we encounter by developers. Maintaining all of these answers and news topics can take a decent amount of time, and I didn’t want to be the technical bottleneck for changes to be made.
AirTable solves this problem for for me in a couple of ways. First, the data entry screens look like a spreadsheet. Incredibly intuitive, even for non-technical folks. Second, each data table has an API that makes it easy to create, read, update, and delete my records from my code.
I’m not saying that AirTable solves all of my persistence needs for Alexa skills, but it certainly comes close.
Tools to Track Engagement
We also recently updated the Analytics tab of the developer console. For each of your skills, there is an Analytics link available.
These links take you to a wealth of data that is broken down by customers, sessions, utterances, and intents. You can use this date to answer questions like:
- “How many unique customers did I have last week?”
- “Which intent was the most requested in June?”
- “On average, how many utterances do my users speak per session?”
- “Are there any utterances that are failing?”
This is an incredible amount of insight for free, and it’s available with every skill you create.
Finally, I use Dashbot.io for advanced analytics from my skills.
Dashbot allows me to look at things like “incoming interactions,” which shows me actual slot values my customers have spoken. There’s also a feature called “live transcripts,” which allows me to look at the entire conversation a customer had with my skill. Dashbot is only capable of showing data that was contained in your skill’s JSON input, but the way it is put together makes it much easier to understand how your skill is being used, and how you can improve it.
For skills that follow a Q&A model, like Dev Tips, this data helps me determine what my customers are asking for so I can update my content to accommodate those requests in the future.
What tools are you using? I’d love to hear from you on Twitter. You can find me there at @jeffblankenburg. Let me know what you’re working on, and I’d love to try your skill next.
Build Skills, Earn Developer Perks
Bring your big idea to life with Alexa and earn perks through our milestone-based developer promotion. US developers, publish your first Alexa skill and earn a custom Alexa developer t-shirt. Publish a skill for Alexa-enabled devices with screens and earn an Echo Spot. Publish a skill using the Gadgets Skill API and earn a 2-pack of Echo Buttons. If you're not in the US, check out our promotions in Canada, the UK, Germany, Japan, France, Australia, and India. Learn more about our promotion and start building today.