search-assets
Installation
SKILL.md
ImageKit Search Queries (searchQuery)
client.assets.list({ searchQuery }) takes a Lucene-like filter string. A good query is the difference between one precise API call and paging through everything. This skill is the cheatsheet for building that string.
When user requests "find Nike brand images", here brand could be a custom metadata field, i.e. "customMetadata.brand". So it is always recommended to first list the custom metadata fields available so that correct searchQuery can be constructed. You can use client.customMetadataFields.list() to get the list of custom metadata fields and their types.
Syntax
- Operators:
=:<<=>>=INNOT INNOT =HASEXISTSNOT EXISTS - Combine:
AND,OR. Group:( ... ) - Quoting: string values in
"double quotes"; numbers and booleans (true/false) unquoted;customMetadata/embeddedMetadatafield names must be quoted, e.g."customMetadata.brand". := begins-with / within-subfolders.== exact.HAS= case-insensitive full-text (tokenized).