keytao-lookup

Query Keytao input method codes, word splits, and frequency data via API tools.

2|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/xkinput/keytao-bot --skill keytao-lookup-xkinput
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: keytao-lookup
Source: https://github.com/xkinput/keytao-bot/tree/main/keytao_bot/skills/keytao-lookup
Command: npx skills add https://github.com/xkinput/keytao-bot --skill keytao-lookup-xkinput

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, nonebot2.

What problem does it solve? Users of the Keytao (键道) input method need to look up which codes map to which words, compute codes and character-root splits for arbitrary words, and compare word commonness before adding entries to the dictionary, all without memorizing encoding rules. ## Core Features & Use Cases - Bidirectional Dictionary Lookup: Query codes by word or words by code, individually or in batches of up to 100, with duplicate-code (重码) position labels. - Rule-Based Encoding: Compute candidate codes, fly-key variants, and per-character phonetic/shape splits for any word, including words not yet in the dictionary, with verified occupancy status for each candidate code. - Word Commonness Comparison: Compare 1-12 words using local corpus frequency (BCC modern channels, jieba) and dictionary evidence to support reordering same-code chains. - Use Case: A user asks "你好 怎么拆" in a QQ or Telegram chat; the bot calls keytao_encode and returns the recommended code nkhz plus per-character root breakdowns, then guides the add-word confirmation flow. ## Quick Start Ask the bot "查一下 世界 的键道编码" or "你好 怎么拆分" and it will call the appropriate lookup or encode tool and return formatted results.

Frequently Asked Questions about keytao-lookup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up a Keytao input method code for a Chinese word?▼

Call keytao_lookup_by_word with the Chinese word to get all its codes from the dictionary, or keytao_encode to compute codes by rule for words not in the dictionary. Batch variants accept up to 100 words per call.

How to get character root splits for a word in Keytao?▼

Use keytao_encode, which returns per-character pinyin, phonetic codes, character roots, and shape codes computed by encoding rules. The database lookup tools do not contain split information and cannot substitute for it.

Does the Keytao lookup tool support batch queries?▼

Yes, keytao_lookup_by_words_batch and keytao_lookup_by_codes_batch each accept up to 100 items per call. Single-item queries should use keytao_lookup_by_word or keytao_lookup_by_code instead.

What API and configuration does the Keytao lookup skill need?▼

It calls a Keytao Next API instance configured via KEYTAO_API_BASE, defaulting to https://keytao.vercel.app, and requires a bot API token from the NoneBot config. Requests use httpx with retry logic and 10-20 second timeouts.

Why does keytao_encode return no valid codes for some words?▼

Encoding fails when the service cannot determine pronunciation or the word contains unsupported characters, returning codes with question marks or an empty list. In that case the user must manually specify a code through the change-code flow.

Can I compare which of two words is more common before reordering a code chain?▼

Yes, keytao_word_commonness compares 1 to 12 words using local BCC corpus frequencies and dictionary evidence without modifying the dictionary. It reports per-word frequency, dictionary inclusion, and ties explicitly rather than treating missing data as zero.