
Claude Skill 发布在 LinkedIn 上的文章
概览
只需一个命令,即可将Markdown文章发布到LinkedIn文章。告别繁琐的富文本编辑。 — 块索引定位,用于精确图像定位 如果你习惯用Markdown写作,发布到LinkedIn文章是个: 这项技能自动化了整个出版流程: - : 将Markdown转换为HTML,通过剪贴板粘贴 — 所有格式保持 - : 使用元素索引精确放置图片,而非文本匹配 - : 从最高到最低插入图片以避免位置偏移 - : 满足条件即刻返回,无浪费等待时间 - : 仅保存为草稿,绝不自动发布 此前,图片是通过匹配周围文本来定位的——当以下情况失败:- 多个段落内容相似 - 文本过短无法唯一 现在,每张图像都有一个block_index,精确指示它所跟随的块元素。这是确定性的且可靠的。 反向插入的图像:先block_index=6,然后block_index=4。
概述(AI 翻译)
英文 |中文
用一个命令发布 Markdown 文章到 LinkedIn 文章。告别繁琐的富文本编辑。
v1.0.0 — 块索引定位,用于精确图像放置
问题
如果你习惯用Markdown写作,发布到LinkedIn文章是一个痛苦的过程:
| 痛点 | 描述 |
|---|---|
| 格式丢失 | 从Markdown编辑器复制 -> 粘贴到LinkedIn ->所有格式消失 |
| 手动格式 | 手动设置每个H2,加粗,链接——每篇文章15-20分钟 |
| 繁琐的图片上传 | 每张图片多次点击:添加媒体 -> 选择 -> 等待 |
| 位置错误很难记住每张图片应该放在哪里 |
时间比较
| 任务 | 手册 | 凭借这项技能 |
|---|---|---|
| 格式转换 | 15-20分钟 | 0(自动) |
| 封面图片 | 1-2分钟 | 10秒 |
| 5 张内容图片 | 5-10 分钟 | 1 分钟 |
| 总计 | 20-30分钟****2-3分钟 |
效率提升10倍
解决方案
这项技能自动化了整个出版流程:
主要特色
- 富文本粘贴:将Markdown转换为HTML,通过剪贴板粘贴——所有格式保持不变
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
LinkedIn Article Publisher Skill
Publish Markdown articles to LinkedIn Articles with one command. Say goodbye to tedious rich text editing.
v1.0.0 — Block-index positioning for precise image placement
The Problem
If you’re used to writing in Markdown, publishing to LinkedIn Articles is a painful process:
| Pain Point | Description |
|---|---|
| Format Loss | Copy from Markdown editor -> Paste to LinkedIn -> All formatting gone |
| Manual Formatting | Set each H2, bold, link manually — 15-20 min per article |
| Tedious Image Upload | Multiple clicks per image: Add media -> Select -> Wait |
| Position Errors | Hard to remember where each image should go |
Time Comparison
| Task | Manual | With This Skill |
|---|---|---|
| Format conversion | 15-20 min | 0 (automatic) |
| Cover image | 1-2 min | 10 sec |
| 5 content images | 5-10 min | 1 min |
| Total | 20-30 min | 2-3 min |
10x efficiency improvement
The Solution
This skill automates the entire publishing workflow:
Markdown File
| Python parsing
v
Structured Data (title, images with block_index, HTML)
| Playwright MCP
v
LinkedIn Articles Editor (browser automation)
|
v
Draft Saved (never auto-publishes)
Key Features
- Rich Text Paste: Convert Markdown to HTML, paste via clipboard — all formatting preserved
- Block-Index Positioning: Precise image placement using element indices, not text matching
- Reverse Insertion: Insert images from highest to lowest index to avoid position shifts
- Smart Wait Strategy: Conditions return immediately when met, no wasted wait time
- Safe by Design: Only saves as draft, never publishes automatically
Why Block-Index?
Previously, images were positioned by matching surrounding text — this failed when:
- Multiple paragraphs had similar content
- Text was too short to be unique
Now, each image has a block_index indicating exactly which block element it follows. This is deterministic and reliable.
Requirements
| Requirement | Details |
|---|---|
| Claude Code | claude.ai/code |
| Playwright MCP | Browser automation |
| LinkedIn Account | Free account works (no Premium required) |
| Python 3.9+ | With dependencies below |
| macOS | Currently macOS only |
pip install Pillow pyobjc-framework-Cocoa
Installation
Method 1: Git Clone (Recommended)
git clone https://github.com/iamzifei/linkedin-article-publisher-skill.git
cp -r linkedin-article-publisher-skill/skills/linkedin-article-publisher ~/.claude/skills/
Method 2: Plugin Marketplace
/plugin marketplace add iamzifei/linkedin-article-publisher-skill
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add iamzifei/linkedin-article-publisher-skill