WeChat Article to Obsidian
by @amortalsodyssey
Save WeChat public account articles (微信公众号文章) as clean Markdown notes in Obsidian. Use this skill whenever the user shares a mp.weixin.qq.com link and wants...
Natural language override (per-request)
The user can override the default path anytime:
Parse the target path from the user's message and use it instead of default_path.
Config file (persistent default)
:
obsidian_vault: the vault name for obsidian CLIdefault_path: where to save articles when the user doesn't specify a pathvault_disk_root: absolute disk path of the vault root for direct-write savingRecommended setup:
obsidian_vault: optional vault name referencedefault_path: notes/wechatvault_disk_root: absolute disk path to the user's Obsidian vaultcurl returns empty, shell page, or parser finds no content
Try the browser fallback:
python3 "$SKILL_PATH/scripts/fetch-browser.py" "URL" /tmp/wx_article.html
If browser fallback also fails, the article may require a stronger logged-in context or be a special unsupported page type.
Playwright is missing
If browser fallback fails with missing Playwright modules (for example ModuleNotFoundError: No module named 'playwright'), do not block the whole workflow.
Do this instead:
1. Keep the normal fetch.sh path as the default first attempt
2. Only report Playwright as a missing optional dependency for fallback mode
3. Continue with non-browser flow if the fast path already produced usable article HTML
4. If the user wants, help install Playwright globally/local to improve future fallback success
Policy block vs approval-required
These are different situations and must be treated differently:
Do not assume every blocked command can be fixed with an approval command. If there is no actual approval object from the runtime, explain that clearly and switch to a different execution shape.
Empty content / no #js_content
Some special article types (mini-programs, video-only) aren't supported. Inform the user.
Parse step blocked by shell shape
If a direct command like:
node "$SKILL_PATH/scripts/parse.mjs" /tmp/wx_article.html > /tmp/wx_article.md
is blocked by policy, do not abandon the skill. Use another execution form that still calls the same parser script and captures its stdout, then save the Markdown with the bundled direct-write saver.
obsidian CLI not available
That is fine. The publish build saves by direct file write to the configured vault disk path.
Important for this setup:
vault_disk_root from config when presentnotes/wechat should resolve inside the configured vault rootclawhub install wechat-article-to-obsidian