Preface¶
A common requirement in educational products is that users upload photos of exam papers or individual questions, and the system must perform question segmentation, recognize handwritten answers, determine correctness, and ideally provide analysis and knowledge points. If one simply relies on a large language model to “view and grade” images within a conversation, it often lacks stable segmentation coordinates, clear billing metrics, and field structures consistent with cloud-side APIs.
The following introduces the Tencent Cloud Question Marking Agent (@tencent-adm/tencentcloud-ocr-questionmarkagent) available on SkillHub. It encapsulates Tencent Cloud OCR’s SubmitQuestionMarkAgentJob and DescribeQuestionMarkAgentJob into a SKILL description and script entry point readable by Agents. This allows tools like Cursor and Claude Code to call the official interfaces using an asynchronous task flow when API keys are available, rather than manually piecing together HTTP details.
What is this¶
The Tencent Cloud Question Marking Agent is an enterprise Skill published by the Tencent Cloud OCR Team. It is categorized as ai-agent, currently at version 1.0.3, with the SkillHub coordinate @tencent-adm/tencentcloud-ocr-questionmarkagent. The page marks it as requires_api_key=true, meaning Tencent Cloud API keys must be configured before invocation.
Skill Positioning: It is used when automatic grading, handwritten answer recognition, and knowledge point analysis are required for K12 exam papers or questions within images. It supports grading both full-paper images and single-question images, providing structured results such as question segmentation, correctness determination, answer comparison, error analysis, and knowledge point output. The interface operates in an asynchronous mode—first submit a task to obtain a JobId, then poll the query until the JobStatus is DONE or FAIL.
Official Skill Entry: https://api.skillhub.cn/tencent-adm/tencentcloud-ocr-questionmarkagent
SkillHub Display Page: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-ocr-questionmarkagent
Core Features¶
The following capabilities are derived from the skill description and Tencent Cloud API documentation. Parameters can be combined as needed.
- Asynchronous Dual Interface:
SubmitQuestionMarkAgentJobsubmits the task →DescribeQuestionMarkAgentJobpolls for results. - Full-Paper Grading: Automatically segments and grades questions one by one, returning grading information for each question. The submission response includes segmentation bounding boxes and other information (the segmentation list may be empty in single-question mode).
- Single-Question Grading: Use
BoolSingleQuestionto skip segmentation and directly grade a single question. A reference answer (ReferenceAnswer, valid only in single-question scenarios) can be passed in. - Configurable Output:
QuestionConfigMapallows enabling knowledge points (KnowledgePoints), correct answers (TrueAnswer), handwritten answer coordinates (ReturnAnswerPosition), etc. - Deep Thinking:
EnableDeepThinkcan be optionally enabled for deeper reasoning (resulting in slower speeds). - Input Formats: The skill description supports PNG, JPG, JPEG, BMP, GIF, WEBP, HEIC, TIFF, HEIF, and PDF. Images can be passed via
ImageUrlorImageBase64(at least one is required; if both are provided,ImageUrltakes precedence).
The interface domain and Action are subject to the official documentation: see https://cloud.tencent.com/document/api/866/128273 for task submission and https://cloud.tencent.com/document/api/866/128274 for task querying. Tencent Cloud documentation states a default request concurrency limit of 10 images/minute. The skill description also mentions concurrency and billing constraints (Submit is billable, Describe is not). It is recommended to verify activation status and packages in the console before going live.
Installation and Activation¶
The SkillHub page requires installation of this skill following https://skillhub.cn/install/skillhub.md. The typical process is as follows.
1. Install SkillHub CLI (if not already installed)
command -v skillhub && skillhub --version
If not installed, run the full installation script (the documentation recommends CLI + Default Skills):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
2. Install this skill to the current Agent’s skills directory
During installation, you must use --dir to point to the skills path recognized by your current client; otherwise, it defaults to ./skills/ and may not be loaded. Common path examples given in the documentation:
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
Installation command:
skillhub install @tencent-adm/tencentcloud-ocr-questionmarkagent --dir ~/.cursor/skills/
Replace ~/.cursor/skills/ with the directory you are actually using. After installation, restart or refresh the skill list as required by the client.
3. Configure Tencent Cloud Keys and Python Dependencies
The skill’s SKILL.md requires:
- Python 3.6+
pip install tencentcloud-sdk-python- Environment variables
TENCENTCLOUD_SECRET_ID,TENCENTCLOUD_SECRET_KEY
Typical Usage¶
The skill package includes scripts/main.py, which handles task submission and polling. It is suitable for local trial runs or integration into pipelines under Agent guidance.
Full-Paper Grading (URL, output knowledge points and correct answers)
python scripts/main.py --image-url "https://example.com/exam_paper.jpg" \
--question-config '{"KnowledgePoints":true,"TrueAnswer":true}'
Single-Question Grading with Reference Answer
python scripts/main.py --image-url "https://example.com/single_question.jpg" \
--single-question --reference-answer "x=2"
Enable Deep Thinking, or Output Raw JSON
python scripts/main.py --image-url "https://example.com/exam.jpg" --enable-deep-think
python scripts/main.py --image-url "https://example.com/exam.jpg" --raw
In Agent conversations, when a user describes intents such as “grade this exam paper,” “recognize handwritten answers and judge correctness,” or “output knowledge points,” the model should load this Skill and select fields like ImageUrl/ImageBase64, BoolSingleQuestion, and QuestionConfigMap based on the parameter table above. The query interface allows an optional UserAgent; the skill description suggests fixing it to Skills for source tracking.
Formatted successful results will include the task ID, task status, number of segmented questions, and grading results organized by question number. In case of failure, troubleshoot by combining JobStatus, ErrorCode, ErrorMessage, and error codes in the documentation (e.g., service not activated FailedOperation.UnOpenError, arrears, etc.).
Scenarios and Notes¶
Who is it for
- Developers building K12 homework grading, mistake notebooks, or teaching research assistants who want Agents to automatically use the official Tencent Cloud OCR Agent interface.
- Teams needing to obtain correctness, analysis, knowledge points, and handwritten area coordinates in structured JSON rather than pure natural language comments.
Usage Notes
- You must first activate the relevant Tencent Cloud Question Marking Agent service and ensure the account billing is normal; otherwise, errors regarding not being activated or arrears may be returned.
- Image resolution should ideally be no lower than 600×800, and the Base64 encoded size should not exceed 10M. The download time for
ImageUrlshould not exceed approximately 3 seconds; the documentation recommends prioritizing Tencent Cloud COS addresses. - When recognizing PDFs by page,
PdfPageNumbermust be specified. The skill description covers single-page recognition scenarios. MarkInfomay involve multi-level nested sub-questions; do not assume only one layer when parsing results.- On SkillHub, this skill is tagged as requiring an API Key. Do not write keys into the repository; inject them only via environment variables or key management services.
SkillHub Statistics (at time of crawl): Rating 100000, Downloads 4124, Installs 235. Specific data is subject to the real-time display on the SkillHub page.
Conclusion¶
If your Agent workflow frequently involves the chain of “Upload Exam Paper → Segment and Grade → Return Structured Data,” you can treat the Tencent Cloud Question Marking Agent as a fixed skill for interfacing with Tencent Cloud OCR: install it to the local skills directory, configure TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY, and call it following the Submit/Describe asynchronous mode.
Official Address: https://api.skillhub.cn/tencent-adm/tencentcloud-ocr-questionmarkagent