← ClaudeAtlas

cnblogslisted

Publish, update and read CNBlogs (博客园) posts with a personal access token through the API used by the official vscode-cnb client. Use when the user wants to publish Markdown to 博客园, save a CNBlogs draft, edit or delete a post, or list posts or categories.
AceDataCloud/Skills · ★ 13 · AI & Automation · score 73
Install: claude install-skill AceDataCloud/Skills
Use the bundled standard-library CLI. The connector injects the user's 博客园 personal access token as `$CNBLOGS_TOKEN`. Never print it. The CLI follows the current official `cnblogs/vscode-cnb` client contract at `https://write.cnblogs.com/api` (`Authorization: Bearer` plus `Authorization-Type: pat`). ```bash python3 "$SKILL_DIR/scripts/cnblogs.py" whoami ``` If authentication fails, ask the user to create a PAT at `https://account.cnblogs.com/settings/tokens` and reconnect. Do not ask for their account password or Cookie. ## Read the blog ```bash # Verify the token and inspect the account's post template. python3 "$SKILL_DIR/scripts/cnblogs.py" whoami # Categories and recent posts. python3 "$SKILL_DIR/scripts/cnblogs.py" categories python3 "$SKILL_DIR/scripts/cnblogs.py" posts --limit 20 python3 "$SKILL_DIR/scripts/cnblogs.py" post POST_ID ``` ## Create a draft or publish Prepare the complete Markdown in a file. Category values are numeric IDs from the `categories` command; tags are names. ```bash # First call is always a dry run and does not load credentials or call the API. python3 "$SKILL_DIR/scripts/cnblogs.py" create \ --title "标题" --content-file /tmp/article.md \ --category-ids "123,456" --tags "agent,api" # Save as a private draft after the user confirms. python3 "$SKILL_DIR/scripts/cnblogs.py" create \ --title "标题" --content-file /tmp/article.md \ --category-ids "123,456" --tags "agent,api" --confirm # Public publishing additionally requires --publish