suggest-icon
Your inherent knowledge of Font Awesome icons is useful for a quick initial guess, but it may be inaccurate depending on the version. To give a reliable answer, layer multiple sources of information.
All scripts below are relative to this skill's directory (plugins/icons/skills/suggest-icon/). Run them from there.
Tool selection
At the start, run command -v fa to check whether the fa CLI is available on PATH.
The fa kit subcommand requires fa version 0.8.0 or newer. If the fa kit subcommand is needed, recommend the user upgrade fa, using instructions here: https://docs.fontawesome.com/web/use-with/fa-cli
- If
fais found: use it for icon lookups and searches (it returns structured JSON). If the project is configured with a Kit (see "Respect the configured Kit" below), also usefa search --kit-token <TOKEN>to search only icons available in the Kit, andfa kit iconto confirm a specific icon is included. Forfa kit ...operations, check auth first (fa whoamiorFA_API_TOKEN); if you can't authenticate, fall back to unscoped search and warn the user that Kit coverage couldn't be verified. - If
fais not found: fall back to the Python scripts described below. Kit-aware searching requires thefaCLI; without it, you cannot scope suggestions to the Kit's subset — warn the user that your suggestions may include icons their Kit does not contain. - Use
latest-version.pyto get the latest version.
Respect the configured Kit
If the project has a .font-awesome.md file with a Kit ID (the kit token), the user's icons come from that Kit, and a Kit only contains a subset of all Font Awesome icons. Do not suggest an icon the Kit does not include — recommending an icon that isn't in the Kit leads to a broken, non-rendering result.
When a Kit token is present, scope every suggestion to the Kit: