Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

paddleocr-text-recognitionpaddleocr 文本识别

Agent Skill

paddleocr-text-recognition 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

71,592

周安装

2,957

GitHub Stars

20

下载量

24,083
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:paddleocr-text-recognition(paddleocr 文本识别)
来源仓库:https://github.com/aidenwu0209/paddleocr-skills
仓库路径:skills/paddleocr-text-recognition
安装命令:
npx skills add https://github.com/aidenwu0209/paddleocr-skills --skill paddleocr-text-recognition
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aidenwu0209/paddleocr-skills --skill paddleocr-text-recognition

简介

通过 PaddleOCR API 和结构化 JSON 输出从图像、PDF 和文档中提取文本。

  • 支持图像和 PDF 的 URL 和本地文件路径;返回 JSON 格式的完整识别文本
  • 强制仅 API 方法:执行 python script/ocr_caller.py
  • 与 --file-url
  • 或--文件路径
  • 参数
  • 需要使用 PADDLOCR_OCR_API_URL 进行初始配置
  • 和 PADDLOCR_ACCESS_TOKEN
  • ;显示完整提取的文本,无需截断或摘要
  • 处理身份验证、速率限制和空结果; API 失败时立即停止,没有后备方法

SKILL.md

PaddleOCR Text Recognition Skill

When to Use This Skill

Invoke this skill in the following situations:

  • Extract text from images (screenshots, photos, scans)
  • Extract text from PDFs or document images
  • Extract text and positions from structured documents (invoices, receipts, forms, tables)
  • Extract text from URLs or local files that point to images/PDFs

Do not use this skill in the following situations:

  • Plain text files that can be read directly with the Read tool
  • Code files or markdown documents
  • Tasks that do not involve image-to-text conversion

How to Use This Skill

⛔ MANDATORY RESTRICTIONS - DO NOT VIOLATE ⛔

  1. ONLY use PaddleOCR Text Recognition API - Execute the script python scripts/ocr_caller.py
  2. NEVER read images directly - Do NOT read images yourself
  3. NEVER offer alternatives - Do NOT suggest "I can try to read it" or similar
  4. IF API fails - Display the error message and STOP immediately
  5. NO fallback methods - Do NOT attempt OCR any other way

If the script execution fails (API not configured, network error, etc.):

  • Show the error message to the user
  • Do NOT offer to help using your vision capabilities
  • Do NOT ask "Would you like me to try reading it?"
  • Simply stop and wait for user to fix the configuration

Basic Workflow

  1. Identify the input source: Input type note:

- User provides URL: Use the --file-url parameter - User provides local file path: Use the --file-path parameter - User uploads image: Save it first, then use --file-path - Supported file types depend on the model and endpoint configuration. - Follow the official endpoint/API documentation for the exact supported formats.

  1. Execute OCR: python scripts/ocr_caller.py --file-url "URL provided by user" --pretty Or for local files: python scripts/ocr_caller.py --file-path "file path" --pretty Default behavior: save raw JSON to a temp file:

- If --output is omitted, the script saves automatically under the system temp directory - Default path pattern: <system-temp>/paddleocr/text-recognition/results/result_<timestamp>_<id>.json - If --output is provided, it overrides the default temp-file destination - If --stdout is provided, JSON is printed to stdout and no file is saved - In save mode, the script prints the absolute saved path on stderr: Result saved to: /absolute/path/... - In default/custom save mode, read and parse the saved JSON file before responding - Use --stdout only when you explicitly want to skip file persistence

  1. Parse JSON response:

- In default/custom save mode, load JSON from the saved file path shown by the script - Check the ok field: true means success, false means error - Extract text: text field contains all recognized text - If --stdout is used, parse the stdout JSON directly - Handle errors: If ok is false, display error.message

  1. Present results to user:

- Display extracted text in a readable format - If the text is empty, the image may contain no text - In save mode, always tell the user the saved file path and that full raw JSON is available there

IMPORTANT: Complete Output Display

