knowledge-base

A tool for managing a personal knowledge base, a collection of saved files, web pages, notes, and folders. It uses the IMA Wiki API to upload content, browse it, search it, and view knowledge-base details.

In plain words
What is it for?
Use it to upload files, add web pages or notes, import document URLs, check for duplicate names, browse folders, search stored content, and retrieve knowledge-base information.
Why use it?
It removes the need to handle different content types and API calls manually when adding or finding information in a knowledge base.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/idea2realclaw/myagent/knowledge-base
Any agent
npx skills add idea2realClaw/myAgent --skill knowledge-base
Clone the repo
git clone --depth 1 https://github.com/idea2realClaw/myAgent

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.07303
Opus 5 $0.00000 $0.03651
Sonnet 5 $0.00000 $0.01461
Haiku 4.5 $0.00000 $0.00730

Measured 2d ago against content hash c60d2f2844f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

knowledge-base scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/cos-upload.cjs, scripts/preflight-check.cjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TEMP_DIR"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. **发送 HEAD 请求检查 Content-Type**:`curl -sI -L <url>` 查看响应头
skills/ima-skills/ima-skill/knowledge-base/SKILL.md · 522 lines

How it starts

The opening of the file, as written. The whole thing — 522 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Base (知识库)

Prerequisites: see root ../SKILL.md for setup, credentials, and ima_api() helper.

API base path: openapi/wiki/v1

通过 IMA Wiki OpenAPI 管理用户知识库,支持上传文件、添加网页链接、搜索知识库内容、浏览知识库列表和获取知识库详情。

完整的数据结构和接口参数详见 references/api.md

接口决策表

用户意图 调用接口 关键参数
上传文件到知识库 check_repeated_namescreate_media → COS Upload → add_knowledge media_type(按扩展名),knowledge_base_idfile_namefile_size
上传文件到知识库的某个文件夹 先定位文件夹 → 同上(folder_id 传入目标文件夹 ID) 见「文件夹操作」章节
添加网页/微信文章到知识库 import_urls urls(1-10 个),knowledge_base_id,可选 folder_id(省略则根目录)
添加笔记到知识库 add_knowledge media_type=11note_info.content_id=<doc_id>knowledge_base_id
添加 URL(文件型)到知识库 check_repeated_names → 下载文件 → 走"上传文件"流程 URL 指向 PDF/Word/PPT 等文件时,按文件方式处理
检查文件名是否重复 check_repeated_names params[].nameparams[].media_typeknowledge_base_idfolder_id
获取知识库信息 get_knowledge_base ids(1-20 个,不重复)
浏览知识库内容列表 / 浏览文件夹 get_knowledge_list knowledge_base_idcursorlimit(1~50),可选 folder_id
在知识库中搜索(含文件和文件夹) search_knowledge queryknowledge_base_idcursor
按关键词查找知识库(用户知道名字但不知道 ID) search_knowledge_base querycursorlimit(1~50)
查看/了解自己有哪些知识库 search_knowledge_basequery 传空字符串) query: ""cursorlimit(1~50)
添加内容但未指定目标知识库 get_addable_knowledge_base_list → 展示列表让用户选择 cursorlimit(1~50)

Read the full file on GitHub · 522 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 522 lines · 0 tokens per session scan C c60d2f2844f4

Subscribe to this mod's changes

knowledge-base is a skill published in the GitHub repository idea2realClaw/myAgent (2 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,303 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens