<commit_before># Overview

Plugins provide a way to extend the functionality that Buildkite natively offers. They act as a external repository of [Hooks](/docs/agent/v3/hooks) that are referenced from your `pipeline.yml` file, and are downloaded and run as part of your build.

Plugins can be hosted on GitHub, BitBucket or a private git repository, and are automatically fetched as required. See the [Sources](/docs/plugins/using-plugins) section of the Using Plugins guide for how you can host your own.

Buildkite offers a collection of useful plugins to get you started, including a [Docker Compose plugin](https://github.com/buildkite-plugins/docker-compose-buildkite-plugin), [Junit Annotate plugin](https://github.com/buildkite-plugins/junit-annotate-buildkite-plugin), and the [Library Example plugin](https://github.com/buildkite-plugins/library-example-buildkite-plugin). In the [Buildkite Plugin Directory](https://buildkite.com/plugins) you can find all the offical plugins as well as the top plugins from third party developers. 

Agent plugins are still new, and we are evolving them as we learn more. We'd love feedback on how you use them and how we might make them better - let us know what you think in our [Community Forum](https://forum.buildkite.community/).

## How plugins work

At the most basic, plugins are a snippet of code stored in [hooks](/docs/agent/v3/hooks) files that the Agent can access directly. When you add a plugin to a buildkite command step, that code is read by the Agent before the commands or scripts are executed.

Some plugins allow configuration, this is usually defined in your pipeline.yml file and is read by the agent before the plugin hooks are run.

There are two main types of plugins:
- a repo of commands: stuff from the files can be referenced in your command scripts, like doing an import at the top of your code
- stuff you want to run before/after you run your script (can define any of the available hooks like pre-command, command, post-command etc.)

## Common use cases

- prebuilding a docker image, then using the image in subsequent steps
- running steps in containers
- assume a role before running your script
- logging in to a service<commit_msg>Remove out of date section<commit_after># Overview

Plugins provide a way to extend the functionality that Buildkite natively offers. They act as a external repository of [Hooks](/docs/agent/v3/hooks) that are referenced from your `pipeline.yml` file, and are downloaded and run as part of your build.

Plugins can be hosted on GitHub, BitBucket or a private git repository, and are automatically fetched as required. See the [Sources](/docs/plugins/using-plugins) section of the Using Plugins guide for how you can host your own.

Buildkite offers a collection of useful plugins to get you started, including a [Docker Compose plugin](https://github.com/buildkite-plugins/docker-compose-buildkite-plugin), [Junit Annotate plugin](https://github.com/buildkite-plugins/junit-annotate-buildkite-plugin), and the [Library Example plugin](https://github.com/buildkite-plugins/library-example-buildkite-plugin). In the [Buildkite Plugin Directory](https://buildkite.com/plugins) you can find all the offical plugins as well as the top plugins from third party developers. 

## How plugins work

At the most basic, plugins are a snippet of code stored in [hooks](/docs/agent/v3/hooks) files that the Agent can access directly. When you add a plugin to a buildkite command step, that code is read by the Agent before the commands or scripts are executed.

Some plugins allow configuration, this is usually defined in your pipeline.yml file and is read by the agent before the plugin hooks are run.

There are two main types of plugins:
- a repo of commands: stuff from the files can be referenced in your command scripts, like doing an import at the top of your code
- stuff you want to run before/after you run your script (can define any of the available hooks like pre-command, command, post-command etc.)

## Common use cases

- prebuilding a docker image, then using the image in subsequent steps
- running steps in containers
- assume a role before running your script
- logging in to a service
{'fraction_non_alphanumeric': 0.06199524940617577, 'fraction_numerical': 0.0009501187648456057, 'mean_word_length': 4.511780104712042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1835397', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1052, 'n_words': 590}