Long article publishing follows a multi-step workflow using cdp_publish.py to handle templates and layout.
Step 1: Fill content and apply layout
Run the command to prepare the article. This will output a list of available templates in a TEMPLATES: [...] JSON array.
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\cdp_publish.py" long-article --title-file title.txt --content-file content.txt
Note: You can optionally add images using --images img1.jpg img2.jpg.
Step 2: Select a template
Choose a template name from the list provided in Step 1:
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\cdp_publish.py" select-template --name "Template Name"
Step 3: Fill the final description
After selecting a template, fill the final description field. If the content exceeds 1000 words, it should be compressed to approximately 800 words.
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\cdp_publish.py" click-next-step --content-file content.txt
Step 4: Click Publish
Once you have previewed the content in the browser, execute the final publish command:
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\cdp_publish.py" click-publish
python "C:\Users\admin\AI\.claude\skills\post-to-xhs\scripts\cdp_publish.py" long-article --title-file title.txt --content-file content.txt