In-conversation "Share to website"
When the user wants to provide a sharing entry in the reply after Codex / Claude generates images, or clicks "Share to website", first read the conversation sharing contractin the installation package root directory, and use scripts/conversation_share.py. This process shares the generated images and the verbatim-saved original creation instructions, appending only the actually numbered tags at the end, such as 【画风:FA-013 】; only attach image-type tags if image types were actually used. Do not write remark headings, number explanations, or "unused" fields, and do not include second-stage parameters or complete image generation prompts; the existing share --prompt is a parsed prompt share and cannot replace this process.
Target is the works plaza: create a free /studio/api/entries work via kind=work , with the first image as the cover and the remaining images as attachments, using assets to associate the actual art style and image type. Do not directly call the forum /posts.json in place of plaza sharing. This convention applies only to the sharing entry after image generation; when the user explicitly requests a forum post, continue to use the forum process below.
After generation is complete, prepare a local draft and output a standard Markdown sharing link, and open the local preview page; the page provides a real "Share to works plaza" button. Neither preparing the draft nor opening the page uploads anything; publish only after the user clicks the publish button in the page or explicitly replies. Do not assume the host will render :codex-followup as a button. Combine multiple images into a single plaza work; repeated clicks return the original link. Each user is bound to their own credentials; public Skills, button parameters, and shared body text must not contain keys. Relative paths in the flat .agents/skills entry need to be re-resolved from the installation package root directory.
This Skill is thehandraw-style.comhand-drawn style ecosystem (full-featured community publishing engine. It covers two core dimensions:
- Dynamic forum posting and content management: publish image-and-text discussions, publication-grade hand-drawn prompt cards, reply interactions, and full lifecycle maintenance of posts to the major Discourse community categories.
- Static gallery and asset deployment to the cloud: one-click incremental sync deployment of style gallery pages (
index.html、tutorials.html、assets.html, etc.), 365 visual style data, and WebP high-definition slice images to cloud servers and CDN, with support for automatically publishing forum version update announcements.
🏛️ Dual-dimension publishing architecture and system division
flowchart TD
User["用户 / Agent 社区发布请求"] --> Decision{"发布目标类型"}
Decision -- "论坛发帖 / 提示词分享 / 互动" --> Forum["Discourse 论坛 API 交互引擎\n(discourse_client.py post/share/reply)"]
Decision -- "画廊更新 / 静态页面上云" --> Static["静态画廊与资产部署引擎\n(discourse_client.py deploy / sync_to_static.py)"]
Decision -- "版本升级联动发布" --> Combo["一键部署 + 论坛自动发公告\n(discourse_client.py deploy --announce)"]
Forum --> F1["自动配图上传 /uploads.json"]
F1 --> F2["按板块智能路由 (ID 4-9)"]
F2 --> F3["生成直达帖子链接"]
Static --> S1["增量检测本地与远程 WebP 差异"]
S1 --> S2["SCP 打包传输并远程解压"]
S2 --> S3["刷新 Nginx 静态软链接与 CDN"]
Combo --> Static
Static --> Forum
The community's 6 core category system
| Category ID | Category name | Slug identifier | Core positioning and applicable content | Recommended matching keywords |
|---|---|---|---|---|
| 4 | General hall | creation-monetization |
Community official announcements, newcomer introductions, ecosystem discussion, industry foresight news | announcement, newcomer, hall, general, news |
| 5 | Useful tools | tools |
Open-source project recommendations, AI image generation/editing tools, workflow sharing, troubleshooting help | tool, open source, workflow, workflow, software, troubleshooting |
| 6 | Creative exchange | creative-exchange |
Exchange of experience in painting/writing/video creation, sharing of publication-grade bilingual prompts | creation, prompts, prompt, experience, exchange, art style |
| 7 | Operations and Monetization | operations |
Practical guidance on launching and operating self-media accounts, traffic-pushing algorithms, commercial advertising and monetization case studies | operations, monetization, account launch, traffic pushing, product promotion, business, making money |
| 8 | Practical Works and Viral Hits | showcase |
Showcasing finished videos, showcasing image-text posts, breakdowns of viral hits, community mutual commenting and liking | viral hits, works, practical, image sharing, finished videos, cases, breakdown |
| 9 | Hand-drawn skill | handraw-skill |
Dedicated discussion and official updates for HandRaw Skill (art style library, layout library, prompt engineering) | skill, hand-drawn, skills, plugin, art style library, gallery |
🛠️ Operation Guide and Core Publishing Modes
The underlying script supports direct execution in the repository root directory or the Skill directory:
scripts/discourse_client.py or skills/community-share/scripts/discourse_client.py。
1. Account Binding and Credential Management (Authentication)
- Check the currently logged-in account:
python scripts/discourse_client.py whoami - Bind and log in using an API Key (recommended mode):
python scripts/discourse_client.py login --api-key <your_api_key> - Log in using username/email + password:
python scripts/discourse_client.py login --username <user> --password <pass> - Log out and clear the local cache:
python scripts/discourse_client.py logout
2. Mode 1: Style Gallery and Static Asset Publishing to the Cloud (Static Gallery Deploy)
When the style gallery webpage (gallery/*.html), art style data (styles.json) or image assets (images/) are updated, deploy and sync them to the tencent-vm cloud server and CDN with one click.
- One-click incremental deployment to the cloud:
(equivalent topython scripts/discourse_client.py deploypython scripts/sync_to_static.py --deploy) - Deploy while committing and pushing to the GitHub handraw-static repository:
python scripts/discourse_client.py deploy --git - Deploy and automatically publish a version update announcement in the forum's "Hand-drawn skill" section:
python scripts/discourse_client.py deploy --announce
[!TIP] Deployed online access addresses:
- Style gallery homepage:https://handraw-style.com/gallery/index.html
- Prompt assembler:https://handraw-style.com/gallery/tutorials.html
- Self-built asset gallery:https://handraw-style.com/gallery/assets.html
- Core style data:https://static.handraw-style.com/data/styles.json
3. Mode 2: Generic Posting Across All Sections (Generic Post)
Suitable for publishing any discussions, long-form tutorials, tool reviews, industry analyses, or requests for help, supporting plain text or mixed image-text.
python scripts/discourse_client.py post \
--title "【工具推荐】这个手绘风批量导出插件大幅提升出图效率" \
--category "好用的工具" \
--content "今天给大家分享一个非常实用的批量切图与转 WebP 格式的脚本..." \
--image "path/to/screenshot.png" \
--tags "工具,工作流,分享"
- Read the body text from a local Markdown file:
The body content can be passed in
@文件路径:python scripts/discourse_client.py post \ --title "【运营干货】小红书手绘风起号 7 天破万粉复盘" \ --category "运营与变现" \ --content "@path/to/post_review.md" \ --tags "运营,小红书,复盘"
4. Mode 3: Hand-drawn Style Publication-Grade Works and Prompt Sharing (Artwork & Prompts Share)
Designed specifically for the hand-drawn style gallery, automatically uploading local artworks directly to object storage and formatting and outputting a publication-grade community card containing [Art Style ID], [Theme Colors], [Creator Profile], and [Bilingual Prompt Code Block].
python scripts/discourse_client.py share \
--image "path/to/images/poster-demo-autumn-equinox.webp" \
--prompt "秋分节气手绘海报,暖秋落叶与静谧庭院,水彩手绘质感,极简构图与柔和光影,中英双语设计排版。A minimalist autumn watercolor illustration featuring golden falling leaves, a serene traditional courtyard, warm sunlight, clean layout, hand-drawn aesthetic, high resolution." \
--title "【秋分节气手绘海报】暖秋意象与落叶 · 完整出版级提示词分享" \
--category "创作交流" \
--style "048" \
--style-name "极简儿童绘本水彩" \
--color "C-05" \
--notes "通过 HandRaw Style Studio API Key 一键测试发布,包含完整高清配图与双语生图提示词。"
5. Mode 4: Replies and Discussion Interaction (Topic Reply)
Supports posting comments, follow-up questions, or supplementary explanations to a specified topic:
python scripts/discourse_client.py reply \
--topic-id 38 \
--content "亲测这个提示词在 DALL-E 3 上效果非常稳定,建议采样时把光影参数调柔和一些!" \
--image "path/to/test_result.png"
6. Post Asset Management (Post Management)
- View the list of all forum sections:
python scripts/discourse_client.py categories - View the list of posts I have published (real-time statistics on views, likes, replies):
python scripts/discourse_client.py my-posts [--limit 15] - Delete my posts:
python scripts/discourse_client.py delete --topic-id <topic_id>
⚠️ Key Technical Details and Protocol Pitfall Avoidance Guide
- Chinese Username Header Encoding Trap (Latin-1 Crash):
- Python's standard library
http.clientonly allowslatin-1range characters when handling HTTP Headers. - When the username is non-ASCII Chinese (e.g.,
@小旺旺),never append to the request headerApi-Username。 - Discourse supports authentication directly with a User API Key; simply pass
Api-Key: <key>, and the server will automatically bind the corresponding creator identity.
- Python's standard library
- Image Upload Protocol Specification:
- Endpoint:
POST /uploads.json - Content-Type:
multipart/form-data - Required fields:
type="composer",synchronous="true",file=<二进制流>。 - On success, returns
short_url(e.g.,upload://xxx.webp), and the Discourse frontend will automatically render it as a high-definition view with Lightbox zoom.
- Endpoint:
- Static Deployment Incremental Safety Mechanism:
- Automatically skips
individual_backupand other historical directories, syncing only the 367 valid art styles and custom assets. - After upload, automatically triggers Nginx symlink completion (
ln -sfn), ensuringimg.handraw-style.com、static.handraw-style.comtakes effect immediately with the main site.
- Automatically skips
- Discourse Permission Control Rules:
- Title length: must be $\ge 5$ characters.
- Post deletion permissions: regular users (TL1) can freely delete their own replies (
DELETE /posts/{id}.json); however, deleting the topic's main post (first floor) is controlled by the forum system's management permissions, and if users are not configured to be allowed to delete topics, the forum will return422/403prompting to contact the administrator.