> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cow.bleu.builders/llms.txt
> Use this file to discover all available pages before exploring further.

# CoW Hooks

> CoW Hooks allow users to pair any Ethereum action (or set of actions) with an order on CoW Protocol, leveraging the  to execute the actions together in the sequence.

Hooks execute the entire sequence as a single transaction. True to the CoW Protocol model, users pay gas fees in their sell token if, and only if, the sequence of transactions succeeds. Under the hood, CoW Hooks are arbitrary Ethereum "calls" that attach to an order and execute before and/or after the order. Developers and advanced traders can use code to express an intent that performs some action before a swap (pre-hooks) and after a swap (post-hooks).

## Pre-Hooks

These are actions that execute before the swap, allowing pre-hooks to be used to "set up" an order. Some examples including:

* Unstaking tokens just-in-time for trading
* Claiming an airdrop right before dumping
* Signing token approvals so that the approval and the trade itself are batched together as a single action

## Post-Hooks

These are actions that execute after the swap, taking advantage of trade proceeds. Examples include:

* Bridging funds to L2s
* Staking funds

## Getting started

To get started with writing a CoW Hook, check out [our technical documentation](/cow-protocol/reference/core/intents/hooks). You can also [read more about CoW Hooks on our blog](https://blog.cow.fi/cow-hooks-you-are-in-control-480ccb40044a) or through our tutorials — [here](https://www.youtube.com/watch?v=FT36lWtC1Oc) and [here](https://www.youtube.com/watch?v=29OaasbqY_g).

<CardGroup cols={2}>
  <Card title="Hooks: Getting Started" icon="play" href="/cow-swap/hooks/getting-started">
    Step-by-step tutorial to create your first hook via CoW Swap
  </Card>

  <Card title="Hook Store" icon="store" href="/cow-swap/hooks/hook-store">
    Browse and use pre-built hooks, or publish your own
  </Card>

  <Card title="Build a Hook dApp" icon="code" href="/cow-swap/hooks/hook-dapp">
    Develop a custom hook dApp for the CoW Swap interface
  </Card>

  <Card title="Post-Hook Examples" icon="arrow-right" href="/cow-swap/hooks/post-hook-examples">
    Swap → stake, swap → bridge, and swap → vault patterns
  </Card>
</CardGroup>
