← Back to Skills Marketplace
cinience

Aliyun Docmind Extract

by cinience · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
101
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install aliyun-docmind-extract
Description
Use when working with Document Mind (DocMind) via Node.js SDK to submit document parsing jobs and poll results. Designed for Claude Code/Codex document under...
README (SKILL.md)

Category: provider

Document Mind (DocMind) — Node.js SDK

Use DocMind to extract document structure, text, and layout with async jobs.

Prerequisites

  • Install SDKs:
    • npm install @alicloud/docmind-api20220711 @alicloud/tea-util @alicloud/credentials
  • Provide credentials via standard Alibaba Cloud env vars:
    • ALICLOUD_ACCESS_KEY_ID
    • ALICLOUD_ACCESS_KEY_SECRET
    • ALICLOUD_REGION_ID (optional default; if unset, choose the most reasonable region for the task or ask the user)

Quickstart (submit + poll)

const Client = require('@alicloud/docmind-api20220711');
const Credential = require('@alicloud/credentials');
const Util = require('@alicloud/tea-util');

const cred = new Credential.default();
const regionId = process.env.ALICLOUD_REGION_ID || 'cn-hangzhou'; // Example default; choose/ask if unset.
const client = new Client.default({
  endpoint: `docmind-api.${regionId}.aliyuncs.com`,
  accessKeyId: cred.credential.accessKeyId,
  accessKeySecret: cred.credential.accessKeySecret,
  type: 'access_key',
  regionId,
});

async function submitByUrl(fileUrl, fileName) {
  const req = new Client.SubmitDocStructureJobRequest();
  req.fileUrl = fileUrl;
  req.fileName = fileName;
  const resp = await client.submitDocStructureJob(req);
  return resp.body.data.id;
}

async function pollResult(jobId) {
  const req = new Client.GetDocStructureResultRequest();
  req.id = jobId;
  const resp = await client.getDocStructureResult(req);
  return resp.body;
}

(async () => {
  const jobId = await submitByUrl('https://example.com/example.pdf', 'example.pdf');
  console.log('jobId:', jobId);

  // Poll every 10s until completed.
  for (;;) {
    const result = await pollResult(jobId);
    if (result.completed) {
      console.log(result.status, result.data || result.message);
      break;
    }
    await new Promise((r) => setTimeout(r, 10000));
  }
})();

Script quickstart

DOCMIND_FILE_URL="https://example.com/example.pdf" \\
node skills/ai/text/aliyun-docmind-extract/scripts/quickstart.js

Environment variables:

  • DOCMIND_FILE_URL
  • DOCMIND_FILE_NAME (optional)
  • DOCMIND_POLL_INTERVAL_MS (optional, default 10000)
  • DOCMIND_MAX_POLLS (optional, default 120)

Local file upload

const fs = require('fs');
const advanceReq = new Client.SubmitDocStructureJobAdvanceRequest();
advanceReq.fileUrlObject = fs.createReadStream('./example.pdf');
advanceReq.fileName = 'example.pdf';
const runtime = new Util.RuntimeOptions({});
const resp = await client.submitDocStructureJobAdvance(advanceReq, runtime);

Notes for Claude Code/Codex

  • DocMind is async: submit a job, then poll until completed=true.
  • Poll every ~10s; max processing window is 120 minutes.
  • Keep files publicly accessible when using URL submission.

Error handling

  • UrlNotLegal: URL not publicly accessible or malformed.
  • DocProcessing: job still running; keep polling.
  • Fail: check message and error code for root cause.

Validation

mkdir -p output/aliyun-docmind-extract
for f in skills/ai/text/aliyun-docmind-extract/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-docmind-extract/validate.txt

Pass criteria: command exits 0 and output/aliyun-docmind-extract/validate.txt is generated.

Output And Evidence

  • Save artifacts, command outputs, and API response summaries under output/aliyun-docmind-extract/.
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.

Workflow

  1. Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
  2. Run one minimal read-only query first to verify connectivity and permissions.
  3. Execute the target operation with explicit parameters and bounded scope.
  4. Verify results and save output/evidence files.

