paddleocr-text-recognition

aidenwu0209/paddleocr-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/aidenwu0209/paddleocr-skills --skill paddleocr-text-recognition
0 commentsdiscussion
summary

Extract text from images, PDFs, and documents via PaddleOCR API with structured JSON output.

  • Supports URLs and local file paths for images and PDFs; returns complete recognized text in JSON format
  • Mandatory API-only approach: executes python scripts/ocr_caller.py with --file-url or --file-path parameters
  • Requires initial configuration with PADDLEOCR_OCR_API_URL and PADDLEOCR_ACCESS_TOKEN ; displays full extracted text without truncation or summarization
  • Handles authentication, rat
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:

    • 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

    Input type note:

    • Supported file types depend on the model and endpoint configuration.
    • Follow the official endpoint/API documentation for the exact supported formats.
  2. 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
  3. 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
  4. 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
      
  3. If the user provides credentials in chat anyway (accept any reasonable format), for example:

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

    Then parse and validate the values:

    • 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)
  4. Ask the user to confirm the environment is configured.

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

how to use paddleocr-text-recognition

How to use paddleocr-text-recognition on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add paddleocr-text-recognition
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches paddleocr-text-recognition from GitHub repository aidenwu0209/paddleocr-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/paddleocr-text-recognition

Reload or restart Cursor to activate paddleocr-text-recognition. Access the skill through slash commands (e.g., /paddleocr-text-recognition) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.552 reviews
  • Pratham Ware· Dec 16, 2024

    paddleocr-text-recognition fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Sophia Liu· Dec 16, 2024

    We added paddleocr-text-recognition from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Omar Sanchez· Dec 4, 2024

    paddleocr-text-recognition reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Kwame Ndlovu· Nov 23, 2024

    I recommend paddleocr-text-recognition for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sakshi Patil· Nov 7, 2024

    paddleocr-text-recognition is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Soo Kim· Nov 7, 2024

    Keeps context tight: paddleocr-text-recognition is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Sakura Martin· Nov 7, 2024

    Solid pick for teams standardizing on skills: paddleocr-text-recognition is focused, and the summary matches what you get after install.

  • Chaitanya Patil· Oct 26, 2024

    Keeps context tight: paddleocr-text-recognition is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Noah Mensah· Oct 26, 2024

    paddleocr-text-recognition is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Omar Ramirez· Oct 26, 2024

    paddleocr-text-recognition has been reliable in day-to-day use. Documentation quality is above average for community skills.

showing 1-10 of 52

1 / 6