← 返回 Skills 市场
cinience

Aliyun Docmind Extract

作者 cinience · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
101
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aliyun-docmind-extract
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aliyun-docmind-extract 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug aliyun-docmind-extract
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 101 次。

如何安装 Aliyun Docmind Extract?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aliyun-docmind-extract」即可一键安装,无需额外配置。

Aliyun Docmind Extract 是免费的吗?

是的,Aliyun Docmind Extract 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Aliyun Docmind Extract 支持哪些平台?

Aliyun Docmind Extract 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Aliyun Docmind Extract?

由 cinience(@cinience)开发并维护,当前版本 v1.0.0。

💬 留言讨论