AI Agent Hub
Back to skills
Piglet IMA Notes and Knowledge Base icon

Piglet IMA Notes and Knowledge Base

Knowledge Management Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_5f8d5bba/968db633cb6a4ca2398b69371eb4e326 according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

When an agent needs to operate IMA notes and knowledge bases, failure modes are not only missing API calls, but also wrong module routing, absent credentials, and silent Chinese text corruption from encoding. This skill wraps the ima.qq.com OpenAPI into a decision flow that separates notes from knowledge-base tasks and adds preflight checks for credentials and encoding.

How it works

  • Unified auth and transport: uses Client ID and API Key, resolved from environment variables → config file; all requests use HTTP POST + JSON Body and are sent only to the official Base URL.
  • Module routing: use notes for note-content actions such as search, browse, read, create, and append; use knowledge-base for knowledge-entry actions such as file upload, web link addition, knowledge search, content browsing, and note association.
  • Ambiguity handling: for example, “add content to a note inside a knowledge base” maps to notes append_doc; “add this note to a knowledge base” maps to knowledge-base add_knowledge.
  • Encoding protection: notes write paths must validate content and title as valid UTF-8; knowledge-base file uploads keep the original binary content; under PowerShell 5.1, all API request bodies must be explicitly converted to UTF-8 byte arrays.

Boundaries

Useful for teams that already have IMA API credentials and want agent-driven note or knowledge-base workflows. It does not replace the IMA service itself; if credentials are empty, the skill stops and asks for setup. Multi-module tasks run sequentially, for example search from knowledge-base first, then write to notes.

Use Cases

  • Validate IMA credentials before calling note APIs in agent workflows.
  • Route note-append requests to the notes module instead of knowledge-base.
  • Upload files to the IMA knowledge base without re-encoding their contents.
  • Detect PowerShell 5.1 and convert API request bodies to UTF-8 bytes.

Best For

  • Engineering teams with IMA credentials that want agent-driven note operations.
  • Product engineers writing scraped content into IMA notes without mojibake.
  • Knowledge managers adding PDFs, links, and notes to IMA knowledge bases.
  • Automation authors calling IMA APIs from Windows PowerShell 5.1.