<commit_before>---
permalink: /docs/scripting/index.html
layout: docs
---

Hubot out of the box doesn't do too much, but it is an extensible, scriptable robot friend.

## Anatomy of script loading

There are three main sources to load scripts from:

* scripts loaded from external __npm packages__ and specified in `external-scripts.json`
* all scripts __bundled__ with your hubot installation under `scripts/` dir
* __community scripts__ specified in `hubot-scripts.json` and shipped in the `hubot-scripts` npm package

### NPM Packages

There are hundreds of scripts written and maintained by the community. Find them by searching the [NPM registry](https://www.npmjs.com/browse/keyword/hubot-scripts) for `hubot-scripts <your-search-term>`. For example:

```
$ npm search hubot-scripts github
NAME                  DESCRIPTION
hubot-deployer        Giving Hubot the ability to deploy GitHub repos to PaaS providers hubot hubot-scripts hubot-gith
hubot-gh-release-pr   A hubot script to create GitHub's PR for release
hubot-github          Giving Hubot the ability to be a vital member of your github organization
…
```

To use a script from an NPM package:

1. Add the package to the list of `dependencies` into your `package.json`.
2. Run `npm install` to install the package.
3. Add the package to `external-scripts.json`.<commit_msg>Revert change of ordering of script loading<commit_after>---
permalink: /docs/scripting/index.html
layout: docs
---

Hubot out of the box doesn't do too much, but it is an extensible, scriptable robot friend.

## Anatomy of script loading

There are three main sources to load scripts from:

* all scripts __bundled__ with your hubot installation under `scripts/` dir
* __community scripts__ specified in `hubot-scripts.json` and shipped in the `hubot-scripts` npm package
* scripts loaded from external __npm packages__ and specified in `external-scripts.json`

### NPM Packages

There are hundreds of scripts written and maintained by the community. Find them by searching the [NPM registry](https://www.npmjs.com/browse/keyword/hubot-scripts) for `hubot-scripts <your-search-term>`. For example:

```
$ npm search hubot-scripts github
NAME                  DESCRIPTION
hubot-deployer        Giving Hubot the ability to deploy GitHub repos to PaaS providers hubot hubot-scripts hubot-gith
hubot-gh-release-pr   A hubot script to create GitHub's PR for release
hubot-github          Giving Hubot the ability to be a vital member of your github organization
…
```

To use a script from an NPM package:

1. Add the package to the list of `dependencies` into your `package.json`.
2. Run `npm install` to install the package.
3. Add the package to `external-scripts.json`.
{'fraction_non_alphanumeric': 0.07385524372230429, 'fraction_numerical': 0.0022156573116691287, 'mean_word_length': 3.9344262295081966, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2437168', 'n_tokens_mistral': 787, 'n_tokens_neox': 738, 'n_words': 349}