This skill allows you to "read" images and convert their content into editable Markdown text. This is especially useful when extracting data tables, slide content, or document screenshots, particularly when external OCR libraries are unavailable.
Usage Guide
-
Identify the target image:
- Locate the image file you need to process.
- If needed, use
list_dirto browse the directory.
-
View the image:
- Use the
view_filetool to "see" the image content. The system allows you to directly process image data. - Key: You must use
view_fileon the image path so that your visual model can digest it.
- Use the
-
Transcribe the content:
- Based on what you see, transcribe the text into Markdown.
- Tables: Convert visually seen tables into standard Markdown tables (
| 表头 | ... |)。 - Headings: Use
#,##etc. to mark headings in the image, preserving the hierarchy. - Text: Transcribe paragraphs as plain text.
- Numbers: Carefully verify all numbers, especially data in financial reports.
-
Save the output:
- Use
write_to_fileto write the transcribed content into a.mdfile (for exampleocr_results.md)。 - If processing multiple images, consider appending them to the same file, or organize them logically.
- Use
Best Practice Tips
- Tables: Carefully align rows and columns. Standard Markdown tables do not support cell merging (rowspan/colspan). You need to expand merged cells according to the logical flow, or leave them blank.
- Complex layouts: If the image layout is complex (for example, left and right columns), serialize it in logical reading order (top to bottom, left to right).
- Charts/Graphics: If the image contains charts, describe the trends, or extract the visible data points as a list or table.
- No code execution required: Do not attempt to write or use Python libraries (such as
pytesseract,easyocr,PIL) for text extraction. Please directly use your own visual capabilities.
Example Scenario
Request: "Convert these 3 screenshots of financial reports to markdown."
Execution:
list_dirView file:img1.png,img2.png,img3.png。view_fileReadimg1.png。- (internal processing): Recognize the header "Q1 Revenue" and the table row data.
view_fileReadimg2.pngandimg3.png。write_to_fileCreatefinancial_report.mdand write the summarized content.