anchor.diff:  
   See the [plugin documentation](/docs/plugins) for how to implement plugin hooks.
   
  -## Available Agent Hooks
  +## Available Lifecycle hooks
   
   <table>
     <thead>
  
positive.code: 
  There are two types of hook:
  
  * Agent hooks
  * Step hooks
  
  Agent hooks are executed as part of the agent lifecycle. For example, the
  `pre-bootstrap` hook is executed before starting the per-job bootstrap process.
  
  Step hooks are sourced as part of each Buildkite Job. Step hooks are run in a
  per-job shell environment, and environment variables are carried between the
  phases and hooks for a given step. For example, the `environment` hook can
  modify or export new environment variables for the subsequent job phases and
  hooks.
  
  ## Hook locations
  
  There are three hook locations:
  
  * Agent hooks - these exist on the agent’s machine and can define both agent and step hooks. Step hooks are run for every job on any pipeline.
  * Repository hooks - these exist in your pipeline repository’s `.buildkite/hooks` directory and can define step hooks.
  * Plugin hooks - these are provided by any [plugins](/docs/plugins) you've defined in your `pipeline.yml` and can define step hooks.
  
  ### Agent hooks
  
  Each agent installer comes with a hooks directory containing a set of sample
  hooks. You can find the location of your agent hooks directory in your
  platform’s installation documentation.
  
  
negative.code:   </tbody>
  </table>
  
  ## Creating Lifecycle hooks
  
  Agent hooks are executed and can be written in any programming language.
  
  ## Creating Step hooks
  
  Step hooks are shell scripts you can use to run commands and export environment
  variables. Hooks have access to all the standard [Buildkite environment variables](/docs/pipelines/environment-variables).
  