generator-alexa-skill

4.1.0 • Public • Published

generator-alexa-skill

Build Status NPM Version License

A Yeoman generator for scaffolding an Alexa Skill for AWS Lambda using alexa-lambda-skill.

Installation

npm install -g yo generator-alexa-skill

Generating a new Alexa Skill

yo alexa-skill

This creates a brand new Alexa Skill, add your logic into src/index.js and tests into test/index-test.js. The template is a HelloWorld skill:

import Response from 'alexa-response';
import { Skill, Launch, Intent } from 'alexa-lambda-skill';
 
@Skill
export default class HelloWorld {
 
  @Launch
  launch() {
    return Response.say('HelloWorld launched!');
  }
 
  @Intent('hello')
  hello({ name = 'world' }) {
    return Response.say(`Hello ${name}`).card({ title: 'HelloWorld', content: `Hello ${name}` });
  }
 
  @Intent('AMAZON.HelpIntent')
  help() {
    return Response.ask('I say hello to people. Who should I say hello to?').reprompt('Who should I say hello to?');
  }
 
  @Intent('AMAZON.CancelIntent', 'AMAZON.StopIntent')
  stop() {
    return Response.say('Goodbye');
  }
 
}

Also see model/UTTERANCES for phrases that users may say to interact with this skill and the schema of user intents in model/schema.json that are used to build the interaction model for your skill.

Readme

Keywords

Package Sidebar

Install

npm i generator-alexa-skill

Weekly Downloads

0

Version

4.1.0

License

MIT

Last publish

Collaborators

  • cameronhunter