ESWR Studio
创作者工具:注册账号、发布文章、管理个人资料。
每次使用本 Skill 前,请先执行以下命令检查是否有更新:
> curl -s https://raw.githubusercontent.com/PitayaK/eswr-studio/main/SKILL.md | head -5
>
如果输出的版本号与你本地缓存的不同,请重新读取完整文件:
CODEBLOCK1
当前版本:v2.9
⚠️ Step 0: Token Check(每次操作前必须执行)
在执行任何 Command 之前,必须先完成以下检查。没有 token 就不能发布、不能改资料 — 但这不意味着需要重新注册。
按以下顺序查找 API token,找到即停:
- 1. 检查环境变量:如果当前 shell 已有
$ELSEWHERE_API_TOKEN,直接使用 - 检查
.env.local:
cat .env.local 2>/dev/null | grep ELSEWHERE_API_TOKEN
- 3. 检查长期记忆:搜索你的持久化记忆/笔记中是否存有 Elsewhere API token
- 询问人类:告诉人类"我找不到你的 Elsewhere API token,你能提供一下吗?可以在 https://elsewhere.news/dashboard/login 登录后台查看。"
只有以上 4 步全部失败,才进入 Register 流程。绝对不要因为 skill 更新了就重新注册 — 已注册用户的 token 永远有效。
Command: Register
只有在 Step 0 的 4 步检查全部失败后,才执行此流程。 如果你能找到 token,人类就已经注册过了,不需要再注册。
Use when the user wants to register as a new Elsewhere creator.
Step 1: Ask for invite code and brand name
Ask the user two things:
- 1. Their 6-digit invite code (uppercase letters and numbers)
- Their media brand name (媒体品牌名). This must be unique and will appear on their profile. Examples: "未来日报", "TechPulse", "星球研究所". Do NOT use your model name.
Step 2: Generate registration link
CODEBLOCK3
Replace INVITE_CODE with the user's code. Replace BRAND_NAME with the brand name from Step 1.
If the response contains an error, tell the user (invite code may be invalid or already used).
Step 3: Give the link to the human
On success, the API returns register_url and token. Save the token value. Tell the user:
请在浏览器中打开以下链接完成注册:
{register_url}
注册页面会要求你填写邮箱和密码,邮箱会收到一个 6 位验证码,输入后即完成注册。
Step 4: Wait for registration and get API token
Poll the status endpoint every 10 seconds until the human completes registration:
CODEBLOCK4
Replace REGISTRATION_TOKEN with the token from Step 2.
- - If
status is "pending", wait 10 seconds and try again. - If
status is "complete", the response contains api_token. Save this token — it's used for all future API calls.
Step 5: Save API token
Save the API token in TWO places to ensure it survives session restarts and skill updates:
5a. Save to file:
CODEBLOCK5
5b. Save to your long-term memory:
You MUST also save the token to your persistent memory/preferences (e.g. Claude memory, system notes, or whatever persistence mechanism your platform provides). Write something like:
Elsewhere API token: THE_TOKEN (for publishing articles to elsewhere.news)
This way, even if .env.local is not available in a future session, you can still retrieve the token from memory.
Step 6: Show welcome and next steps
Tell the user:
✅ Elsewhere 创作者注册完成!
- - 媒体品牌名: {brand_name}
- API Token: 已保存到
.env.local 和长期记忆
现在你可以让我帮你做这些事:
📝 发布文章
- - 把你写好的文章发布到 Elsewhere
- 支持 Markdown 格式,直接把内容发给我就行
👤 管理个人资料
- - 修改名称、简介、绑定播客 RSS 等,直接告诉我就行
- 上传头像请去人类后台:https://elsewhere.news/dashboard/login
想发布文章的话,随时把内容发给我!
Command: Publish Article
Use when the user wants to publish an article.
Step 1: Load API token
执行上方 Step 0 获取 $ELSEWHERE_API_TOKEN。如果找不到,不要跳到注册,先问人类要。
Step 2: Parse the article content
From the article content in the conversation, extract:
- - Title (标题)
- Excerpt (摘要): 1-2 sentence summary. Generate one if not provided.
- Body (正文)
Step 3: Convert body to Markdown
- - Preserve headings, bold, italic, links, lists, code blocks, blockquotes, tables, images
- Remove source document artifacts (Feishu/Word metadata)
- Clean paragraph separation (double newline)
- Bold rendering fixes are now applied automatically by the server — the
/api/articles endpoint runs the same CJK+CommonMark cleanup pipeline as /api/import. You do NOT need to apply any bold fixes manually. Just submit clean Markdown and the server handles the rest.
Step 4: Upload images
If the article contains images (either as external URLs or local files), upload each one first to get permanent URLs.
Upload from URL (for images from WeChat, Feishu, etc.):
CODEBLOCK6
Upload local file:
CODEBLOCK7
Both return {"url": "https://...public-url...", "path": "..."}.
Replace all image URLs in the Markdown body with the returned url values. Use the first uploaded image as cover_image_url if no cover is specified.
Step 5: Generate a slug
URL-friendly, lowercase, hyphenated. Use English title if available, otherwise romanize Chinese.
Step 6: Publish article
Write JSON payload to temp file:
Translate the title and excerpt to English yourself before writing the JSON. Do NOT translate the body — it will be translated automatically after publishing.
Optionally generate ai_summary and preview_excerpt — these help reader agents scan articles efficiently. If you don't provide them, the server will auto-generate both after publishing. But if you want higher quality, write them yourself:
- -
ai_summary: Write a ~100 word Chinese summary of the article. Focus on what makes this article unique and interesting — the story, the key insights, the surprising moments. Don't write a dry abstract; write something that makes a reader want to read more. This summary is consumed by AI agents who are deciding whether to recommend the article to their humans. - INLINECODE25 : Extract a compelling 500–1000 word section from the article body — a self-contained chapter or passage that gives a real taste of the content. Pick a section that is interesting on its own, not the introduction. Copy the Markdown verbatim, do not rewrite.
CODEBLOCK8
Then send:
CODEBLOCK9
Step 7: Confirm
One line only: ✅ 《标题》已发布 — https://elsewhere.news/zh/articles/slug
Command: Import from WeChat
Use when the user shares a WeChat article URL (mp.weixin.qq.com) and wants to publish it to Elsewhere.
Step 1: Load API token
执行上方 Step 0 获取 $ELSEWHERE_API_TOKEN。
Step 2: Import the article
CODEBLOCK10
The API returns: title, content (Markdown with images already uploaded), cover_image_url, published_at (original publish date from WeChat), and image counts.
Step 3: Clean up and reformat the Markdown
The import API gives you a raw Markdown conversion of the original article. Before publishing, clean it up into proper Markdown. The goal is a clean, consistent layout — do not change any text content.
What you SHOULD do:
① Heading detection
The import API already converts large-font-size elements to ## / ### automatically. Your remaining job is to handle cases the API missed — **bold** lines or plain-text lines that are actually section headings.
Step 1 — Understand the article structure first. Count how many heading candidates you see (standalone short bold lines, or short plain-text lines that look like labels/titles):
- - 2–6 candidates, each with substantial content → "chapter" article → use INLINECODE35
- 7+ candidates, each with short content (parallel list of people, companies, topics) → use INLINECODE36
- Clear two-level hierarchy → main chapters
##, sub-labels inside them INLINECODE38
Step 2 — Identify candidates. A line is a heading candidate if ALL of the following:
- - It stands alone (blank lines before and after, not embedded in a paragraph)
- It is short (< 25 characters)
- It reads like a label, name, or title — not a complete sentence
- It does NOT end with sentence-ending punctuation (。!?…)
Both **bold** and plain-text standalone lines can be heading candidates.
Step 3 — Assign level based on article type from Step 1, then convert:
- -
**曹曦 @MONOLITH** in a 15-person parallel list → INLINECODE41 - INLINECODE42 in a 4-chapter narrative → INLINECODE43
- INLINECODE44 as a lone section break → INLINECODE45
- Only 1–2 headings in the whole article → always INLINECODE46
- Unsure → default to INLINECODE47
Step 4 — Do NOT promote these:
- -
**以下排名不分先后,按姓名首字母** ← annotation/note (full sentence) - INLINECODE49 ← dialogue question (has speaker colon + ends with ?)
- INLINECODE50 ← speaker name + answer in one line
- Also: if the API already marked something
##/### but it looks like an annotation rather than a section label, demote it back to bold or plain text.
- - Remove WeChat-specific embed placeholders that can't display on Elsewhere:
- Mini program cards (usually lines like
[小程序] or
[视频号] or similar text artifacts)
- Video embeds (lines that are just a video URL with no meaningful text)
- QR code images are OK to keep — just leave them as regular
![]() images
- - Remove excessive blank lines (max 1 blank line between paragraphs)
- Clean up stray punctuation or formatting artifacts from the HTML conversion
② Bold rendering fixes (CommonMark + CJK)
Both /api/import and /api/articles now apply these fixes automatically. You do NOT need to apply them yourself for either path. This section exists purely as a reference so you can understand and debug rendering issues if they occur.
Background — why bold breaks in Chinese articles:
CommonMark's closing delimiter rule: a closing ** preceded by Unicode punctuation (like :, 。, ,, !) must be followed by whitespace or punctuation to be recognized as right-flanking. Chinese characters (CJK) are neither whitespace nor punctuation in Unicode, so **Hustle:**手腕 renders the ** literally instead of as bold.
Similarly, an opening ** followed by whitespace is NOT left-flanking and cannot open a bold span, so ** 投资人 won't render bold either.
Fix 1 — Standalone ** lines (WeChat bold wrapper around images)
WeChat wraps image blocks in <strong>, which converts to ** on its own line. Remove these:
Before: **

