symbol-tools

SKILL.md

SymbolFYI — Symbol Tools for AI Agents

Pure Python symbol encoder. Compute 11 encoding representations and full Unicode properties for any character. Includes 47 HTML entity mappings — all with zero dependencies (optional fonttools for block/script info).

Install: pip install symbolfyi · Web: symbolfyi.com · API: REST API · npm: npm install symbolfyi

When to Use

  • User asks to encode a symbol or special character into Unicode, HTML, CSS, or programming language format
  • User needs Unicode properties for a character (name, category, block, script)
  • User wants to look up or reverse-lookup an HTML entity (→, ♥, etc.)
  • User needs UTF-8 or UTF-16 byte representation of a character
  • User asks about Unicode general categories or bidirectional properties

Tools

get_encodings(char) -> EncodingInfo

Compute 11 encoding representations for any single character.

from symbolfyi import get_encodings

enc = get_encodings("→")
enc.unicode        # 'U+2192'
enc.html_decimal   # '→'
enc.html_hex       # '→'
enc.html_entity    # '→'
enc.css            # '\2192'
enc.javascript     # '\u{2192}'
enc.python         # '\u2192'
enc.java           # '\u2192'
enc.utf8_bytes     # 'e2 86 92'
enc.utf16_bytes    # '21 92'
enc.url_encoded    # '%E2%86%92'

get_info(char) -> SymbolInfo | None

Get full Unicode properties and all encodings for a character.

from symbolfyi import get_info

info = get_info("♠")
info.name           # 'BLACK SPADE SUIT'
info.codepoint      # 9824
info.character      # '♠'
info.category       # 'So'
info.category_name  # 'Other Symbol'
info.block          # 'Miscellaneous Symbols'  (requires fonttools)
info.script         # 'Zyyy'  (requires fonttools)
info.bidirectional  # 'ON'
info.mirrored       # False
info.encodings      # EncodingInfo (all 11 formats)

lookup_html_entity(entity) -> str | None

Resolve an HTML entity string to its character.

from symbolfyi import lookup_html_entity

lookup_html_entity("&")     # '&'
lookup_html_entity("♥")  # '♥'
lookup_html_entity("→")    # '→'
lookup_html_entity("€")    # '€'

get_category_name(category_code) -> str

Get the full name for a Unicode general category code.

from symbolfyi import get_category_name

get_category_name("Sm")  # 'Math Symbol'
get_category_name("Sc")  # 'Currency Symbol'
get_category_name("Lu")  # 'Uppercase Letter'

REST API (No Auth Required)

curl https://symbolfyi.com/api/symbol/2192/
curl https://symbolfyi.com/api/encode/→/
curl https://symbolfyi.com/api/search/?q=arrow
curl https://symbolfyi.com/api/collection/arrows/
curl https://symbolfyi.com/api/random/

Full spec: OpenAPI 3.1.0

Encoding Formats Reference

Format Example () Use Case
Unicode U+2192 Standard reference
HTML Decimal → HTML pages
HTML Hex → HTML pages
HTML Entity → Named HTML entity
CSS \2192 content property
JavaScript \u{2192} ES6+ string literals
Python \u2192 String literals
Java \u2192 String literals
UTF-8 e2 86 92 Byte-level encoding
UTF-16 21 92 Windows/Java internals
URL %E2%86%92 URLs, query strings

Common HTML Entities

Entity Character Name
& & Ampersand
&lt; &gt; < > Angle brackets
&copy; © Copyright
&reg; ® Registered
&trade; Trademark
&euro; Euro sign
&pound; £ Pound sign
&rarr; Right arrow
&hearts; Heart suit
&infin; Infinity
&ne; Not equal
&le; &ge; ≤ ≥ Less/greater or equal

Unicode General Categories

Code Name Examples
Lu Uppercase Letter A, B, C
Ll Lowercase Letter a, b, c
Nd Decimal Number 0, 1, 2
Sm Math Symbol +, =, ∞
Sc Currency Symbol $, €, £
So Other Symbol ♠, ♥, ☆
Po Other Punctuation !, ?, .
Ps/Pe Open/Close Punctuation (, ), [, ]

Demo

SymbolFYI demo

Creative FYI Family

Part of the FYIPedia ecosystem: ColorFYI, EmojiFYI, UnicodeFYI, FontFYI.

Weekly Installs
6
First Seen
11 days ago
Installed on
opencode6
gemini-cli6
claude-code6
github-copilot6
codex6
kimi-cli6