Minute 5: StdLib Service Creation and Deployment

You’re now ready to create your Alexa Skill. StdLib provides really simple service templates that allow you to work with Alexa without having to write any additional code. Create a service with the “alexa” template by typing the following:

$ lib create -t alexa

Follow the on screen instructions to continue, and enter the directory associated with your Skill.

Alexa Skill Function Creation Workflow

You can test your skill immediately with:

$ lib .

However, you’ll get an error stating that the “Intent name is required” — execute the “HelloWorld” intent specifically with:

$ lib .intents.HelloWorld

The response should look something like this;

HelloWorld Intent Response

Awesome! The JSON response you see is what Alexa expects in order to talk to you when your skill is accessed. If you want to make any modifications to the Skill or Intent, simply look in the /functions/intents/HelloWorld.js folder. You can now deploy to StdLib using:

$ lib up dev

An example output showing where your Alexa Skill is Available via HTTPS

Once deployment is complete, you’ll see the above message (with your username and service name) and can execute it live (in the cloud) using the URL provided, or you can test it from the command line using:

$ lib <username>.<service>[@dev].intents.HelloWorld

Great! Let’s combine this endpoint with the Interaction Model we generated earlier.