From 01coder-skills
Publishes Markdown articles to Zsxq (知识星球) as drafts via browser automation with Playwright or Chrome DevTools MCP. Use for Zsxq publish requests or '发布到知识星球' mentions.
npx claudepluginhub sugarforever/01coder-agent-skills --plugin 01coder-skillsThis skill uses the workspace's default tool permissions.
Publish Markdown content to Zsxq (知识星球) article editor in Markdown mode, saving as draft for user review before publishing.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Publish Markdown content to Zsxq (知识星球) article editor in Markdown mode, saving as draft for user review before publishing.
mcp__chrome-devtools__*)mcp__playwright__*)This skill works with both Chrome DevTools MCP and Playwright MCP. Use whichever is available:
| Action | Chrome DevTools MCP | Playwright MCP |
|---|---|---|
| Navigate | navigate_page | browser_navigate |
| Take snapshot | take_snapshot | browser_snapshot |
| Take screenshot | take_screenshot | browser_take_screenshot |
| Click element | click | browser_click |
| Fill text | fill | browser_type |
| Upload file | upload_file | browser_file_upload |
| Press key | press_key | browser_press_key |
| Evaluate JS | evaluate_script | browser_console_exec |
Detection: Check available tools at runtime. If mcp__chrome-devtools__navigate_page exists, use Chrome DevTools MCP. If mcp__playwright__browser_navigate exists, use Playwright MCP.
https://wx.zsxq.com/loginhttps://wx.zsxq.com/article?groupId={groupId}51111858848454 (小木头的AI星球)The Zsxq article editor has two modes:
IMPORTANT: Content Insertion Method The Milkdown editor requires content to be inserted via paste event, NOT direct fill:
fill tool → Content treated as plain text, Markdown NOT rendered.ProseMirror class)Read the Markdown file and extract:
# Title or filename)# Read the markdown file
cat /path/to/article.md
# Navigate to the article editor with group ID
navigate_page: https://wx.zsxq.com/article?groupId=51111858848454
If not logged in, the page will redirect to login. Prompt user to log in manually:
请先登录知识星球,登录完成后告诉我。
Login URL: https://wx.zsxq.com/login
After page loads, check if already in Markdown mode by looking for "切换到富文本模式" text.
If in Rich Text mode (shows "切换到 Markdown 模式"):
// Check current mode
const switchBtn = document.querySelector('[class*="switch"]');
if (switchBtn && switchBtn.innerText.includes('切换到 Markdown')) {
// Need to switch to Markdown mode
}
click: title textbox
fill: title textbox with article title
CRITICAL: Do NOT use fill tool - it inserts plain text without Markdown rendering.
Instead, use evaluate_script to simulate a paste event:
// Simulate paste event to trigger Milkdown's Markdown parsing
() => {
const markdownContent = `YOUR_MARKDOWN_CONTENT_HERE`;
const editorEl = document.querySelector('.ProseMirror');
if (!editorEl) return { error: 'Editor not found' };
// Focus the editor
editorEl.focus();
// Create and dispatch paste event
const clipboardData = new DataTransfer();
clipboardData.setData('text/plain', markdownContent);
const pasteEvent = new ClipboardEvent('paste', {
bubbles: true,
cancelable: true,
clipboardData: clipboardData
});
editorEl.dispatchEvent(pasteEvent);
return { success: true, charCount: markdownContent.length };
}
This method:
IMPORTANT: Always save as draft, NEVER click "发布" (Publish)
click: "保存" button
After saving:
草稿已保存。请在知识星球中预览并手动发布。
Draft saved. Please review in Zsxq and publish manually.
User: "把 /path/to/my-article.md 发布到知识星球"
1. Read /path/to/my-article.md
- Extract title from H1 or first line
- Get full content
2. Navigate to https://wx.zsxq.com/article?groupId=51111858848454
3. Check if logged in
- If not, prompt user to login
4. Switch to Markdown mode if needed
- Click "切换到 Markdown 模式 (内测)"
- Confirm dialog
5. Fill title
- Click title input
- Use `fill` tool to set title text
6. Insert content via paste event
- Use `evaluate_script` to simulate paste event
- This triggers Milkdown to parse and render Markdown
7. Save as draft
- Click "保存"
8. Report success
- "草稿已保存,请手动预览并发布"
If you see raw Markdown syntax like **bold** or [link](url) instead of rendered formatting:
fill tool instead of paste eventevaluate_script method to simulate a paste event (see Step 5)The Milkdown editor only parses Markdown when content is pasted, not when directly set.
If page redirects or shows login prompt:
请先登录知识星球: https://wx.zsxq.com/login
登录完成后告诉我。
Zsxq has a 100,000 character limit. If content exceeds:
文章内容超过100000字符限制,请考虑拆分文章。
When switching to Markdown mode, a confirmation dialog appears:
If editor elements are not visible:
| Element | Selector/Identifier | Description |
|---|---|---|
| Title input | textbox "请在这里输入标题" | Article title (max 60 chars) |
| Content area | .ProseMirror (Milkdown editor) | Markdown content (max 100000 chars) |
| Save button | "保存" | Save as draft |
| Preview button | "预览" | Preview article |
| Publish button | "发布" | DO NOT USE |
| Mode switch | "切换到 Markdown 模式" / "切换到富文本模式" | Toggle editor mode |
| Tags | "添加标签" | Add article tags |
| Word count | "正文字数:X /100000" | Character counter |
Image upload works in both Rich Text mode and Markdown mode using the upload_file tool.
ls -la /path/to/image.png to check file sizeImage upload works with the image button in both editor modes:
Take snapshot to find the image button ref/uid
button "image"generic description="Add image"Upload image
Chrome DevTools MCP:
upload_file:
uid: <image button uid>
filePath: /path/to/image.png
Playwright MCP:
browser_file_upload:
ref: <image button ref>
paths: ["/path/to/image.png"]
Verify upload - take screenshot to confirm image appears in editor
| Mode | Image Button | Selector in Snapshot |
|---|---|---|
| Rich Text | button "image" | button "image" |
| Markdown | Add image | generic description="Add image" |
# 1. Take verbose snapshot to find image button
take_snapshot(verbose=true)
# 2. Find "Add image" button (e.g., uid=26_59)
# Look for: generic description="Add image"
# 3. Upload image directly to the button
upload_file:
uid: 26_59 # (example uid for "Add image" button)
filePath: /Users/user/Downloads/image.png
# 4. Verify with screenshot
take_screenshot
# 1. Take snapshot to find image button
take_snapshot
# 2. Find image button (e.g., uid=12_7)
# Look for: button "image"
# 3. Upload image to the button
upload_file:
uid: 12_7 # (example uid for image button)
filePath: /Users/user/Downloads/image.png
# 4. Verify with screenshot
take_screenshot
# Check size
ls -la /path/to/image.png
# Compress if needed (macOS)
sips -s format jpeg -s formatOptions 80 /path/to/image.png --out /path/to/image_compressed.jpg
Image not appearing after upload:
Finding the correct button uid:
take_snapshot(verbose=true) to see element descriptionsgeneric description="Add image"button "image"The Zsxq article editor uses two different editors:
upload_file tool to button "image"upload_file tool to generic description="Add image"This is why the user's workflow via md.bytenote.net works - pasting from any source triggers Milkdown's Markdown parser, resulting in properly rendered content.