Task Objective
- This Skill is used to: batch process markdown documents containing recruitment information, automatically recognize image content (including local images and online image links), extract key information, filter according to conditions, and generate a structured report
- Capabilities include: file path recognition and scanning, adaptive batch processing, image link recognition, image downloading, image recognition and OCR, text understanding, information extraction, condition matching, progress tracking, integrity verification, report generation
- Trigger conditions: the user provides recruitment markdown documents (a single file or a folder) and filtering conditions
Prerequisites
- Dependency note: the image download function depends on the requests library, version >= 2.28.0
Operation Steps
Standard Process
Phase 1: File Scanning and Planning
-
Input Path Recognition
- Determine whether the path provided by the user is:
- Single file: directly add to the processing list
- Folder: scan all markdown files in the folder
- Record file types and paths
- Determine whether the path provided by the user is:
-
File Scanning (for Folders)
- If it is a folder, scan all markdown files in that directory
- Supported file extensions:
.md,.markdown - Recursively scan subdirectories (optional, decided according to user needs)
- Record the full paths of all files
- All files must be scanned, none may be omitted
-
Quantity Assessment and Batching Decision
- Count the total number of documents to be processed
- Adaptive Batching Rules:
- Number of documents <= 10: process all documents at once
- Number of documents > 10: process in batches, with 10 documents per batch
- Calculate how many batches are needed
- Record the batch plan: total batches, file list for each batch
-
Progress Tracking Initialization
- Record the following information:
- Total number of files
- Number processed (initially 0)
- Number pending (initially the total number of files)
- Current batch (initially 0)
- Number successfully processed (initially 0)
- Number failed to process (initially 0)
- Record the following information:
Phase 2: Batch Process Documents
-
Batch Loop Processing For each batch (executed in order):
5.1 Batch Initialization
- Current batch number += 1
- Determine the file list to be processed in this batch (take 10 files in numerical order or the remaining files)
- Report this batch's progress: "Processing batch X of Y, with Z files"
5.2 Process Documents One by One For each recruitment document in this batch,must be fully processed, and must not be skipped:
5.2.1 Image Link Recognition and Extraction
- Scan all image references in the document and recognize two formats:
- Local images:
 - Online images:

