← 返回 Skills 市场
realwaynesun

jpocr

作者 Wayne · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
939
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jpocr
功能描述
Japanese OCR via NDLOCR-Lite (National Diet Library). Trigger on 'OCR this image', '日文OCR', 'recognize Japanese text', or any request to extract text from Ja...
使用说明 (SKILL.md)

jpocr — Japanese OCR Skill

Local Japanese OCR powered by NDLOCR-Lite from Japan's National Diet Library. Runs on CPU (Apple Silicon / x86), no GPU or API key required.

Capabilities

Target Quality
Printed Japanese (活字) Excellent
Vertical text (縦書き) Excellent
English text Good
Handwritten Japanese (手書き) Experimental

How to call

Run scripts/ocr-cli.sh from the skill root directory:

\x3CSKILL_ROOT>/scripts/ocr-cli.sh \x3Cimage_path>              # → plain text to stdout
\x3CSKILL_ROOT>/scripts/ocr-cli.sh \x3Cimage_path> --json        # → JSON with bounding boxes
\x3CSKILL_ROOT>/scripts/ocr-cli.sh \x3Cimage_path> --viz         # → also saves visualization
\x3CSKILL_ROOT>/scripts/ocr-cli.sh \x3Cdir_path>                 # → batch all images in dir

Output formats

text (default): one line per detected text region.

json:

{
  "contents": [[
    {
      "boundingBox": [[x1,y1],[x1,y2],[x2,y1],[x2,y2]],
      "text": "recognized text",
      "confidence": 0.95,
      "isVertical": "true"
    }
  ]],
  "imginfo": { "img_width": 1920, "img_height": 1080 }
}

viz: saves viz_\x3Cfilename> bounding-box overlay image to the output directory.

Performance

  • ~2-3 seconds per image on Apple Silicon (CPU)
  • Formats: JPG, PNG, TIFF, JP2, BMP
  • Charset: ~7000 characters (JIS kanji + kana + ASCII + Greek)

Tech stack

  • Layout detection: DEIMv2 (ONNX)
  • Text recognition: PARSeq cascade (30/50/100 char models, ONNX)
  • Reading order: xy-cut algorithm
安全使用建议
This package is incomplete and opaque. Before installing or running: (1) request or inspect the missing files (src/ocr.py, model assets, and any venv setup scripts) and any instructions for obtaining model weights; (2) verify where those models/code would be downloaded from (trusted GitHub release or official NDLOCR distribution) — avoid skills that fetch code from unknown servers; (3) note that the runner script silences stdout/stderr (>/dev/null 2>&1), which will hide errors and any network download messages—run it in a sandbox or with that redirection removed so you can see activity; (4) prefer a skill with a clear install spec or documented provenance for large model files. If the author cannot provide the missing files and a clear install provenance, treat this skill as untrusted.
功能分析
Type: OpenClaw Skill Name: jpocr Version: 1.0.0 The `scripts/ocr-cli.sh` file contains a critical shell injection vulnerability. The `$SOURCE_ARG` variable, which is constructed using user-controlled input (`$INPUT`), is used unquoted in the execution of the Python script (`"$VENV" "$OCR" $SOURCE_ARG ...`). This allows an attacker to inject arbitrary shell commands by crafting the `<image_path>` argument, leading to potential Remote Code Execution (RCE). While the `SKILL.md` instructions themselves are not malicious prompt injection, the underlying script's vulnerability makes this skill suspicious.
能力评估
Purpose & Capability
Name/description promise local OCR via NDLOCR-Lite, which is plausible, but the repository bundle lacks the referenced runtime (src/ocr.py) and virtualenv (.venv/bin/python). The skill therefore cannot perform its stated purpose as packaged; that mismatch is incoherent.
Instruction Scope
SKILL.md instructs running scripts/ocr-cli.sh which invokes a python program and writes output files. The README provides no installation steps, model files, or network/download behavior. The executor script redirects the OCR process's stdout/stderr to /dev/null, hiding errors or network activity—this opaque behavior is risky and the instructions are incomplete.
Install Mechanism
There is no install spec (low risk), but the script expects a prebuilt .venv and model/code under src/ which are not included. Absence of an install mechanism or documentation for obtaining models/code is a packaging/maintainability concern (it may require fetching large model artifacts or code from elsewhere).
Credentials
The skill requests no credentials and only optionally uses JPOCR_OUTPUT to set output directory. No secret or unrelated environment variables are required. However, the use of a hidden .venv path and optional env var should be documented.
Persistence & Privilege
Flags are default (not always-on); the skill does not request persistent system-wide presence or modify other skill configs. It appears to run as a one-off command when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jpocr
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jpocr 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of jpocr, a local Japanese OCR skill powered by NDLOCR-Lite from Japan's National Diet Library. - Supports high-quality printed and vertical Japanese text recognition; works for English text as well. - Provides batch processing and multiple output formats: plain text, JSON with bounding boxes, and visualization images. - Experimental support for handwritten Japanese OCR. - Runs on CPU (Apple Silicon/x86); no GPU or API key required.
元数据
Slug jpocr
版本 1.0.0
许可证
累计安装 1
当前安装数 0
历史版本数 1
常见问题

jpocr 是什么?

Japanese OCR via NDLOCR-Lite (National Diet Library). Trigger on 'OCR this image', '日文OCR', 'recognize Japanese text', or any request to extract text from Ja... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 939 次。

如何安装 jpocr?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jpocr」即可一键安装,无需额外配置。

jpocr 是免费的吗?

是的,jpocr 完全免费(开源免费),可自由下载、安装和使用。

jpocr 支持哪些平台?

jpocr 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 jpocr?

由 Wayne(@realwaynesun)开发并维护,当前版本 v1.0.0。

💬 留言讨论