ima-skill

Manage IMA notes and knowledge bases through the official IMA OpenAPI.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/sliec/shared-files --skill ima-skill-sliec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ima-skill
Source: https://github.com/sliec/shared-files/tree/main/skills/ima-skill
Command: npx skills add https://github.com/sliec/shared-files --skill ima-skill-sliec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? It lets you operate your IMA (ima.qq.com) notes and knowledge bases directly from an AI agent, removing the need to manually switch to the IMA client for searching notes, creating content, uploading files, or organizing knowledge base entries. ## Core Features & Use Cases - Notes Management: Search, browse, read, create, and append to personal notes via the IMA OpenAPI, with mandatory UTF-8 validation to prevent garbled text. - Knowledge Base Operations: Upload files (PDF, Word, Excel, images, audio, etc.) through a gated preflight-check and COS upload pipeline, import web pages and WeChat articles, search and browse knowledge base content, and retrieve original media. - Use Case: Ask the agent to "upload report.pdf to my product documentation knowledge base" — it validates the file type and size, checks for duplicate names, uploads to Tencent COS with temporary credentials, and registers the file in the knowledge base. ## Quick Start Configure your IMA Client ID and API Key, then ask the agent to search my IMA notes for meeting minutes and summarize the most recent one.

Frequently Asked Questions about ima-skill

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

FAQPage Schema
How do I upload a file to an IMA knowledge base?

Run the preflight-check script to validate file type and size, call check_repeated_names to detect duplicates, then create_media to get COS credentials, upload with cos-upload.cjs, and finish with add_knowledge. The title must exactly match the original filename.

How do I create or append to IMA notes with the API?

Use import_doc to create a new note or append_doc to add content to an existing note, both with content_format set to 1 (Markdown). All string fields must be validated as legal UTF-8 before writing to avoid irreversible garbled text.

What credentials does the IMA OpenAPI skill need?

It requires an IMA Client ID and API Key from https://ima.qq.com/agent-interface, supplied via the IMA_OPENAPI_CLIENTID and IMA_OPENAPI_APIKEY environment variables or files under ~/.config/ima/. Credentials are only sent as headers to ima.qq.com.

What file types can be uploaded to an IMA knowledge base?

Supported uploads include PDF, Word, PowerPoint, Excel/CSV, Markdown, TXT, Xmind, PNG/JPEG/WebP images, and MP3/M4A/WAV/AAC audio. Video files, Bilibili/YouTube URLs, and file:// URLs are not supported and require the IMA desktop client.

Why does Chinese text become garbled when calling the IMA API from PowerShell?

PowerShell 5.1 silently converts request bodies from UTF-8 to the system ANSI encoding (GBK on Chinese Windows). The fix is to detect the PowerShell version and send the JSON body as an explicit UTF-8 byte array instead of a string.

Can I add local images to an IMA note?

No. The import_doc and append_doc content field only supports Markdown text and does not accept local image paths. Local image references must be filtered out before writing, while http/https image links can be kept.