References

  • DocMind Node.js SDK: @alicloud/docmind-api20220711

  • Source list: references/sources.md

Usage Guidance
Before installing: (1) Recognize this is a DocMind Node.js client and it requires your Alibaba Cloud access key and secret — only provide keys with the minimum permissions needed and avoid using long-lived high-privilege keys. (2) The skill metadata fails to declare these env vars; treat that as a red flag and prefer skills that list the credentials they need. (3) The SKILL.md validation step references Python files that do not exist and the quickstart.js hardcodes the cn-hangzhou endpoint while the docs show a region-based endpoint — verify endpoint/region handling matches your needs. (4) URL-based submission requires publicly accessible files; do not upload sensitive documents publicly. (5) If you proceed, run the script in an isolated environment (or with temporary, scoped credentials), inspect quickstart.js locally, and rotate or revoke credentials after use. Finally, ask the publisher for a homepage/source repo and corrected metadata (declared env vars + correct validation) before trusting this skill in production.
Capability Analysis
Type: OpenClaw Skill Name: aliyun-docmind-extract Version: 1.0.0 The skill bundle provides a legitimate interface for Alibaba Cloud's Document Mind (DocMind) service using official SDKs. The code in `scripts/quickstart.js` and instructions in `SKILL.md` correctly implement document parsing workflows (submission and polling) using standard environment variables for credentials. No indicators of data exfiltration, malicious execution, or prompt injection were found.
Capability Assessment
Purpose & Capability
Name/description match the included code: both show a Node.js DocMind client that submits jobs and polls results. However, the registry metadata declares no required environment variables or primary credential even though the SKILL.md and quickstart.js require Alibaba Cloud access keys and region — an important mismatch.
Instruction Scope
SKILL.md instructs using ALICLOUD_ACCESS_KEY_ID and ALICLOUD_ACCESS_KEY_SECRET, submitting public file URLs (privacy risk), polling, and saving outputs. The validation step incorrectly attempts to py_compile *.py files in scripts/ even though the repo contains only a JavaScript quickstart, which is inconsistent and may cause false validation behavior. Instructions also recommend making files publicly accessible (expected for URL submission but exposes data).
Install Mechanism
No install spec is provided (instruction-only). The SKILL.md asks the user to npm install official @alicloud packages — this is expected and proportionate. No downloads from untrusted URLs or extract operations are present.
Credentials
The skill legitimately needs Alibaba Cloud credentials (access key ID/secret and optional region) and runtime DOCMIND_* env vars, but the package metadata does not declare these required envs or a primary credential. That mismatch is a transparency issue: the skill will require secrets at runtime despite listing none in metadata.
Persistence & Privilege
The skill does not request permanent/always presence, does not modify other skills, and does not include install-time persistence. Autonomous invocation is allowed (platform default) but not combined with other high privileges here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install aliyun-docmind-extract
  3. After installation, invoke the skill by name or use /aliyun-docmind-extract
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of aliyun-docmind-extract for Aliyun Document Mind (DocMind) via Node.js SDK. - Provides async job submission and polling for document parsing (structure, text, layout) using DocMind. - Includes usage examples for both URL-based and local file uploads. - Guides users in setting up credentials and environment variables. - Documents error handling, polling intervals, and output validation workflow. - Designed for integration with Claude Code/Codex document understanding pipelines.
Metadata
Slug aliyun-docmind-extract
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Aliyun Docmind Extract?

Use when working with Document Mind (DocMind) via Node.js SDK to submit document parsing jobs and poll results. Designed for Claude Code/Codex document under... It is an AI Agent Skill for Claude Code / OpenClaw, with 101 downloads so far.

How do I install Aliyun Docmind Extract?

Run "/install aliyun-docmind-extract" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Aliyun Docmind Extract free?

Yes, Aliyun Docmind Extract is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Aliyun Docmind Extract support?

Aliyun Docmind Extract is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Aliyun Docmind Extract?

It is built and maintained by cinience (@cinience); the current version is v1.0.0.

💬 Comments