Users provide the directory (or specified document) where the copy to be rendered is located. The Skill will complete the following steps: Select Template → Locate Document → Create Working Directory → LLM Designs blocks.json and xhs-copy → Render to Images and Write Supporting Copy.
-
Select Template (Interact with User First): List available templates and ask the user to select one. Proceed only after user confirmation.
- Available templates: ing-minimal, ing-notion, ing-skillshare (Ing brand); minimal, notion, skillshare (share brand)
- Example prompt: "Available templates: ing-minimal (Ing brand minimalist, recommended), ing-notion (Ing grid-style knowledge vibe), ing-skillshare (Ing skill sharing style); minimal, notion, skillshare are the same styles under the share brand. Which one would you like to use?" → Record the user's reply and use in subsequent steps.
-
Locate Document:
- User specifies the copy directory (e.g.,
Agent-skills-share/daily-posts/YYYY-MM-DD-<skill-name>
) or a specific file
- Priority Order: Read the one specified by the user; default to if not specified
- If user says "render draft" → read ; if user says "render final" or no specification → read ; if other file is specified (e.g., ) → read that document
-
Create Working Directory:
python .cursor/skills/xhs-render/scripts/get_output_dir.py <copy-directory> --source <source>
- source: Use if user specifies draft, if user specifies other custom documents, otherwise
- Output directory:
<copy-directory>/xhs-render/from-{source}-v{N}/
(e.g., , )
-
LLM Designs blocks.json and xhs-copy (Produce in One Go):
- Read the located document
- Role: You are a Xiaohongshu image layout expert, skilled in rearranging long copy into a visual structure that is "rhythmic and impactful". Strictly avoid copying the original text verbatim — you must re-refine, abbreviate, and rephrase based on on-screen readability.
- Task: Extract core information from the document, design a set of image layouts (blocks.json) and supporting post copy (xhs-copy)
- Rigid Constraints for blocks.json:
- Cover: Text must not exceed 2 lines (approximately 20 characters), only include golden sentences or key selling points; must include the name of the Skill being promoted (e.g., find-skills), which can be integrated into the title or text
- Text per block: Recommended 150–200 characters; multiple key points per page must be separated by double line breaks (), otherwise they will be squeezed into one paragraph and bullet points cannot be distinguished; use short sentences, line breaks, and front-load keywords to make the layout substantial
- Chatty block: If there are Agent chatty remarks or review content, the word count can be appropriately increased (60–100 characters) for more expressive content
- Ending block: Include thanks to the developer, formatted as:
Treasure Developer: owner/repo
+ Portal: https://skills.sh/...
, can add chatty remarks; do not include installation commands; installation commands should be written in the xhs-copy
- Prohibited: 1:1 mapping of the document's 【】sections to blocks; directly copying section names into titles (rewrite creatively instead); placing installation commands in images
- The number of images, title/text/emoji for each block are determined by your professional judgment; the number of pages can be more or less as long as the design is good and all necessary content is included. Avoid repeating titles and emojis within the same image. Do not generate images for pure hashtags
- xhs-copy: Supporting post copy matched with the images, XHS-ready plain text — no , , ; can be directly copied to Xiaohongshu. Use for links. Must include the installation command (npx skills add ...). No hashtags (users can select them when publishing)
- Output: Write to
<output-directory>/blocks.json
and <output-directory>/xhs-copy.md
-
Render:
python .cursor/skills/xhs-render/scripts/render_images.py <output-directory>/blocks.json -t <user-selected-template> -o <output-directory>
json
[
{"index": 1, "total": N, "text": "...", "title": "...", "role": "cover", "emoji": "✨"},
{"index": i, "total": N, "text": "...", "title": "", "role": "content", "emoji": ""},
{"index": N, "total": N, "text": "...", "title": "", "role": "ending", "emoji": "📌"}
]
Design Constraints (Must be followed when designing with LLM): Cover text ≤ 2 lines and must include the Skill name; multiple key points separated by
; ending block includes thanks to developer, no installation commands; number of pages can be flexible
Pure hashtag pages are automatically skipped, no page numbers.
When rendering fails, handle according to error messages: Missing Python → Prompt installation; Missing html2image →
Ask user if they want to install, if agreed, run
and retry; Pip installation failure → Prompt possible version conflict; Other errors → Explain based on the error message. No pre-checks are performed.
Scripts, templates, and reference documents are all located in this directory.