# Add Dependency

> Add a new third-party dependency to the project following the version catalog and approval workflow. Use when this capability is needed.

- Skill: `tomevault-io/add-dependency` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/add-dependency`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/add-dependency/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/add-dependency

---


# Add Third-Party Dependency

This skill outlines the necessary steps to validly adding a new dependency to the project.

## Workflow

1.  **Verify Necessity**:
    *   **Goal**: Ensure the dependency is absolutely necessary.
    *   **Action**: Avoid adding new third-party dependencies unless there is no tailored solution available or implementing it manually helps the project significantly.
    *   **Action**: You **MUST** get user approval before adding any new third-party dependency. Explain why it is needed and what alternatives were considered.

2.  **Find Latest Version**:
    *   **Goal**: Use the most up-to-date stable version.
    *   **Action**: Perform a web search to determine the latest stable version of the library.
    *   **Example**: `search_web(query="latest version of retrofit")`

3.  **Update Version Catalog**:
    *   **Goal**: Centralize dependency management.
    *   **Action**: Add the dependency to `gradle/libs.versions.toml`.
    *   **Format**:
        ```toml
        [versions]
        libraryName = "1.2.3"

        [libraries]
        library-artifact = { group = "com.example", name = "library-artifact", version.ref = "libraryName" }
        ```

4.  **Sync and Build**:
    *   **Goal**: Verify the dependency is resolved correctly.
    *   **Action**: Run a build or sync command to ensure the new dependency doesn't break the build.
    *   **Command**: `./gradlew assembleDebug` (or relevant task).

## Guidelines
- **Approval First**: Do not modify files before getting confirmation from the user (unless in a fully autonomous mode where this is pre-approved).
- **No Hardcoding**: Never put version numbers directly in `build.gradle.kts` files. Always use the version catalog (`libs.versions.toml`).

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/anysoftkeyboard) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

