# @barbershopio/sprucebot-skills-kit

> The base template that drives your Sprucebot Skill! ⚙️🌲🤖

Latest version **6.6.1** (published 2018-05-31) · 0 weekly downloads

## Install

```sh
npm install @barbershopio/sprucebot-skills-kit
pnpm add @barbershopio/sprucebot-skills-kit
yarn add @barbershopio/sprucebot-skills-kit
bun add @barbershopio/sprucebot-skills-kit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.6.1 |
| Published | 2018-05-31 |
| First published | 2018-03-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^8.5.0 |
| Dependencies | 23 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | barbershop, bminch, casey1449, hartiganhm, kengoldfarb |
| Keywords | skills-kit, sprucebot, sprucelabs |

## Links

- npm: https://www.npmjs.com/package/@barbershopio/sprucebot-skills-kit
- Homepage: https://github.com/sprucelabsai/sprucebot-skills-kit
- Issues: https://github.com/sprucelabsai/sprucebot-skills-kit/issues
- npm.io page: https://npm.io/package/@barbershopio/sprucebot-skills-kit

## Dependencies (23)

- [next](https://npm.io/package/next.md) ^5.1.0
- [react](https://npm.io/package/react.md) ^16.0.0
- [redux](https://npm.io/package/redux.md) ^3.7.2
- [config](https://npm.io/package/config.md) ^1.27.0
- [dotenv](https://npm.io/package/dotenv.md) ^5.0.1
- [enzyme](https://npm.io/package/enzyme.md) ^3.3.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [react-dom](https://npm.io/package/react-dom.md) ^16.0.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.6
- [redux-thunk](https://npm.io/package/redux-thunk.md) ^2.2.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.1.0
- [enzyme-to-json](https://npm.io/package/enzyme-to-json.md) ^3.3.1
- [react-emojione](https://npm.io/package/react-emojione.md) ^5.0.0
- [sprucebot-node](https://npm.io/package/sprucebot-node.md) ^6.6.0
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.14
- [react-sprucebot](https://npm.io/package/react-sprucebot.md) ^6.6.0
- [universal-cookie](https://npm.io/package/universal-cookie.md) ^2.1.0
- [styled-components](https://npm.io/package/styled-components.md) ^3.2.1
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.4.0
- [enzyme-adapter-react-16](https://npm.io/package/enzyme-adapter-react-16.md) ^1.1.1
- [sprucebot-skills-kit-server](https://npm.io/package/sprucebot-skills-kit-server.md) ^6.6.0
- [babel-plugin-styled-components](https://npm.io/package/babel-plugin-styled-components.md) ^1.2.1

## Recent versions

- 6.6.1 (latest) — 2018-05-31
- 6.6.0 — 2018-05-30
- 6.2.0 — 2018-03-30

## README

# Your skill's title

[![Greenkeeper badge](https://badges.greenkeeper.io/sprucelabsai/sprucebot-skills-kit.svg)](https://greenkeeper.io/)
Describe the experience you wish to create from the perspective of the `guest`, `owner`, or `teammate`...

## Technical overview
Describe how your skill works for anyone who may need to come in and maintain or add to it. Example; Hooks into `did-enter` and sends a `message` to a `teammate`.

### Services
 * `vip` - Tells us who to send to.

### Utilities
 * `rewards` - Does something else.

### Sequelize Adapter
Allow your skill to an external sql database.
* In .env enable with `DB_ENABLED=true`
* Configure the `DB_MIGRATIONS=true` to enable automatically running migrations
* Create `server/models/Example.js` from `.example`
* Setup a migration to build the table in `server/migrations/*_example.js#up()` from `.example`

All of your models are available via koa `ctx.db.models.Example.*` and `ctx.db.sequelize.*`

We also ship with three "Core" models
`ctx.db.models.User`
`ctx.db.models.Location`
`ctx.db.models.UserLocation`

### Custom events
Describe any custom events your skill emits. Make sure you include whether or not it honors `preventDefault` and include the `payload`'s schema.

#### `vip-alerts:will-send` 
Just before a vip alert is triggered when a `guest` or `teammate` arrives. Honors `preventDefault`. Mutate `messages` to your heart's content. Whatever `messages` you return will be what is sent.

**Payload**

```js
[
    {
        teammateId: UUID4, // teammate receiving the alert
        body: String // the message
    },
    {
        teammateId: UUID4, // teammate receiving the alert
        body: String // the message
    }
]
```

#### `will-send-training`
This event can be configured to remind teammates to do something, or if none of the settings are set yet, remind the owner to either finish their settings or turn off the skill. 

**Payload**

```js
{
    teammate: ctx.event, // teammate receiving the alert
    body: String // the message
}
```

#### `my-slug:custom-event`
This is just a placeholder for now, put in yours! Honors `preventDefault`.

**Payload**
```js
{
    hello: 'world'
}
```

## Gotchya's

 * Describe anything else dev's should know when working on your skill.

## Credits
 * John Doe
 * Billy Joe
 * Tom Snow

---
_Source: https://npm.io/package/@barbershopio/sprucebot-skills-kit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