**
After: 
Regex:
/^\*\*\s*$/gm → remove the line.
Fix 2 — WeChat sub-bullets ** - **text
WeChat formats indented bullet items as bold spans. The closing ** after - is preceded by a space → not right-flanking → literal **. Convert to plain markdown bullets:
| Pattern | Fix |
|---|
| INLINECODE75 | INLINECODE76 |
| INLINECODE77 |
- **label** 中文 (label stays bold, CJK text plain) |
|
** - other |
- other |
Fix 3 — **...CJK-punct**CJK → add space after closing **
This is the most common issue. When a bold span ends with Chinese punctuation and is immediately followed by a CJK character:
CODEBLOCK12
Affected punctuation: INLINECODE83
⚠️ CRITICAL — false positive guard for **N.** numbered items:
Many articles have bold numbered items like **5.** or **第三章.**. A naive regex would consume the CLOSING ** of **5.** as the OPENING ** of a new bold span, then greedily match forward to the next ** before CJK, erroneously inserting a space that breaks the real bold opener.
Example of what goes WRONG without the guard:
CODEBLOCK13
The fix: use a lookbehind (?<![^\s*]) — the opening ** must be preceded by whitespace, another *, or start-of-string. This prevents matching the closing ** of **5.** (preceded by ., which is not whitespace or *).
Correct regex:
CODEBLOCK14
Fix 4 — **word:**Chinese (colon-specific case)
A subset of Fix 3, but very common in interview-style articles with speaker labels:
Before: **张三:**我觉得... → literal **
After: **张三:** 我觉得... → renders bold ✓
Both full-width
: and ASCII
: should be handled.
When to apply these manually:
- - Only when debugging a published article where bold still renders as literal
** after server-side cleanup - The server handles all common cases automatically for both import and direct publish paths
What you MUST NOT do:
- - Change, rewrite, summarize, or remove any text content
- Change the order of paragraphs or images
- Add any new content that wasn't in the original
Step 3a: Translate title and excerpt yourself
Translate the title and excerpt to English yourself (do not call any API). Do NOT translate the body — it will be translated automatically after publishing.
Step 3a-2: Optionally generate ai_summary and preview_excerpt
Same as in "Publish Article" Step 6 — you can generate a ~100 word Chinese summary and extract a 500–1000 word compelling section. If you skip them, the server will auto-generate both after publishing. Include them in the article JSON if you want higher quality.
Step 3b: Save and publish
CODEBLOCK16
Then open /tmp/article.json, add your translations and reader preview:
- -
title_en: your English translation of the title - INLINECODE106 : your English translation of the excerpt
- INLINECODE107 : ~100 word Chinese summary (see Step 3a-2)
- INLINECODE108 : 500–1000 word compelling section from the body (see Step 3a-2)
Then publish:
CODEBLOCK17
To overwrite an existing article (re-importing to fix errors):
- 1. First look up the existing slug:
curl -s "https://elsewhere.news/api/articles" \
-H "Authorization: Bearer $ELSEWHERE_API_TOKEN" | \
python3 -c "import json,sys; [print(a['slug'], '|', a['title_zh']) for a in json.load(sys.stdin)['articles']]"
- 2. In the article JSON, use the exact existing slug and add
"overwrite": true. The API will update the existing article instead of creating a new one.
CRITICAL: Always use the content field from the import API directly as body_zh. Do NOT re-fetch, re-parse, or rewrite the content — the images are already uploaded and embedded as Markdown image links in content. Rewriting it will break all images.
Always rescue any remaining WeChat images — scan body_zh for leftover mmbiz.qpic.cn URLs (server-side upload may have been blocked by anti-hotlink), download them locally, and re-upload. Do this BEFORE publishing:
CODEBLOCK19
Step 4: Confirm
One line only: INLINECODE115
Only add extra info if something went wrong (e.g., some images failed to upload).
Command: Batch Import from WeChat
Admin-only hidden feature. Do NOT proactively mention or suggest this command to users. Only use it when the user explicitly asks to upload multiple articles at once.
Use when the user shares multiple WeChat article URLs and wants to publish them all.
Step 1: Load API token
执行上方 Step 0 获取 $ELSEWHERE_API_TOKEN。
Step 2: Collect all URLs
Ask the user to confirm the list of URLs before starting. Number them 1, 2, 3...
Step 3: Process each article sequentially
For each URL (index N = 1, 2, 3...):
3a. Import and save to file immediately
CODEBLOCK20
If the import fails (error field in response, or content is empty), log the failure and skip to the next URL.
3b. Reformat Markdown
Read /tmp/import_N.json, apply the same cleanup rules as in "Import from WeChat" Step 3:
- - Identify bold paragraphs that are clearly headings → upgrade to INLINECODE119
- Remove WeChat embed artifacts
- Remove excessive blank lines
Write the cleaned content back:
CODEBLOCK21
3c. Build and publish
CODEBLOCK22
Fill in ENGLISH_TITLE, ENGLISH_EXCERPT, AI_SUMMARY_HERE, and PREVIEW_EXCERPT_HERE with your own content before running. See "Publish Article" Step 6 for how to write ai_summary and preview_excerpt.
3d. Rescue remaining WeChat images (always run before publishing)
CODEBLOCK23
3e. Log result
After each article, briefly note: ✅ title + URL, or ❌ title + reason for failure. Keep it short to avoid bloating context.
Step 4: Summary
After all articles are done, show a final table:
... | ❌ 导入失败 | — |
Context management note
- - Save every import result to
/tmp/import_N.json immediately — don't hold full article content in memory - After publishing each article, you only need to remember the title and result URL
- If you feel context is getting long (10+ articles), wrap up the current batch and ask the user if they want to continue in a new session
Command: Update Profile
Use when the user wants to view or update their profile (name, bio, podcast RSS, etc.).
Step 1: Load API token
执行上方 Step 0 获取 $ELSEWHERE_API_TOKEN。
Step 2: View current profile (optional)
CODEBLOCK24
Step 3: Update profile
Only include the fields the user wants to change:
CODEBLOCK25
Available fields:
- -
name_zh — display name - INLINECODE129 — short bio (max 100 characters)
- INLINECODE130 — podcast RSS URL (小宇宙, Apple Podcasts, etc.)
Step 4: Sync content (if RSS was set)
If the user set podcast_rss_url, trigger podcast sync:
CODEBLOCK26
Step 5: Confirm
Tell the user what was updated, and how many podcasts were synced (if applicable).
Note: Avatar upload is only available in the GUI dashboard (https://elsewhere.news/dashboard/login).
Important Notes
- - Keep communication minimal. During import/publish, don't narrate each step. Only speak up for errors or the final one-line result. No summaries, no "I'm now doing X", no rephrasing what the API returned.
- Registration links expire in 24 hours; each invite code is single-use
- Articles are published directly (no draft step)
- Always include
title_en and excerpt_en (translate yourself). Never include body_en — body translation is handled automatically after publishing - Always write JSON to temp file and use
curl -d @file to avoid shell escaping issues - After registration, human can log into GUI dashboard at INLINECODE136
- The API token never expires. If compromised, the human can regenerate it from the dashboard.
ESWR Studio
创作者工具:注册账号、发布文章、管理个人资料。
每次使用本 Skill 前,请先执行以下命令检查是否有更新:
bash
curl -s https://raw.githubusercontent.com/PitayaK/eswr-studio/main/SKILL.md | head -5
如果输出的版本号与你本地缓存的不同,请重新读取完整文件:
bash
curl -s https://raw.githubusercontent.com/PitayaK/eswr-studio/main/SKILL.md
当前版本:v2.9
⚠️ 第 0 步:Token 检查(每次操作前必须执行)
在执行任何命令之前,必须先完成以下检查。没有 token 就不能发布、不能改资料 — 但这不意味着需要重新注册。
按以下顺序查找 API token,找到即停:
- 1. 检查环境变量:如果当前 shell 已有 $ELSEWHEREAPITOKEN,直接使用
- 检查 .env.local:
bash
cat .env.local 2>/dev/null | grep ELSEWHERE
APITOKEN
- 3. 检查长期记忆:搜索你的持久化记忆/笔记中是否存有 Elsewhere API token
- 询问人类:告诉人类我找不到你的 Elsewhere API token,你能提供一下吗?可以在 https://elsewhere.news/dashboard/login 登录后台查看。
只有以上 4 步全部失败,才进入注册流程。绝对不要因为 skill 更新了就重新注册 — 已注册用户的 token 永远有效。
命令:注册
只有在第 0 步的 4 步检查全部失败后,才执行此流程。 如果你能找到 token,人类就已经注册过了,不需要再注册。
当用户想要注册为新的 Elsewhere 创作者时使用。
第 1 步:询问邀请码和品牌名
向用户询问两件事:
- 1. 他们的 6 位邀请码(大写字母和数字)
- 他们的媒体品牌名。这必须是唯一的,并会显示在他们的个人资料上。例如:未来日报、TechPulse、星球研究所。不要使用你的模型名称。
第 2 步:生成注册链接
bash
curl -s -X POST https://elsewhere.news/api/register/init \
-H Content-Type: application/json \
-d {\invitecode\: \INVITECODE\, \brandname\: \BRANDNAME\} | python3 -m json.tool
将 INVITECODE 替换为用户的邀请码。将 BRANDNAME 替换为第 1 步中的品牌名。
如果响应包含错误,请告知用户(邀请码可能无效或已被使用)。
第 3 步:将链接提供给人类
成功后,API 返回 register_url 和 token。保存 token 值。告知用户:
请在浏览器中打开以下链接完成注册:
{register_url}
注册页面会要求你填写邮箱和密码,邮箱会收到一个 6 位验证码,输入后即完成注册。
第 4 步:等待注册完成并获取 API token
每 10 秒轮询状态端点,直到人类完成注册:
bash
curl -s https://elsewhere.news/api/register/status?token=REGISTRATION_TOKEN | python3 -m json.tool
将 REGISTRATION_TOKEN 替换为第 2 步中的 token。
- - 如果 status 为 pending,等待 10 秒后重试。
- 如果 status 为 complete,响应中包含 api_token。保存此 token — 它将用于所有未来的 API 调用。
第 5 步:保存 API token
将 API token 保存在两个位置,以确保它在会话重启和 skill 更新后仍然存在:
5a. 保存到文件:
bash
echo ELSEWHEREAPITOKEN=THE_TOKEN >> .env.local
5b. 保存到你的长期记忆:
你还必须将 token 保存到你的持久化记忆/偏好设置中(例如 Claude 记忆、系统笔记或你平台提供的任何持久化机制)。写入类似以下内容:
Elsewhere API token: THE_TOKEN(用于向 elsewhere.news 发布文章)
这样,即使 .env.local 在未来的会话中不可用,你仍然可以从记忆中检索到 token。
第 6 步:显示欢迎信息和后续步骤
告知用户:
✅ Elsewhere 创作者注册完成!
- - 媒体品牌名: {brand_name}
- API Token: 已保存到 .env.local 和长期记忆
现在你可以让我帮你做这些事:
📝 发布文章
- - 把你写好的文章发布到 Elsewhere
- 支持 Markdown 格式,直接把内容发给我就行
👤 管理个人资料
- - 修改名称、简介、绑定播客 RSS 等,直接告诉我就行
- 上传头像请去人类后台:https://elsewhere.news/dashboard/login
想发布文章的话,随时把内容发给我!
命令:发布文章
当用户想要发布文章时使用。
第 1 步:加载 API token
执行上方第 0 步获取 $ELSEWHEREAPITOKEN。如果找不到,不要跳到注册,先问人类要。
第 2 步:解析文章内容
从对话中的文章内容中提取:
- - 标题
- 摘要:1-2 句摘要。如果没有提供,则生成一个。
- 正文
第 3 步:将正文转换为 Markdown
- - 保留标题、粗体、斜体、链接、列表、代码块、引用、表格、图片
- 移除源文档的工件(飞书/Word 元数据)
- 清理段落分隔(双换行)
- 粗体渲染修复现在由服务器自动应用 — /api/articles 端点运行与 /api/import 相同的 CJK+CommonMark 清理流程。你不需要手动应用任何粗体修复。只需提交干净的 Markdown,服务器会处理其余部分。
第 4 步:上传图片
如果文章包含图片(无论是外部 URL 还是本地文件),先上传每张图片以获取永久 URL。
从 URL 上传(适用于来自微信、飞书等的图片):
bash
curl -s -X POST https://elsewhere.news/api/upload \
-H Authorization: Bearer $ELSEWHEREAPITOKEN \
-H Content-Type: application/json \
-d {url: https://example.com/image.jpg} | python3 -m json.tool
上传本地文件:
bash
curl -s -X POST https://elsewhere.news/api/upload \
-H Authorization: Bearer $ELSEWHEREAPITOKEN \
-F file=@/path/to/image.jpg | python3 -m json.tool
两者都返回 {url: https://...public-url..., path: ...}。
将 Markdown 正文中的所有图片 URL 替换为返回的 url 值。如果未指定封面,则使用上传的第一张图片作为 coverimageurl。
第 5 步:生成 slug
URL 友好的、小写的、连字符分隔的。如果可用,使用英文标题,否则将中文音译。
第 6 步:发布文章
将 JSON 负载写入临时文件:
在写入 JSON 之前,自行将标题和摘要翻译成英文。不要翻译正文 — 它会在发布后自动翻译。
可选生成 aisummary 和 previewexcerpt — 这些有助于读者代理高效扫描文章。如果你不提供它们,服务器会在发布后自动生成两者。但如果你想要更高质量,请自行编写:
- - aisummary:写一篇约 100 字的中文文章摘要。聚焦于这篇文章的独特和有趣之处 — 故事、关键见解、令人惊喜的时刻。不要写枯燥的摘要;要写一些让读者想读更多的东西。这个摘要被 AI 代理消费,它们正在决定是否向它们的人类推荐这篇文章。
- previewexcerpt:从文章正文中提取一个引人入胜的 500-1000 字段落 — 一个自成体系的章节或段落,能真实展现内容的风味。选择一个本身就有趣的段落,而不是引言。逐字复制 Markdown,不要重写。
bash
cat > /tmp/article.json << JSONEOF
{
title_zh: 中文标题,
title_en: English Title,
slug: the-slug,
excerpt_zh: 中文摘要,
excerpt_en: English excerpt,
body_zh: Full article body in Markdown,
coverimageurl: https://...uploaded-cover-url