360 Secure SkillHub
360 安全技能中心

Anygen Task Download

该 Skill 封装 anygen CLI 的 task +download 子命令,按 task-id 从已完成的 AnyGen 任务下载产出文件,支持指定输出目录、按名称选择文件或下载缩略图,smart_draw 图表会自动渲染为 PNG;命令会写入本地磁盘并返回含文件路径的 JSON,要求任务处于 completed 状态。

supertilico2001
supertilico2001
热度 31.09
最近更新 2026-05-11 17:47:01
分类:自动化依赖:第三方 API / 读写文件应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add anygen-task-download
Metadata
name
anygen-task-download
version
1.0.0
description
AnyGen: Download artifacts from a completed task.
metadata
{"requires":{"bins":["anygen"],"env":["ANYGEN_API_KEY"]},"install":[{"id":"node","kind":"node","package":"@anygen/cli","bins":["anygen"]}],"cliHelp":"anygen task +download --help"}

task +download

PREREQUISITE: Read ../anygen-shared/SKILL.md for auth, global flags, and security rules.

Download artifacts from a completed task.

Usage

anygen task +download --task-id <id> --output-dir <dir>

Flags

Flag Required Description
--task-id ✓ Task ID
--output-dir — Local directory to save files (default: current directory)
--file <name...> — Download specific file(s) by name (repeatable)
--thumbnail — Download thumbnail image instead of main files

Examples

# Download all output files
anygen task +download --task-id xxx

# Download specific file(s) by name
anygen task +download --task-id xxx --file report.pptx
anygen task +download --task-id xxx --file report.pptx --file data.xlsx

# Download thumbnail (for preview)
anygen task +download --task-id xxx --thumbnail

# Specify output directory
anygen task +download --task-id xxx --output-dir ./output

Output

Returns JSON with downloaded file paths:

{
  "status": "completed",
  "task_id": "xxx",
  "files": [
    { "file": "./report.pptx", "name": "report.pptx" },
    { "file": "./data.xlsx", "name": "data.xlsx" }
  ],
  "task_url": "https://..."
}

Tips

  • The task must be in completed state. Use task get --wait first if needed.
  • Without --file, all output files are downloaded.
  • Use --thumbnail first to show a preview, then download the main files when user requests it.
  • For smart_draw tasks, diagram files are automatically rendered to PNG.
  • File names for --file come from the output.files[].name field in the task get response.

[!CAUTION] This is a write command (writes files to disk) — confirm the output directory with the user.

See Also