Unified IMA OpenAPI
Paste the following prompt into your AI chat to install this skill:
Please install @user_5958866b/test00qwb according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem to solve
When an agent uses the IMA OpenAPI for text and files, “notes” and “knowledge-base” are easy to conflate. A request like “save this into the knowledge base” may actually need append_doc; “add this note to the knowledge base” may require fetching note_id first. Encoding is another hidden failure: PowerShell 5.1 can silently convert the request body to GBK, and notes writes can create irreversible garbled text if content or title is not valid UTF-8.
How the skill works
- Module routing: route to
notesorknowledge-baseby intent; for cross-module actions such as “view original content” or “add a note to a knowledge base”, read both submodules before executing. - Credential and API flow: prefer
~/.config/ima/client_idandapi_key, then send JSON POST requests tohttps://ima.qq.comthroughima_api.cjs. - Error handling: check both script-level
stderrcodes-100/-200and backendstdoutresponses wherecode != 0. - Write safety: validate UTF-8 before notes text writes; keep uploaded files original, with unchanged filenames and binary contents.
Boundaries
Useful for note search, creation, appending, knowledge-base file upload, link addition, and media info retrieval. It should not process video, Bilibili/YouTube URLs, or file:// resources directly; in those cases, point users to the IMA desktop client. If intent is unclear, such as “save this”, confirm whether to create a new note or append to an existing one.
Use Cases
- Handle a request to save a web digest as a note: route to notes and call import_doc with title and body.
- Upload a local PDF to a knowledge base: use knowledge-base create_media and add_knowledge without renaming.
- Inspect original content of a knowledge-base entry: call get_media_info, then branch to notes if it is a note.
- Run IMA API requests from PowerShell 5.1: detect the version and send the body as a UTF-8 byte array.
Best For
- Knowledge managers who consolidate scattered notes and knowledge-base entries into searchable content.
- Backend engineers who wrap the IMA OpenAPI into automated workflows.
- LLM application developers who route notes and knowledge-base tasks inside agent workflows.
- Client integration engineers who debug Chinese encoding and PowerShell request-body anomalies.
Related Skills
Reads conversation-trace files to generate an animal- or mythology-based soul mirror card and Johari Window insights.
A Deling knowledge-base research workflow that clarifies intent, runs broad and vertical searches, supplements with web sources, validates diversity, and traces key claims.
A SiYuan knowledge-base management skill for double-link parent indexes, MOCs, numbered documents, tags, repo sync, and WeChat import workflows.
A structured workflow for academic literature reviews, covering multi-database search, screening, thematic synthesis, citation validation, and PDF output.