# Create Custom Skill

Create Alexa Custom Skills.

## Overview

```
npx create-custom-skill my-skill
// or npm init custom-skill my-skill
cd my-skill
sls deploy
```

## Available Commands

Using the serverless-smapi plugin, the following commands are available.

`alexa model build` ............. Build local interaction model from model described in yml files.
`alexa model list` .............. List your Alexa model
`alexa model update` ............ Update your Alexa model
`alexa skill` ................... List your Alexa skills
`alexa skill create` ............ Create your Alexa skill
`alexa skill delete` ............ Delete your Alexa skill
`alexa skill list` .............. List your Alexa skill
`alexa skill update` ............ Update your Alexa skill

## Great! That was easy but I want to use ASK CLI tool, too!

Sure. The project is compatible with [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html).

## Good. But I want to set a specific profile of the CLI to be used by this tool

You can do that by editing the `profile` value in `serverless.yml` file or during project scaffold using `npm init custom-skill -p <profile> <skill-name>`

## Aha. Now I want to debug my skill.

Good. If you are using Visual Studio code, you can just open debug tab and start the debug configuration `debug with bst proxy`. See [bst proxy](http://docs.bespoken.io/en/latest/commands/proxy/) for details.

You can also start debug session with `npm start debug` which will run `sls alexa skill update -d` (update the skill manifest with debug configuration - see `debugSkillManifest` in serverless.yml file). Now you need to start a local lambda service, which you can do by running `sls offline start -l .webpack/service/src`.

## Wow. But my skill requires so many sample utterances. Can this tool help me?

Of course. Use intents.yml file to _describe_ the grammar for the sample utterances. Use types.yml to list the types you want to use.

Example:
`(recipe|receipes) for (|a|an) {Item}` will expand to:

```
recipe for {Item}
receipes for {Item}
recipe for a {Item}
receipes for a {Item}
recipe for an {Item}
receipes for an {Item}
```

## Ehhh. My skill got very complex and I don't want to build and update the model using local intents.yml file any more.

Just pass the skip option
`sls deploy --skip model`

## Ahhh. The tool always looks for confirmation when I want to update my skill manifest or model. Is there a shortcut?

Just pass _always yes to deploy_
`sls deploy -y`

## QQ. Can I use a single manifest and/or model to do bulk skill management?

yes. [Serverless allows you to define a variable in many ways](https://serverless.com/framework/docs/providers/aws/guide/variables/).
