Preface¶
In environments like Cursor and Claude Code, users often say things like “help me put this PDF into the knowledge base”, “search my notes for the last meeting minutes”, or “note this passage down”. Without a systematic Skill, the Agent either cannot connect to Tencent IMA, or misroutes between “note writing” and “knowledge base uploading”. 酷斗斗 is a community Skill on SkillHub (located at @user_034dd33d/ludouxi159), which consolidates the note and knowledge base capabilities of the IMA OpenAPI into a SKILL.md workflow, letting the Agent select submodules based on intent and invoke the encapsulated scripts.
What This Is¶
酷斗斗’s display name on SkillHub is “酷斗斗”, and the in-package Skill identifier is ima-skill, version 1.0.0 (source: community, category: knowledge-management). The official one-line description is “This is my external brain”; the full description states: a unified IMA OpenAPI skill supporting note management and knowledge base operations. The associated product homepage is https://ima.qq.com.
The publisher is user_034dd33d. SkillHub page statistics (as of data retrieval): rating 100000, 930 downloads; the tag requires_api_key=false means the SkillHub installation itself does not require a store API Key — it is not equivalent to saying IMA credentials are unnecessary; actual calls still require configuring the IMA OpenAPI Client ID and API Key.
Core Features¶
Only the capability divisions explicitly written in the Skill documentation are listed below.
Notes (notes submodule)¶
- Read: search by title or body (
search_note), list notebooks (list_notebook), list notes (list_note), get body content (get_doc_content). - Write: create a new note (
import_doc), append to an existing note (append_doc). - Rules: before writing, the string must be valid UTF-8;
append_docmodifies an existing note, and when the target is unclear, confirm with the user first; note body content does not support local image paths — onlyhttp(s)image links are preserved.
Knowledge Base (knowledge-base submodule)¶
- Upload files to the knowledge base:
check_repeated_names→create_media→ COS upload →add_knowledge(includespreflight-check.cjsandcos-upload.cjshelper scripts). - Import web pages / WeChat articles:
import_urls. - Associate notes to a knowledge base:
add_knowledge(media_type=11). - Browse and retrieve: knowledge base list / search (
search_knowledge_base,get_knowledge_list,search_knowledge, etc.), get media info (get_media_info). - Limitations: video, Bilibili/YouTube links,
file://URLs, etc. are not supported; unsupported types should be rejected directly — do not suggest “force-trying to upload”.
Routing and Cross-Module¶
The main SKILL.md provides a “module decision table”: operations on note content go to notes; uploading files, adding links, and attaching notes to a knowledge base go to knowledge-base. If a user’s intent involves both sides (e.g., “note the content from the knowledge base into a note”), both submodule docs must be read first, then invoked in order. All HTTP requests are sent via ./ima_api.cjs to https://ima.qq.com; file uploads also use the temporary COS credentials (*.myqcloud.com) returned by IMA.
Runtime dependencies are listed in the package’s meta.json: Node.js ≥ 18.0.0 (used for .cjs scripts and JSON processing).
Installation and Activation¶
1. Install the SkillHub CLI (if not yet installed)¶
command -v skillhub && skillhub --version
If not installed, follow the official SkillHub instructions to execute (full installation example):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
2. Install 酷斗斗 to the current Agent’s skills directory¶
When installing, you must use --dir to point to the skills path actually recognized by the Agent; otherwise, the default ./skills/ location may not be loaded.
skillhub install ludouxi159 --namespace user_034dd33d --dir <your skills directory>
Common paths (from the SkillHub installation docs):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
The SkillHub page also notes: you can install @user_034dd33d/ludouxi159 according to https://skillhub.cn/install/skillhub.md. After installation, restart or refresh the Agent as required by your client.
3. Configure IMA OpenAPI credentials¶
Before calling any API, go to https://ima.qq.com/agent-interface to obtain the Client ID and API Key, then save them via either of the following methods.
Method A (config files, recommended by the Skill docs):
mkdir -p ~/.config/ima
echo "your_client_id" > ~/.config/ima/client_id
echo "your_api_key" > ~/.config/ima/api_key
Method B (environment variables):
export IMA_OPENAPI_CLIENTID="your_client_id"
export IMA_OPENAPI_APIKEY="your_api_key"
The Agent reads credentials in the order “environment variables → config files”; when missing, node ima_api.cjs ... will exit with error code -100 and print an explanation to stderr. Credentials are sent only as request headers to ima.qq.com; the Skill’s security statement specifies that they will not be written to logs or sent to other domains.
Typical Usage¶
The following examples are taken from the note submodule documentation bundled with the Skill; in actual execution, ima_api needs to be replaced with the node ima_api.cjs invocation style in the package directory (the main SKILL.md contains a complete bash template with OPTS).
Search and read notes:
# 1. Search by title
ima_api "openapi/note/v1/search_note" '{"search_type": 0, "query_info": {"title": "会议纪要"}, "start": 0, "end": 20}'
# 2. Read body content (target_content_format: 0 means plain text)
ima_api "openapi/note/v1/get_doc_content" '{"note_id": "目标note_id", "target_content_format": 0}'
Create a new note:
ima_api "openapi/note/v1/import_doc" '{"content_format": 1, "content": "# 标题\n\n正文内容"}'
Upload a file to the knowledge base (conceptual flow): first run knowledge-base/scripts/preflight-check.cjs on the local file for a type check, then check_repeated_names → create_media → cos-upload.cjs → add_knowledge; title must match the original file_name (including the extension). For large-file uploads, you can explicitly set a longer --timeout for cos-upload.cjs.
The scope of natural language triggers in user conversations (original text from the Skill description): when the user mentions knowledge base, database, notes, memos, file uploads, web bookmarks, knowledge search, or expresses intents like “help me note this down” or “search the knowledge base for XX”, this Skill should be activated.
Use Cases and Notes¶
Who it is for: users who already store materials and personal notes in Tencent IMA, and want agents like Cursor / Claude Code / Codex to perform search, read/write, and upload via the OpenAPI instead of manually opening the client.
Points to note:
- Credentials and compliance: you must apply for and securely keep your own IMA OpenAPI keys; note body content is private in group chat scenarios — the Skill requires displaying only the title and a summary.
- Encoding and environment: Windows PowerShell 5.1 may silently transcode JSON when sending it to the API, causing Chinese characters to become garbled; the Skill requires detecting the version and sending the Body as a UTF-8 byte array; UTF-8 validity must be validated before writing notes.
- Version and updates:
ima_api.cjshas a built-in update check on the first call of each day; a return of-200means you need to update the Skill first per the instructions before retrying the original request. The script metadata version recorded in the package’smeta.jsonmay coexist with the SkillHub-displayed 1.0.0 — the installed files take precedence. - Capability boundaries: scenarios such as video, certain external links, and inserting local images into notes require switching to the IMA desktop client or adjusting the content format.
Conclusion¶
酷斗斗 consolidates IMA’s note and knowledge base APIs into an installable Agent Skill: once installed into the correct skills directory and configured with IMA credentials, the Agent can route requests according to the decision table in the documentation and use ima_api.cjs along with the helper scripts to complete common read/write and upload flows.
- SkillHub page: https://www.skillhub.cn/skills/user_034dd33d/ludouxi159
- Official coordinate address: https://api.skillhub.cn/user_034dd33d/ludouxi159