Alexa Skills Kit CLI now provides a way to create a skill using Alexa Hosted through the create-hosted-skill command So, I tried to create a hosted skill using the CLI.

Here’s how -

ask create-hosted-skill

Here’s how -

    ask create-hosted-skill
  1. type in your skill name: ice-cream-soda
  2. select the runtime: nodejs8.10
  3. Alexa hosted skill is created. Do you want to clone the skill project to current working directory? (Y/n)
  4. Say yes
cd ice-cream-soda/
ask deploy

Pushing the repo to GitHub (never mind - this does NOT work. See explanation below)

Remove the hidden /.git directory

rm -r .git

Removing the .git directory breaks the ask deploy flow for Alexa Hosted Skill

Actually I did a bit more digging. Here’s the difference between using ask new, and create-hosted-skill

  1. When you use ask new to create a new skill using one of the templates (say hello world), the git remote for the skill directory that’s created for you points to Blowing the hidden .git repo removes the remote, and I can deploy to a GitHub repo with no problems, while continuing to use ask deploy to push the code to Lambda/Developer Portal.
  2. When you use ask create-hosted-skill, however to create a new skill, the git remote is set to an AWS Code Commit service (….). Removing the .git directory in this case breaks the ask deploy flow. So, unless there’s a way to add another origin, this means that you can either use ask deploy or push a repo to GitHub, which I am assuming is a workflow that most developers would want so they can collaborate, while continuing to use Alexa Hosted.

Using the Alexa Skills Kit Command Line Interface with Alexa-Hosted Skills

ASK CLI Command Reference