title: "${title:-Generated by OpenClaw}"
date: $(date -Iseconds)
tags: ${tagsYAML}
image: ./hero.png
$(cat "$polishedFile")
EOF
mkdir -p "${outputDir}/${ts}-${slug}/images/"
save_state outputPath "$outputFile"
- name: finalize
description: Emit polished path only
run: |
outputPath=$(load_state outputPath)
jq -n --arg outputPath "$outputPath" '{ outputPath: $outputPath }'
engOutputPath=$(load_state engOutputPath)
chnOutputPath=$(load_state chnOutputPath)
outputPath=$(load_state outputPath)
jq -n \
--arg engOutputPath "$engOutputPath" \
--arg chnOutputPath "$chnOutputPath" \
--arg astroPath "$outputPath" \
'{ engOutputPath: $engOutputPath, chnOutputPath: $chnOutputPath, astroPath: $astroPath }'
Blog Polish (en-US and zh-CN)
This skill polishes a technical blog draft and translates it to English and then Simplified Chinese while preserving technical accuracy.
When to Use
Use when the user asks to polish/translate a technical blog draft to zh-CN without images. Triggers: "polish my draft", "translate blog to Chinese", "enhance latestDraft.md".
Defaults
- -
draftPath: INLINECODE1 - INLINECODE2 : INLINECODE3
- Output filename:
${ts}-polished.md or INLINECODE5
Workflow Summary
Draft → Check → Polish (EN) → Translate (ZH) → Convert EN to Astro format → Emit path JSON.
- 1. Resolve paths + create timestamp (
date +"%y%m%d%H%M") - Read draft from INLINECODE7
- Polish English: Fix grammar/spelling, improve clarity, structure into 4-5 sections, target 1000-1200 words
- Translate to zh-CN: Preserve code blocks, inline code, technical terms (
openclaw, skill, cli) - Save polished markdown to INLINECODE11
- Return: INLINECODE12
Output
Example
Input: ~/.openclaw/workspace/contentDraft/latestDraft.md
{ "outputPath": "~/.openclaw/workspace/contentPolished/2603142134-openclaw-skills.md" }
title: ${title:-Generated by OpenClaw}
date: $(date -Iseconds)
tags: ${tagsYAML}
image: ./hero.png
$(cat $polishedFile)
EOF
mkdir -p ${outputDir}/${ts}-${slug}/images/
save_state outputPath $outputFile
- name: finalize
description: 仅输出润色后的路径
run: |
outputPath=$(load_state outputPath)
jq -n --arg outputPath $outputPath { outputPath: $outputPath }
engOutputPath=$(load_state engOutputPath)
chnOutputPath=$(load_state chnOutputPath)
outputPath=$(load_state outputPath)
jq -n \
--arg engOutputPath $engOutputPath \
--arg chnOutputPath $chnOutputPath \
--arg astroPath $outputPath \
{ engOutputPath: $engOutputPath, chnOutputPath: $chnOutputPath, astroPath: $astroPath }
博客润色(英文和简体中文)
此技能用于润色技术博客草稿,并将其翻译为英文,再翻译为简体中文,同时保持技术准确性。
使用时机
当用户要求将技术博客草稿润色/翻译为简体中文且不包含图片时使用。触发词:润色我的草稿、将博客翻译成中文、优化 latestDraft.md。
默认设置
- - draftPath:~/.openclaw/workspace/contentDraft/latestDraft.md
- outputDir:~/.openclaw/workspace/contentPolished/
- 输出文件名:${ts}-polished.md 或 ${ts}-${subject}.md
工作流程摘要
草稿 → 检查 → 润色(英文) → 翻译(中文) → 将英文转换为 Astro 格式 → 输出路径 JSON。
- 1. 解析路径 + 创建时间戳(date +%y%m%d%H%M)
- 读取草稿 从 draftPath
- 润色英文:修正语法/拼写错误,提升清晰度,结构化为 4-5 个章节,目标字数 1000-1200 字
- 翻译为简体中文:保留代码块、行内代码、技术术语(openclaw、skill、cli)
- 保存润色后的 Markdown 到 ${outputDir}/${ts}-polished.md
- 返回:{ outputPath: /full/path/to/file.md }
输出
示例
输入:~/.openclaw/workspace/contentDraft/latestDraft.md
{ outputPath: ~/.openclaw/workspace/contentPolished/2603142134-openclaw-skills.md }