From 0f68e665ac7f011daefe4017b6164220847db4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=A6=A8=E5=85=83?= Date: Mon, 11 May 2026 22:00:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(skills):=20=E6=96=B0=E5=A2=9E=20markdown?= =?UTF-8?q?=20=E5=85=A8=E5=B1=80=E5=86=85=E7=BD=AE=E6=8A=80=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builtin-skills.json | 1 + skills/markdown/SKILL.md | 184 +++++++++++++++++++++++++++++++++ skills/markdown/SKILL.zh-CN.md | 109 +++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 skills/markdown/SKILL.md create mode 100644 skills/markdown/SKILL.zh-CN.md diff --git a/builtin-skills.json b/builtin-skills.json index 0234374..b5df2df 100644 --- a/builtin-skills.json +++ b/builtin-skills.json @@ -9,6 +9,7 @@ "mail-operations", "manage-skills", "manage-teams", + "markdown", "minimax-music-gen", "minimax-video-gen", "nodejs-runtime", diff --git a/skills/markdown/SKILL.md b/skills/markdown/SKILL.md new file mode 100644 index 0000000..223ad78 --- /dev/null +++ b/skills/markdown/SKILL.md @@ -0,0 +1,184 @@ +--- +name: markdown +description: >- + Use this skill whenever the user wants to create, write, organize, or draft + Markdown documents (.md files). Triggers include: any mention of + "md", ".md", "markdown", or requests to produce written deliverables such + as reports, summaries, plans, outlines, meeting notes, lists, tables, + contracts, memos, weekly reports, or any text-based document without a + specific format requirement (Word/PDF/Excel/PPT). When the user asks to + "write a report", "organize a table", "draft a plan", "make a list", or + similar — and does not specify a particular file format — default to + Markdown. Do NOT use for binary document formats (.docx, .pdf, .xlsx, + .pptx) — use the corresponding skill instead. + Use when 用户提到 整理、准备、汇总、梳理、归纳、制作、生成、起草、编写、 + 创建、文档、报告、表格、清单、方案、计划、总结、大纲、合同、纪要、周报、 + 月报、邮件、对比分析、会议记录、散文、文章、作文、md、markdown、report、 + summary、plan、outline、memo、table、list、draft、document、notes、 + write、create、organize。 +version: 1.0.0 +type: procedural +risk_level: low +status: enabled +disable-model-invocation: false +tags: + - markdown + - md + - document + - text +metadata: + author: desirecore + updated_at: '2026-05-11' + i18n: + default_locale: en-US + source_locale: zh-CN + locales: + - zh-CN + - en-US + zh-CN: + name: Markdown 文档处理 + short_desc: 创建、编辑 Markdown 文档(.md),默认文本文档格式 + description: >- + 当用户要求创建、撰写、整理任何书面产物且未指定特定格式时,使用此技能。 + 确保使用 Write 工具写入文件、告知绝对路径、并通过 SendUserMessage 发送附件。 + body: ./SKILL.zh-CN.md + source_hash: sha256:0000000000000000 + translated_by: human + en-US: + name: Markdown Document Processing + short_desc: Create and edit Markdown documents (.md), the default text format + description: >- + Use when the user requests any written deliverable without specifying a + particular format. Ensures files are written via Write tool, absolute + path is reported, and attachment is sent via SendUserMessage. + body: ./SKILL.md + source_hash: sha256:0000000000000000 + translated_by: human +market: + icon: >- + MD + category: productivity + maintainer: + name: DesireCore Official + verified: true + channel: latest +--- + +# markdown Skill + +## L0: One-line Summary + +Create Markdown documents (.md) using the Write tool, with proper file output and delivery to the user. + +## L1: Overview and Use Cases + +### Capability + +markdown is a **Procedural Skill** that serves as the default document format when users request written deliverables without specifying Word/PDF/Excel/PPT. Markdown files can be directly opened and edited in DesireCore's built-in SuperDoc editor. + +### Use Cases + +- The user asks to create a report, summary, plan, outline, or any written document +- The user asks to organize information into a table or list +- The user asks to draft a memo, meeting notes, weekly report, etc. +- The user asks to "write something" or "make a document" without specifying format +- The user explicitly mentions "md", "markdown", or ".md" + +## L2: Detailed Specification + +### Output Rule (CRITICAL — violation = task failure) + +After you create a .md file using the Write tool, you **MUST** complete these **two** final steps: + +**Final Step 1:** Output a text reply containing: +- A brief summary of what was created or changed +- The file's full absolute path (copied from the Write tool result) + +Template: +``` +已为你创建「文档标题」,简要说明内容。 + +📄 文件位置:`/full/absolute/path/filename.md` +``` + +**Final Step 2:** Call `SendUserMessage` with the file as attachment. This **MUST** be your very last action. Do NOT output any text after this call. + +``` +SendUserMessage({ + message: "📄 点击下方附件打开文件", + attachments: ["/full/absolute/path/filename.md"] +}) +``` + +#### Correct vs Wrong + +- ✅ Write → text reply (with absolute path) → SendUserMessage (with attachment) → done +- ❌ Write → text reply without absolute path +- ❌ Write → no SendUserMessage +- ❌ Write → SendUserMessage → more text output (e.g. "任务完成") +- ❌ No Write at all, content output directly in chat + +#### Forbidden + +- Outputting the full document content directly in the chat reply instead of writing to a file +- Saying "好的,已完成" / "整理好了" / "以下是内容" without calling Write tool +- Only giving a filename (e.g. "报告.md") without the full absolute path +- Not calling SendUserMessage to deliver the file attachment +- Outputting any text after SendUserMessage +- Writing memory files about the document creation task — creating/editing a document is a one-time task, NOT a user preference or fact to remember + +### Overview + +Markdown (.md) is a lightweight text format. The Write tool accepts the content directly — no compilation, no external dependencies. The file is immediately available for viewing in DesireCore's SuperDoc editor. + +### Creating New Documents + +#### Workflow + +1. Determine content structure (headings, sections, tables) +2. Choose file path: user specified > workspace directory +3. Call Write tool with full absolute path + complete content +4. Output text reply with summary + absolute path +5. Call SendUserMessage with file attachment (last action) + +#### File Naming + +- Use descriptive names: `2026-05-11-项目进度表.md`, `会议纪要-产品评审.md` +- Avoid generic names like `output.md` or `document.md` +- Use the workspace directory as default location + +#### Complete Example + +User: "帮我整理一份项目进度表" + +**Write:** +``` +Write({ + file_path: "/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md", + content: "# 项目进度表\n\n| 模块 | 状态 | 负责人 | 截止日期 |\n|------|------|--------|----------|\n| 认证模块 | 已完成 | 张三 | 2026-05-01 |\n| 支付模块 | 进行中 | 李四 | 2026-05-15 |" +}) +``` + +**Final Step 1** — Text reply: +``` +已为你整理好「项目进度表」,包含各模块的当前状态、负责人和截止日期。 + +📄 文件位置:`/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md` +``` + +**Final Step 2** — SendUserMessage (last action): +``` +SendUserMessage({ + message: "📄 点击下方附件打开文件", + attachments: ["/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md"] +}) +``` diff --git a/skills/markdown/SKILL.zh-CN.md b/skills/markdown/SKILL.zh-CN.md new file mode 100644 index 0000000..7c8a1a2 --- /dev/null +++ b/skills/markdown/SKILL.zh-CN.md @@ -0,0 +1,109 @@ +# markdown Skill + +## L0: 一句话摘要 + +使用 Write 工具创建 Markdown 文档(.md),确保文件正确输出并交付给用户。 + +## L1: 概述与使用场景 + +### 能力 + +markdown 是一个**程序化技能**,作为用户请求书面产物时的默认文档格式(当用户未指定 Word/PDF/Excel/PPT 时)。Markdown 文件可在 DesireCore 内置的 SuperDoc 编辑器中直接打开和编辑。 + +### 使用场景 + +- 用户要求创建报告、总结、方案、大纲或任何书面文档 +- 用户要求整理信息为表格或清单 +- 用户要求起草备忘录、会议纪要、周报等 +- 用户说"写一份"、"整理一下"、"做一个文档"但未指定格式 +- 用户明确提到"md"、"markdown"、".md" + +## L2: 详细规范 + +### Output Rule(关键规则 — 违反 = 任务失败) + +当你使用 Write 工具创建 .md 文件后,**必须**完成以下两个最终步骤: + +**最终步骤 1:** 输出一段文字回复,包含: +- 内容简要说明(创建了什么 / 修改了什么) +- 文件的完整绝对路径(从 Write 工具返回结果中复制) + +模板: +``` +已为你创建「文档标题」,简要说明内容。 + +📄 文件位置:`/完整绝对路径/文件名.md` +``` + +**最终步骤 2:** 调用 `SendUserMessage` 将文件作为附件发送。**必须是最后一个动作,之后不再输出任何文字。** + +``` +SendUserMessage({ + message: "📄 点击下方附件打开文件", + attachments: ["/完整绝对路径/文件名.md"] +}) +``` + +#### 正确 vs 错误 + +- ✅ Write → 文字回复(含绝对路径)→ SendUserMessage(含附件)→ 结束 +- ❌ Write → 文字回复中没有绝对路径 +- ❌ Write → 没有调用 SendUserMessage +- ❌ Write → SendUserMessage → 又输出文字(如"任务完成") +- ❌ 没有调用 Write,内容直接输出在对话中 + +#### 禁止行为 + +- 将完整文档内容直接输出在回复中,不调用 Write 工具 +- 回复"好的,已完成"、"整理好了"、"以下是内容"但未调用 Write +- 只给文件名(如"报告.md")不给完整绝对路径 +- 不调用 SendUserMessage 发送附件 +- 在 SendUserMessage 之后再输出任何文字 +- 为文档创建/编辑任务写入记忆文件——创建或编辑文档是一次性任务,不是用户偏好或需要记住的事实 + +### 概述 + +Markdown(.md)是轻量级文本格式。Write 工具直接接受内容写入——无需编译、无需外部依赖。文件写入后可立即在 DesireCore 的 SuperDoc 编辑器中查看。 + +### 创建新文档 + +#### 工作流 + +1. 确定内容结构(标题、章节、表格) +2. 确定文件路径:用户指定 > 工作目录 +3. 调用 Write 工具,使用完整绝对路径 + 完整内容 +4. 输出文字回复:内容摘要 + 绝对路径 +5. 调用 SendUserMessage 发送文件附件(最后一步) + +#### 文件命名 + +- 使用描述性名称:`2026-05-11-项目进度表.md`、`会议纪要-产品评审.md` +- 避免泛用名称如 `output.md`、`document.md` +- 默认保存到工作目录 + +#### 完整示例 + +用户:"帮我整理一份项目进度表" + +**Write:** +``` +Write({ + file_path: "/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md", + content: "# 项目进度表\n\n| 模块 | 状态 | 负责人 | 截止日期 |\n|------|------|--------|----------|\n| 认证模块 | 已完成 | 张三 | 2026-05-01 |\n| 支付模块 | 进行中 | 李四 | 2026-05-15 |" +}) +``` + +**最终步骤 1** — 文字回复: +``` +已为你整理好「项目进度表」,包含各模块的当前状态、负责人和截止日期。 + +📄 文件位置:`/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md` +``` + +**最终步骤 2** — SendUserMessage(最后一步): +``` +SendUserMessage({ + message: "📄 点击下方附件打开文件", + attachments: ["/Users/zhangxinyuan/.desirecore-dev/users/.../workspace/2026-05-11-项目进度表.md"] +}) +```