Skip to content
Agentmart
Submit a tool

modao-downloader

下载墨刀 AI 生成的产物(HTML/React/Vue/PRD/图片)到本地。触发词:下载墨刀、下载原型、下载产物、保存原型、导出原型。

Skill by xgl1103

IndexedMIT
Write a review

Chalk Labs

Need help deploying modao-downloader?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/xgl1103-modao-downloader

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

下载墨刀 AI 生成的产物(HTML/React/Vue/PRD/图片)到本地。触发词:下载墨刀、下载原型、下载产物、保存原型、导出原型。

Use cases: frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/modao-downloader

What's inside

Skill name
modao-downloader
Description
下载墨刀 AI 生成的产物(HTML/React/Vue/PRD/图片)到本地。触发词:下载墨刀、下载原型、下载产物、保存原型、导出原型。
License
MIT
Instructions
191 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# 墨刀产物下载器

从墨刀 AI 下载已生成的产物(HTML/React/Vue/PRD/图片)到本地文件。

## 前置条件

- 墨刀 MCP 已配置并连接(`mcp.servers.modao` 存在且 enabled)
- 若工具列表中无 `modao__*` 工具,提示用户检查 MCP 配置

## 步骤

### 1. 确认下载目标

从用户输入中提取:

- **任务标识**:任务名称、关键词、或 task_id
- **产物类型**:HTML/React/Vue/PRD/图片(可选,用于筛选)

若用户未指定具体任务,询问:
- 「下载哪个任务?可以说任务名称或关键词」
- 或「下载最近的任务」

### 2. 查找任务

调用 `modao__list_recent_tasks`:

```
modao__list_recent_tasks(
  keyword=<用户提供的关键词>,  // 可选
  limit=10,
  client="openclaw"
)
```

**结果处理:**
- 若找到多个任务,列出任务名称和更新时间,让用户选择
- 若只找到一个,直接使用
- 若未找到,告知用户「未找到匹配的任务」

记录选中的 `task_id` 和 `name`(任务名称,用于后续文件命名)。

### 3. 获取产物内容

调用 `modao__get_task_result`:

```
modao__get_task_result(
  task_id=<上一步的task_id>,
  client="openclaw"
)
```

**结果处理:**
- 检查 `status`:必须是 `completed`
- 提取 `artifact_content`:产物的完整内容(HTML/代码/文本)
- 提取 `artifact_type`:产物类型(html/react/vue/prd/image)
- 任务名称:从步骤 2 的 `list_recent_tasks` 结果中获取(`name` 字段)
- 若步骤 2 未记录名称,使用 `unknown` 作为默认值

**若 status 不是 completed:**
- `running`:告知用户「任务正在生成中,请稍后再试」
- `failed`:告知用户「任务生成失败」
- `paused`:询问用户是否要继续任务

### 4. 内容完整性检测

**截断检测规则:**

| 产物类型 | 检测方式 |
|----------|----------|
| HTML | 检查是否以 `</html>` 结尾,或包含 `<html` 和 `</html>` 配对 |
| React/Vue | 检查是否有完整的 export 语句或组件闭合 |
| PRD | 检查是否有完整的章节结构 |
| 图片 | 检查是否为有效 URL 或 base64 格式 |

**若检测到截断:**
1. 告知用户「产物内容可能不完整(检测到截断)」
2. 仍然保存已有内容
3. 建议用户通过墨刀网页端下载完整版本

### 5. 写入本地文件

**sessionKey 获取:**
- 从当前会话上下文获取 sessionKey
- 格式如 `agent:u445:dashboard:49741c66-50a3-4df2-b83a-3e26197acc61`
- 最后一段是 UUID,如 `49741c66-50a3-4df2-b83a-3e26197acc61`

**文件命名规则:**
```
{任务名称}_{YYYYMMDD_HHmmss}.{扩展名}
```

**扩展名映射规则:**

| artifact_type | 扩展名 | 判断条件 |
|---------------|--------|----------|
| html | `.html` | 固定 |
| react | `.tsx` | 内容包含 `import React` 或 `from 'react'` 或 TypeScript 语法 |
| react | `.jsx` | 其他 React 代码 |
| vue | `.vue` | 固定 |
| prd | `.md` | 固定 |
| image | `.png` | URL 以 `.png` 结尾或 content-type 为 image/png |
| image | `.jpg` | URL 以 `.jpg`/`.jpeg` 结尾 |
| image | `.webp` | URL 以 `.webp` 结尾 |
| image | `.png` | 默认(无法判断时) |

**图片产物特殊处理:**
- 若 `artifact_content` 是 URL(以 `http://` 或 `https://` 开头),使用 `web_fetch` 或 `curl` 下载二进制内容
- 若 `artifact_content` 是 base64(以 `data:image/` 开头),解码后写入
- 若 `artifact_content` 是其他格式,原样保存为 `.txt`

**文件存放位置:**
```
media/local-file/{sessionKey最后一段}/{文件名}
```

**写入逻辑:**
```python
# 伪代码

From xgl1103/ai-product-manager-employee, MIT.

More from xgl1103/ai-product-manager-employee

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 21, 2026 (10 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from xgl1103

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get modao-downloader running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying modao-downloader?

CallGet help
Cite this page

modao-downloader skill. Agent Mart. https://agentmart.dev/skills/xgl1103-modao-downloader (last updated 2026-10-24)