doc-importer

doc-importer is a skill for Claude Code from wpsnote/wpsnote-skills. It costs 188 tokens per session (4,613 once invoked), scanned A, original, MIT.

A batch importer for bringing local documents into WPS Notes. It scans folders such as an Obsidian vault, a SiYuan notebook, an archive of WeChat articles, or a downloads folder, and handles HTML, Markdown, PDF, DOCX, PPTX, and XLSX files while keeping images and rich formatting.

In plain words
What is it for?
Use it to import existing notes, saved articles, PDFs, Word documents, presentations, spreadsheets, or other supported files from a local folder into WPS Notes.
Why use it?
It removes the need to copy documents into WPS Notes one by one. It is for importing content into notes, not for editing WPS Notes or converting files for other uses.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/xxx/Documents/articles.

Part of the capture-skills plugin — 6 skills shipped together

Good fit Use it to import existing notes, saved articles, PDFs, Word documents, presentations, spreadsheets, or other supported files from a local folder into WPS Notes.

Compare 6 skills from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add wpsnote/wpsnote-skills
Claude Code
/plugin install capture-skills

Made for: Claude Code.

Or install capture-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote 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.

agentmods badge for doc-importer

README.md
[![agentmods](https://agentmods.dev/badge/skills/wpsnote/wpsnote-skills/doc-importer/github.svg)](https://agentmods.dev/skills/wpsnote/wpsnote-skills/doc-importer)
Your own site
<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.

agentmods 80×15 button for doc-importer

Your own site · 80×15
<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>
Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured 1mo ago against content hash d970c708b2fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/convert.py, scripts/import_to_wps.py, scripts/scan_docs.py), 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.

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.

skills/doc-importer/SKILL.md · 475 lines

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

Read the full file on GitHub · 475 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. 1mo ago First seen · 475 lines · 188 tokens per session scan A d970c708b2fb

Subscribe to this mod's changes

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.

Related

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…

WenyuChiou/research-hub · 75 tokens

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.

pingfanfan/hello-dsh · 46 tokens

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.

pingfanfan/hello-dsh · 55 tokens

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.

redfox-data/redfox-community-dsh · 179 tokens

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.

redfox-data/redfox-community-dsh · 127 tokens

hyalo-okf

Maintain Open Knowledge Format vaults with Hyalo's OKF index, log, and conformance commands.

ractive/hyalo · 26 tokens