keytao-draft

Manages Keytao input method draft batches for adding, editing, deleting, and submitting dictionary entries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, nonebot2.

What problem does it solve? Managing Keytao input method dictionary entries through a chat bot requires careful handling of batch drafts, encoding conflicts, and review submissions. This Skill lets users add, modify, delete, preview, and submit word entries to the Keytao platform via natural language in QQ or Telegram, with strict confirmation protocols that prevent accidental writes. ## Core Features & Use Cases - Batch Draft Management: Add multiple entries at once with keytao_batch_add_to_draft, view unified diff previews, and remove items individually or in bulk by ID. - Encoding Conflict Handling: Detects duplicate codes, computes code-shift plans via keytao_shift_phrase_code, and manages weight-based ordering for same-code candidate chains. - Safe Submit and Recall: Submits draft batches for admin review and recalls submissions using server-bound snapshot tickets with CAS validation, so the model can never confirm writes on its own. - Use Case: A user says "把 防粘 fpnm 的粘改成黏,再提交审核" — the Skill builds a Change operation with old_word, previews the draft, and submits the batch only under the exact authorized snapshot. ## Quick Start Ask the bot to add a word with its Keytao code to your draft, for example by saying "帮我添加词条 测试 ushi", after binding your account with /bind.

Frequently Asked Questions about keytao-draft

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

FAQPage Schema
How do I add words to the Keytao dictionary from a chat bot?▼

Send a message with the word and its Keytao code, such as "添加 测试 ushi". The bot calls keytao_create_phrase or keytao_batch_add_to_draft, shows a preview, and writes to your draft batch after confirmation. You must bind your account with /bind first.

How do I submit a Keytao draft batch for review?▼

Say "提交" or "提审" after adding entries. The bot fetches a read-only snapshot of the batch, and the program replays the exact server ticket bound to batchId, contentVersion, and digests. The model itself can never construct a confirmation.

Why do Keytao draft tools return 404 errors?▼

A 404 means your chat account is not bound to a Keytao platform account. Run the /bind command to link your QQ or Telegram identity before calling any draft tool, since platform and platform_id are injected automatically.

What happens when a Keytao code is already occupied?▼

The tool returns a duplicate_code warning showing which word occupies the code. For single target-consistent Create operations the program auto-confirms once and shows the resulting same-code order; otherwise it asks whether to keep the code or find an empty slot via keytao_encode.

Can I undo a submitted Keytao batch?▼

Yes, say "撤回" or "撤销提交" to call keytao_recall_batch, which restores the batch from reviewing state back to draft. This only works while the batch is still under review; recall uses snapshot CAS validation and fails safely if the batch changed.

What are the limitations of Keytao draft deletion?▼

Only entries in Draft status batches can be deleted; submitted batches cannot be modified until recalled. Deletion requires entry IDs from keytao_list_draft_items, and codes must be pure lowercase letters without spaces.