add-icon
Installation
SKILL.md
Add a Font Awesome icon to the user's project. This skill handles icon name resolution, project detection, and code generation for every Font Awesome integration method.
Scripts referenced from suggest-icon are relative to plugins/icons/skills/suggest-icon/. Scripts referenced from add-icon are relative to plugins/icons/skills/add-icon/. Run them from their respective directories.
Tool selection
At the start, run command -v fa to check whether the fa CLI is available on PATH.
- If
fais found: use it for icon lookups and kit fetching (it returns structured JSON). For kit operations (fa kits), check auth first: runfa whoamito see if the user is logged in. If logged in,fa kitswill work directly. If not logged in butFA_API_TOKENis set,fa kitswill also work. If neither, tell the user: "You need to be logged in to the Font Awesome CLI for kit operations. Runfa loginin a separate terminal, then come back here and try again." If they cannot log in, fall back tofetch-kit.py. - If
fais not found: fall back to the Python scripts described below. latest-version.pyis always used for version detection — thefaCLI has no equivalent.
Steps
1. Resolve the icon name
First, determine the Font Awesome version. If the user specifies one, use that. Otherwise run ./scripts/latest-version.py (in the suggest-icon skill directory) to get the latest.
Then verify the icon exists:
Related skills