Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add wpsnote/wpsnote-skills/plugin install capture-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/wpsnote/wpsnote-skills/doc-importer)<a href="https://agentmods.dev/skills/wpsnote/wpsnote-skills/doc-importer"><img src="https://agentmods.dev/badge/skills/wpsnote/wpsnote-skills/doc-importer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/wpsnote/wpsnote-skills/doc-importer"><img src="https://agentmods.dev/badge/skills/wpsnote/wpsnote-skills/doc-importer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00188 | $0.04613 |
| Opus 5.5 | $0.00075 | $0.01845 |
| Sonnet 5.5 | $0.00038 | $0.00923 |
| Haiku 4.5 | $0.00019 | $0.00461 |
Grade A, and why
doc-importer scanned grade A with 0 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 1mo ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 475 lines — stays where its author put it; the contents beside it link to each section on GitHub.
文档导入器(Doc Importer)
将本地文档(Obsidian、思源笔记、微信公众号 HTML、下载目录或任意目录)批量导入到 WPS 笔记。
快速开始
当前技能的笔记写入统一走笔记 Agent 工具;如需理解批量扫描和转换逻辑,可先读取本 Skill 自带脚本:
参考实现:
- read_file("scripts/scan_docs.py") # 目录扫描与来源识别
- read_file("scripts/import_to_wps.py") # 转换与导入主流程
实际写入:
- create_note
- get_note_outline
- batch_edit
- insert_image
- read_note / read_blocks
- search_notes
- sync_note
支持的文档来源
| 来源 | 说明 | 典型目录结构 |
|---|---|---|
| Obsidian Vault | 扫描 .md 文件,保留 wiki 链接、Callout、标签 | Vault/笔记名.md + attachments/ |
| 思源笔记 | 扫描 .sy 文件(JSON格式),提取 Block Tree | SiYuan/data/笔记本/文档.sy |
| 微信公众号 | 解析 原文.html(含富文本格式、内联样式) |
文章名/原文.html + 图片/ |
| 任意目录 | 用户指定路径,递归扫描子目录 | 任意 |
支持的文件格式
| 格式 | 转换方式 | 图片处理 | 富文本保留 |
|---|---|---|---|
.html |
BeautifulSoup 解析内联样式 | 本地图片 base64 | ✅ 颜色/粗体/标题 |
.md / .markdown |
直接解析,转 WPS XML | 本地图片 base64 | 基本格式 |
.pdf |
pdfplumber 提取文本 + pdfimages 提取图片 | 提取嵌入图片 | 标题推断 |
.docx |
pandoc 转 markdown,提取 word/media/ | 解包提取 | 基本格式 |
.pptx |
markitdown 提取文本 + 解包媒体 | 解包提取 | 幻灯片结构 |
.xlsx |
pandas 读取,转 WPS table | 不含图片 | 表格结构 |
.txt |
直接读取 | 不含图片 | 无 |
.sy |
JSON 解析思源 Block Tree | 提取 assets 图片 | 全部 |
WPS API 关键限制(必读)
在实际导入前,必须了解以下 WPS 笔记 API 的重要限制,否则会导致内容丢失或图片插入失败。
1. get_note_outline 默认只返回 100 个 block
get_note_outline 默认按分页视图返回 block,blocks 数组可能只覆盖前一部分内容,但 block_count 会返回真实总数。
影响:大文章(> 100 个 block)如果只靠首屏大纲查占位符,只能找到前一部分 block,后半段图片会丢失。
解决方案:先用 get_note_outline 拿首批 block,再用 read_blocks 续读:
def get_all_blocks(note_id):
"""翻页获取笔记全部 blocks"""
# 第一页用 get_note_outline(有 preview 字段)
r = get_note_outline(note_id=note_id)
data = r.get('data', {})
total = data.get('block_count', 0)
blocks = list(data.get('blocks', []))
last_id = blocks[-1]['id'] if blocks else None
# 超过首批范围时用 read_blocks 续读
while len(blocks) < total and last_id:
r2 = read_blocks(note_id=note_id, block_id=last_id, after=100)
new_blocks = (r2.get('data') or {}).get('blocks', [])
if not new_blocks:
break
blocks.extend(new_blocks)
last_id = new_blocks[-1]['id']
return blocks
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.
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.
- 1mo ago First seen · 475 lines · 188 tokens per session scan A d970c708b2fb
doc-importer is a skill published in the GitHub repository wpsnote/wpsnote-skills (183 stars, last pushed today), licensed MIT. It adds 188 tokens to every session and 4,613 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
research-hub
Use research-hub to operate Zotero, Obsidian, and NotebookLM research workflows through CLI, MCP, REST, and dashboard. Trigger when the user asks to find papers, ingest sources, organize a literature review, build Obsidian research notes, upload sources to NotebookLM, inspect clusters, generate AI briefs, or maintain…
write-docs-cn
A guide to writing project documentation, especially README files. It explains how tutorials differ from reference material and where each kind of information belongs.
write-tech-cn
A writing guide for Chinese technical documents such as READMEs, tutorials, blogs, and technical explanations. It focuses on direct conclusions, clear actions, natural Chinese, and consistent technical terms.
pdf-image-text-extractor
A tool for reading text from images and PDF files, including scanned documents. OCR means recognizing printed or handwritten characters in an image and turning them into editable text.
youtube-digest
A transcript extractor for YouTube videos. It reads available subtitles or automatically generated captions, can translate non-Chinese captions into Chinese, and can export the text to Excel, a spreadsheet application.
hyalo-okf
Maintain Open Knowledge Format vaults with Hyalo's OKF index, log, and conformance commands.