Install
$ agentstack add skill-phanghonghao-thu-awesome-skills-reflection2xhs ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Reflection2XHS
Overview
Use this skill when the user wants to turn a local reflection markdown file into a one-page study-note-style poster image. Prefer Markdown over PDF because this workflow depends on semantic structure rather than fixed page layout.
Workflow
- Read the local reflection markdown file.
- Extract:
- title
- subtitle / topic line
- 3 to 6 key takeaways
- technical highlights
- one bottom-line summary sentence
- Build a stable poster prompt for image generation.
- Generate the poster image with the built-in image generation capability by default.
- Only use the local OpenAI image API path as an explicit fallback if the user asks for script-only generation and provides their own
OPENAI_API_KEY. - Save:
- extracted summary json
- prompt text
- generated image in the source file's sibling
*_xhsfolder
Script
Use [scripts/reflectiontoxhs.py](scripts/reflectiontoxhs.py).
Preview prompt only:
python "C:\Users\20174\.codex\skills\reflection2xhs\scripts\reflection_to_xhs.py" --input "D:\Desktop_Files\World_Model\papers\20_locomotion\AMP\AMP_reflection.MD"
Generate prompt locally, then use built-in image generation:
python "C:\Users\20174\.codex\skills\reflection2xhs\scripts\reflection_to_xhs.py" --input "D:\Desktop_Files\World_Model\papers\20_locomotion\AMP\AMP_reflection.MD"
The generated prompt.txt is then used by the assistant's built-in image generation flow.
When the assistant uses built-in image generation, it should still place the final poster image into the same local output folder as the extracted artifacts, typically:
_xhs/summary.json_xhs/prompt.txt_xhs/poster.png
If needed, the local script can also finalize this step by copying the most recent Codex-generated PNG into the output folder:
python "C:\Users\20174\.codex\skills\reflection2xhs\scripts\reflection_to_xhs.py" --input "D:\Desktop_Files\World_Model\papers\20_locomotion\AMP\AMP_reflection.MD" --copy-latest-codex-image
Script-only image generation fallback:
$env:OPENAI_API_KEY="your_api_key"
python "C:\Users\20174\.codex\skills\reflection2xhs\scripts\reflection_to_xhs.py" --input "D:\Desktop_Files\World_Model\papers\20_locomotion\AMP\AMP_reflection.MD" --generate
Notes
- Prefer the built-in image generation capability after Markdown extraction.
- Use the user's own
OPENAI_API_KEYonly for the script-only fallback path. - Default model is
gpt-image-1. - Prefer Markdown over PDF. Use PDF only as fallback when Markdown is unavailable.
- Final image output should not remain only under the Codex generated-images cache; copy it into the source markdown's local
*_xhsoutput folder. - This skill generates a poster prompt and image workflow. It does not preserve the original page layout pixel-for-pixel.
HTML Poster Layout Rules
When generating HTML posters (preferred over AI image generation for text-heavy content):
- Content-driven sizing: Do NOT hardcode A4 height (
height: 297mm). Usewidth: 210mmonly; let height be determined by actual content. Noheight: 100%on page container. - No forced flex stretch: Do NOT use
flex: 1orjustify-content: centeron section cards — this creates uncomfortable empty interiors. Cards should be content-determined. - Line-spacing fill: Use generous
line-height(1.7–1.85) to distribute content evenly. Line-height has an upper limit — never exceed 1.85 just to fill space. - Two-column grid: Use
display: grid; grid-template-columns: 1fr 1frfor the body. Avoidalign-items: stretchif it forces card height beyond content. - No bottom gap: Bottom section should have
margin-top: 0to avoid dead space between content and footer. - No brand keywords in image prompts: Never use "Xiaohongshu" or similar brand names in AI image generation prompts to avoid unwanted watermarks/logos.
- Section extraction: Support both
## N. title(markdown headers) andN. title(plain numbered) section formats. - Natural rhythm: Padding, font sizes, and spacing should create a comfortable reading rhythm. Don't force elements to fill space that content doesn't naturally occupy.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: phanghonghao
- Source: phanghonghao/THU-Awesome-Skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.