How I created an Amazon Alexa Skill: From Ideating to Publishing

Isuru Ranaweera
6 min readOct 14, 2021

--

My approach as a Software Engineer

Amazon Alexa is a cloud-based voice service that powers all Amazon Echo devices. There are many things that you can perform using just your voice with these Alexa-powered devices such as creating to-do lists and creating alarms. Alexa skills are tasks that users can request through this voice service. An Alexa Skill can be considered a voice-driven Alexa app.

Ideating

I am currently a software engineering working in Sri Lanka and I was able to come across this niche market in technology known as Alexa skills through my first tech internship. After several weeks of learning React, React-Native and Next.js were introduced to Amazon Alexa Skills. This project involved creating a skill that could be deployed on the Amazon Alexa marketplace, which was the ultimate goal.

To generate ideas for the project, a brainstorming session was carried out that enabled me to come up with several different ideas. Some of the initial ideas included a skill to:

  • Track train schedules in Sri Lanka, find out the departure and arrival time of the next train, find out a train schedule for a specific day or date, find out if there are any delays, find out which train arrives at a destination
  • Check bank balances, expenses, and pending transfers
  • Check Formula 1 schedules and points.

However, the idea that stood out for me personally and for my manager was the idea for a skill-based on the ‘Friends’ TV show. This skill would enable users to hear the funniest dialogues between the cast in this show. Having won 6 Emmy awards, this was one of the most popular TV shows ever created and it has a huge fan base. This was one of the most compelling reasons to go ahead with this idea since there is a large user base from throughout the world. It was decided to call this new skill ‘Central Perk’ based on the iconic café used throughout the TV show.

Challenges and how I overcame them

Having studied technologies such as HTML, CSS, JavaScript, C#, Java, Python, and React in college, transitioning towards Node.js chosen for creating the Alexa skill was not that difficult for me. Amazon has a set of tools that help fresh developers get accustomed to the developer environment fairly quickly including the Alexa Skills Kit (ASK) which is a framework that allows the creation of skills.

  • Getting accustomed: It took a bit of time to get used to the development environment and I was finding it difficult to grasp the different terminology such as intents and voice interaction models. Nevertheless, navigating around the development environment for a while enabled me to get comfortable with the interfaces.
  • Custom slots: The initial struggle was to design the skill in such a way that allows users to access funny dialogues from different characters in the show. This required me to create slots and assign the character names: Ross, Phoebe, Rachel, and so on to these. This proved to be a challenge initially as I was confused about where the slots have to be placed in the development environment and how to access these slot information. Upon further investigation and help from my manager, I was able to correctly configure these custom slots so that the dialogues align with the correct character.
  • The flow of the skill: In addition, configuring the flow of the skill from the initial initiation and subsequent steps required a bit of planning. Since this is a voice app, it was especially critical that I focused on making sure that the user is not left in the dark at any point in the skill and directing them towards the intended destination. This task was further complicated with the addition of a new requirement to enable in-skill purchasing within the skill. Therefore, the flow of the skill had to be freshly generated to support this.
  • In-skill purchasing: This was a whole new challenge in itself as it required the addition of new intents to purchase the skill, refund, process subscriptions, and cancel subscriptions. To help me with this process, I was given a template skill to follow by my manager which I found to be helpful. In addition, there was a couple of online video tutorials and articles to help me further. After a few days of tinkering, I was able to come up with the proper intents and the general flow of the skill was complete.
  • Content: At this point, I was still a complete newbie to the ‘Friends’ TV show. I know! I know what you are thinking but that was the truth. How could I possibly come up with funny dialogues if I have not watched the show right? Therefore without further ado, I started binge-watching from Season 1 and quickly fell in love with the show. I also remembered to note down the noteworthy and hilarious dialogues between the cast members. These dialogues are then required to be ordered according to the character names and stored in a JSON file to be accessed from the skill. As the skill had in-skill purchasing, I had to create two JSON files, one for the free tier with limited content and one for the premium tier with additional content.
  • Testing: The development of the skill was not at all complete without testing it. Oh boy! Testing was initially the toughest job as constant errors were appearing and required many hours of debugging. Debugging is not particularly my strong suit and therefore I was spending a considerable amount of time absorbed in this process. A feature known as ‘CloudWatch’ built into the Alexa development console is intended to help developers easily debug and test the skill. This enabled me to pinpoint where the errors were occurring but it did not explain why it was occurring. After several days of debugging and testing the skill, it was finally ready to be sent to certification and published. The skill was flowing nicely, the in-skill purchasing was working and the correct dialogues were uttered according to the character names.

Publication

The process of certification and publishing is very much straightforward in the Alexa Development Console. It requires you to enter all the details of the skills, intended audience, your subscription fee, the invocation name, and any logos that you may want to use. After this process is complete, it was ready to be sent to Amazon for final verification. This was the moment that was the most difficult, the waiting. We received a response from Amazon after a couple of days and it turned out we had a few errors in our code.

Upon fixing these errors, we sent it back for final verification. and this time around, we received the good news that the skill had been verified and it will be published on the Amazon Alexa Skills marketplace. Finally getting your product to market was a huge step and I felt incredibly happy along with my manager at having accomplished this goal.

Final thoughts

If you are also wondering or are curious to create an Amazon Alexa Skill, I think I have done justice with this article. Amazon Alexa Skills are an exciting field in this vast technology space and you will surely have fun along the way by creating a skill that you are passionate about and will hopefully bring value and entertainment to the world.

So, therefore, please do not hesitate to start! There are a bunch of tutorials that can help you get started and there are also a lot of template skills on games, food ordering, music and audio, smart home, flash briefing, and news and knowledge skills. Have fun and hopefully my experience will enable you to envision your own Amazon Alexa Skill soon!

--

--