Piglet IMA Notes and Knowledge Base
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 IDandAPI Key, resolved fromenvironment variables → config file; all requests useHTTP POST + JSON Bodyand are sent only to the official Base URL. - Module routing: use
notesfor note-content actions such as search, browse, read, create, and append; useknowledge-basefor 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
notesappend_doc; “add this note to a knowledge base” maps toknowledge-baseadd_knowledge. - Encoding protection:
noteswrite paths must validatecontentandtitleas validUTF-8;knowledge-basefile uploads keep the original binary content; underPowerShell 5.1, all API request bodies must be explicitly converted toUTF-8byte 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.
Related Skills
Turns Taleb's antifragility, barbell strategy, and via negativa into executable prompts for risk analysis in career, investing, health, and other domains.
Keyword news search over ZAKER’s corpus with optional time filtering, returning up to 20 titles, authors, and summaries.
A generic knowledge review skill that generates role-based checklists, rrule-based reminders, and on-demand reviews without storing personal data.
A knowledge-management skill for layered retrieval across information sources.