Detect Existing Icon Library
detect-icon-libraryChecks whether a project already has an icon library installed before any icon work, returning the locked library and installed icons or a no-library result.
Instructions
Check if the user's project already has an icon library installed via Better Design.
Reads /.library.json (default targetDir: "components/icons") if it exists and returns the locked library + installed icon list.
Call this BEFORE find-icon-library / install-icons. If a library is already locked, use it for any new icon work. Do NOT switch libraries mid-project.
Returns either:
The locked library info + installed icon list, with a hint to call install-icons using that libraryId, OR
A "no library detected" response, prompting the agent to call find-icon-library normally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Optional. One sentence on WHY you are calling this and what the user asked for (e.g. 'adding nav icons for the fintech dashboard'). Used only for usage analytics; does not change the result. | |
| manifestContent | No | Contents of the project's components/icons/.library.json file, if it exists. The agent should attempt to read this file from disk and pass it here. If the file doesn't exist or can't be read, omit this field. |