# Dependencies

Every task can have list of dependencies. Those will be executed before and if any of them fails abort the all pending tasks. Dependencies can be chained as deep as needed, as long as there is no loop.

{% code title=".hammerkit.yaml" %}

```yaml
tasks:
  install:
    cmds:
      - npm install
      
  build:
    deps: [install]
    cmds:
      - tsc -b
  
  publish:
    deps: [build]
    cmds:
      - npm publish
```

{% endcode %}

{% hint style="info" %}
Make sure to setup correct [caching](https://no0dles.gitbook.io/hammerkit/task/caching) to speed up your execution and prevent unnecessary work.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://no0dles.gitbook.io/hammerkit/task/dependencies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