- Local images:
- Extract the URL or path of all images
- Record the position and context of images in the document
5.2.2 Online Image Download For each online image link:
- Call
python /workspace/projects/recruitment-processor/scripts/download_image.py --image-url <URL> --output-dir ./downloaded_images - Capture the download result and obtain the local save path
- If the download fails, record the error but continue processing other images
- Record the image source (online download/local file)
5.2.3 Image Recognition and Content Extraction
- For all accessible images (successfully downloaded online images and local images)
- Use image recognition capabilities to extract the text information from each image
- All images must be recognized one by one, without omitting any
- Record the correspondence between image content and context
- Label the information source of each image
5.2.4 Text Understanding and Integration
- Read the document text content
- Integrate and understand the text information recognized from images with the text content
- Ensure that both text and image information are fully utilized
- Form a complete understanding of the recruitment document
5.2.5 Key Information Extraction Extract the following information (if a certain piece of information is not explicitly mentioned in the document, mark it as "not mentioned"):
- Job Title
- Company Name
- Salary and Benefits (explicit range or specific value)
- Deadline
- Publication Time
- Enterprise Nature (state-owned enterprise/private enterprise/foreign enterprise/public institution, etc.)
- Work Location
- Educational Requirements
- Work Experience Requirements
- Job Responsibilities
- Job Requirements
- Statistics on the number and sources of images
5.2.6 Error Handling
-
If a file fails to be processed:
- Record the reason for failure
- Failed processing count += 1
- Do not affect the processing of other files; continue processing the remaining files in the batch
-
If the file is processed successfully:
- Successful processing count += 1
- Temporarily store the extracted information
5.3 Batch Progress Update
- Processed count += number of files in this batch
- Pending count = total number of files - processed count
- Report batch progress: "Batch X completed, A files processed, B files pending"
Phase 3: Conditional Filtering and Summary
-
Conditional Filtering
- Read the filtering conditions provided by the user (refer to the filtering condition template format)
- Perform condition matching on all successfully extracted recruitment information
- Strictly determine whether all filtering conditions are met
- Keep all information that meets the conditions and remove those that do not
- Every document must undergo filtering judgment and must not be skipped
-
Integrity Verification
- Verify the processing results:
- Processed count + pending count = total number of files
- Every file has a processing result (success or failure)
- If omissions are found:
- Immediately supplement and process the omitted files
- Update progress tracking information
- Must ensure all files have been reviewed, with no omissions allowed
- Verify the processing results:
-
Generate summary document Generate a structured summary report for all filtered recruitment information, including:
8.1 Report Overview
- Total number of documents processed
- Batch processing status: total number of batches, number of files per batch
- Number of successfully processed documents
- Number of failed documents and list of failure reasons
- Total number of extracted images (online images/local images)
- Number meeting the filtering criteria
- Processing time
8.2 Recruitment Information List For each recruitment information item that meets the criteria, present it in the following format:
## [职位名称] - [公司名称] **基本信息** - 薪资待遇:[具体数值或范围] - 企业性质:[国企/民企/外企等] - 工作地点:[城市/地区] **时间信息** - 截止时间:[具体日期] - 发布时间:[具体日期] **要求信息** - 学历要求:[学历层次] - 工作经验:[年限要求] **岗位详情** - 岗位职责:[摘要] - 任职要求:[摘要] **图片信息** - 图片总数:[数量]张(在线图片X张,本地图片Y张) - 图片来源标注:[哪些关键信息来源于图片] ---8.3 Failed File List
- List all files that failed processing
- Explain the failure reason for each file
- Provide possible solutions
8.4 Processing Progress Report
- Batch processing timeline
- List of files processed in each batch
- Progress tracking information
8.5 Notes
- Indicate whether information comes from images or text
- Indicate missing key information
- Explain the status of image download and recognition
-
Output Results
- Output the summary document in markdown format
- File name format: Recruitment Information Summary_YYYYMMDD_HHMMSS.md
Resource Index
- Required script: see scripts/download_image.py(Purpose: download online images from URL, parameters: --image-url --output-dir <directory>)
- Filtering criteria template: see references/筛选条件模板.md(Purpose: define the standard format for filtering criteria)
- Information extraction guide: see references/信息提取指南.md(Purpose: guide how to accurately extract key information)
Notes
Completeness requirements (highest priority)
- Must completely read all provided documents; skipping any document is strictly prohibited
- Must identify all images in the documents one by one, without missing any
- Must process all image links, including local images and online images
- Must ensure all files have been reviewed, with no omissions allowed
- After processing is completed, completeness verification must be performed
Adaptive batch processing
- Automatically select the processing strategy based on the number of documents:
- Few documents (≤10): process at once
- Many documents (>10): process in batches, 10 per batch
- During batch processing, execute strictly in order and do not skip any batch
- Report progress after each batch is processed
- If a batch fails, it does not affect the processing of subsequent batches
- After all batches are completed, perform filtering and aggregation uniformly
Progress tracking
- Track processing progress in real time
- Record the processing status of each file
- Update progress information after each batch is completed
- Facilitate monitoring of overall processing status and troubleshooting
Error handling
- Failure to process a single file does not affect other files
- Record all failed files and the reasons for failure
- List failed files separately in the summary document
- Provide the error reasons and possible solutions
Image link processing
- Identify image syntax in markdown:
- Distinguish between local image paths and online URLs
- Online images must be downloaded locally before recognition
- Images that fail to download should have the error recorded but should not affect overall processing
Image recognition accuracy
- Carefully verify the consistency between the text extracted from images and the context, and perform recognition multiple times if necessary to ensure accuracy
Strictness of condition filtering
- Every condition proposed by the user must be strictly satisfied; if any part does not meet the conditions, it is considered non-compliant
Handling of missing information
- For information not explicitly mentioned in the document, it must be marked as "not mentioned"; do not make subjective inferences
Unified time format
- All time information should be unified in the YYYY-MM-DD format
Salary format specification
- Salary information should include the numerical range and unit (e.g., 15-25K/month, annual salary 300,000-400,000)
Usage examples
Example 1: Processing a single file
- Function description: The user provides a single markdown file
- Execution method: One-time processing
- Key points:
- Directly read the file content
- Fully process all images
- Extract key information
- Perform condition filtering
- Filtering conditions:
薪资范围:15-25K/月 企业性质:国企
Example 2: Processing a small number of files (≤10)
- Function description: The user provides a folder containing 5 markdown files
- Execution method: One-time processing
- Key points:
- Scan all markdown files in the folder
- Number of documents ≤10, process in one go
- Process each file one by one
- Perform filtering and summarization uniformly
- Filtering conditions:
工作地点:北京 学历要求:本科及以上
Example 3: Processing a large number of files (>10) - batch processing
- Function description: The user provides a folder containing 25 markdown files
- Execution method: Batch processing (3 batches: 10+10+5)
- Key points:
- Scan the folder and identify 25 files
- Number of documents >10, automatically batch
- Batch 1: Process files 1-10
- Batch 2: Process files 11-20
- Batch 3: Process files 21-25
- Report progress after each batch is processed
- Perform unified filtering after all batches are completed
- Ensure all files have been reviewed
- Filtering conditions:
薪资范围:15-25K/月 企业性质:国企
Example 4: Processing a document containing online images
- Function description: The document contains online image links, which need to be downloaded before recognition
- Execution method: The agent calls a script to download images + agent recognition
- Key points:
- Identify image URLs in markdown
- Call download_image.py to download images
- Recognize the content of the downloaded images
- Record the image source as "online download"
- Filter conditions:
薪资范围:15-25K/月 企业性质:国企
Example 5: Multi-condition combined filtering
- Function description: Filter technical positions in the Beijing area with a bachelor's degree and 1-3 years of experience
- Execution method: Agent processing
- Key points:
- Location information may be in the body text or in images
- Work experience requirements may be expressed vaguely (such as "fresh graduates welcome" or "those with relevant experience preferred"), and need to be judged accurately
- Education requirements may have multiple levels; select the lowest requirement as the filtering basis
- Identify all images one by one to ensure no key information is missed
- Process all files strictly according to the batching logic
- Filter conditions:
工作地点:北京 学历要求:本科及以上 工作经验:1-3年 职位类型:技术岗位
Example 6: Processing documents with mixed image sources
- Function description: The document contains both local images and online image links
- Execution method: Agent calls a script to download online images + Agent recognizes all images
- Key points:
- Distinguish between local images and online images
- Download all online images
- Recognize all images one by one (local + downloaded)
- Indicate the image source in the summary
- Ensure all images are recognized
- Filter conditions:
无特殊条件,仅提取信息
Example of batch processing workflow
Scenario: Processing a folder of 30 files
Phase 1: File scanning and planning
- Scan the folder and find 30 markdown files
- Number of documents > 10, decide to process in batches
- Calculate batches: 30 files, 10 per batch, 3 batches in total
- Initialize progress: total files = 30, processed = 0, pending = 30
Phase 2: Batch processing
Batch 1 processing
- Current batch = 1, process files 1-10
- Scan files 1-10, recognize images, extract information
- Processing result: 10 succeeded, 0 failed
- Update progress: processed = 10, pending = 20
- Report: "Batch 1 completed, 10 files processed, 20 files pending"
Batch 2 processing
- Current batch = 2, process files 11-20
- Scan files 11-20, recognize images, extract information
- Processing result: 9 succeeded, 1 failed (file 15 corrupted)
- Update progress: processed = 20, pending = 10
- Report: "Batch 2 completed, 20 files processed, 10 files pending"
Batch 3 processing
- Current batch = 3, process files 21-30
- Scan files 21-30, recognize images, extract information
- Processing result: 10 succeeded, 0 failed
- Update progress: processed = 30, pending = 0
- Report: "Batch 3 completed, 30 files processed, 0 files pending"
Phase 3: Conditional filtering and summary
- Perform conditional filtering on the 29 successfully processed recruitment information entries
- Completeness verification: processed 30 = total files 30, verification passed
- Generate a summary document, including:
- Processing overview: total 30, 29 succeeded, 1 failed
- List of recruitment information meeting the conditions
- Failed file list (file 15: file corrupted)
- Batch processing progress report
Image download script usage instructions
Invocation method
python /workspace/projects/recruitment-processor/scripts/download_image.py --image-url <图片URL> --output-dir <输出目录>
Parameter description
--image-url: Required, the URL address of the image--output-dir: Optional, the image save directory, defaults to./downloaded_images
Return result
- Success: output
SUCCESS:<本地路径> - Failure: output
ERROR:<错误信息>to the standard error stream
Usage scenario
When the document contains online image links (such ashttps://example.com/image.jpg), first call this script to download the image, then perform image recognition on the downloaded local file.
Example
# 下载图片到默认目录
python /workspace/projects/recruitment-processor/scripts/download_image.py --image-url https://example.com/salary.jpg
# 下载图片到指定目录
python /workspace/projects/recruitment-processor/scripts/download_image.py --image-url https://example.com/salary.jpg --output-dir ./temp_images