# Libraries & Dependencies

Libraries are **specialized items** that are not visible in the Storefront. Instead, they are available for other publishers to reference inside their scripts.

### Creating a Library

Creating a library works the same way as creating a script (see[Step By Step Guide](/publishing-tool/step-by-step-guide.md)).

The only difference is that a library requires a **Library ID**.

* The Library ID is a unique identifier used by scripts to reference your library.
* Without it, other publishers cannot include your library as a dependency.

You can create and assign a Library ID in the **General** tab:

<figure><img src="/files/Y4T9Q7L3uGc5HgAqrreN" alt=""><figcaption></figcaption></figure>

Once published and approved, your library becomes available for others to use as a dependency.

### Referencing Libraries

When your script references a library, the library is automatically loaded alongside your script at runtime.

To add a library dependency:

1. Go to the **Dependencies** tab.
2. Click **Add dependency**.
3. Find the library you want to reference and click **Add**.
4. The library will appear in your dependencies list.

<figure><img src="/files/4IoKsm2JB4Se96w2awiX" alt=""><figcaption></figcaption></figure>

It is recommended to reference a **specific version** of a library rather than always pulling the latest. This ensures your script continues to work even if the library author publishes breaking changes later.


---

# 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://lua2.fatality.win/publishing-tool/libraries-and-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.