CRITICAL: Always display the COMPLETE recognized text to the user. Do NOT truncate or summarize the OCR results.

  • The output JSON contains complete output, including full text in text field
  • You MUST display the entire text content to the user, no matter how long it is
  • Do NOT use phrases like "Here's a summary" or "The text begins with..."
  • Do NOT truncate with "..." unless the text truly exceeds reasonable display limits
  • The user expects to see ALL the recognized text, not a preview or excerpt

Correct approach:

I've extracted the text from the image. Here's the complete content:

[Display the entire text here]

Incorrect approach:

I found some text in the image. Here's a preview:
"The quick brown fox..." (truncated)

Usage Examples

Example 1: URL OCR:

python scripts/ocr_caller.py --file-url "https://example.com/invoice.jpg" --pretty

Example 2: Local File OCR:

python scripts/ocr_caller.py --file-path "./document.pdf" --pretty

Example 3: OCR With Explicit File Type:

python scripts/ocr_caller.py --file-url "https://example.com/input" --file-type 1 --pretty

Example 4: Print JSON Without Saving:

python scripts/ocr_caller.py --file-url "https://example.com/input" --stdout --pretty

Understanding the Output

The output JSON structure is as follows:

{
  "ok": true,
  "text": "All recognized text here...",
  "result": { ... },
  "error": null
}

Key fields:

  • ok: true for success, false for error
  • text: Complete recognized text
  • result: Raw API response (for debugging)
  • error: Error details if ok is false
Raw result location (default): the temp-file path printed by the script on stderr

First-Time Configuration

You can generally assume that the required environment variables have already been configured. Only when an OCR task fails should you analyze the error message to determine whether it is caused by a configuration issue. If it is indeed a configuration problem, you should notify the user to fix it.

When API is not configured:

The error will show:

CONFIG_ERROR: PADDLEOCR_OCR_API_URL not configured. Get your API at: https://paddleocr.com

Configuration workflow:

  1. Show the exact error message to the user (including the URL).
  2. Guide the user to configure securely:

- Recommend configuring through the host application's standard method (e.g., settings file, environment variable UI) rather than pasting credentials in chat. - List the required environment variables: - PADDLEOCR_OCR_API_URL - PADDLEOCR_ACCESS_TOKEN - Optional: PADDLEOCR_OCR_TIMEOUT

  1. If the user provides credentials in chat anyway (accept any reasonable format), for example: Then parse and validate the values:

- PADDLEOCR_OCR_API_URL=https://xxx.paddleocr.com/ocr, PADDLEOCR_ACCESS_TOKEN=abc123... - Here's my API: https://xxx and token: abc123 - Copy-pasted code format - Any other reasonable format - Security note: Warn the user that credentials shared in chat may be stored in conversation history. Recommend setting them through the host application's configuration instead when possible. - Extract PADDLEOCR_OCR_API_URL (look for URLs with paddleocr.com or similar) - Confirm PADDLEOCR_OCR_API_URL is a full endpoint ending with /ocr - Extract PADDLEOCR_ACCESS_TOKEN (long alphanumeric string, usually 40+ chars)

  1. Ask the user to confirm the environment is configured.
  2. Retry only after confirmation:

- Once the user confirms the environment variables are available, retry the original OCR task

Error Handling

Authentication failed:

API_ERROR: Authentication failed (403). Check your token.
  • Token is invalid, reconfigure with correct credentials

Quota exceeded:

API_ERROR: API rate limit exceeded (429)
  • Daily API quota exhausted, inform user to wait or upgrade

No text detected:

  • text field is empty
  • Image may be blank, corrupted, or contain no text

Tips for Better Results

If recognition quality is poor, suggest:

  • Check if the image is clear and contains text
  • Provide a higher resolution image if possible

Reference Documentation

For in-depth understanding of the OCR system, refer to:

  • references/output_schema.md - Output format specification
Note: Model version, capabilities, and supported file formats are determined by your API endpoint (PADDLEOCR_OCR_API_URL) and its official API documentation.

Testing the Skill

To verify the skill is working properly:

python scripts/smoke_test.py

This tests configuration and API connectivity.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.89%
按下载量换算8,643

Claude

29.99%
按下载量换算7,222

Cursor

21.16%
按下载量换算5,096

Gemini CLI

10.32%
按下载量换算2,485

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills