# Github Xhs Promo Card

> GitHub Xiaohongshu Promo Card

- Skill: `harzva/github-xhs-promo-card` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add harzva/github-xhs-promo-card`
- Raw SKILL.md: https://api.skillmd.com/api/skills/harzva/github-xhs-promo-card/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: harzva (https://skillmd.com/u/harzva)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/harzva/github-xhs-promo-card

---


# GitHub Xiaohongshu Promo Card

Use this skill when the user wants to promote one or more GitHub repositories with:

- horizontal README promo images;
- vertical Xiaohongshu images;
- Xiaohongshu note copy;
- MCP publication;
- local publication records.

## Workflow

1. Confirm target repositories and promotion angle.
2. Read the target README and repo facts before writing claims.
3. Generate horizontal README card assets under a repo-owned path such as `docs/readme-assets/`.
4. Generate vertical Xiaohongshu cards under the local media workspace, usually `D:\study\code\0ai\产品\09-wemedia\xiaohongshu\<campaign>/images/`.
5. Add horizontal cards to each GitHub README near the first viewport.
6. Commit and push README/image changes before publishing social notes.
7. Publish the Xiaohongshu note through `xiaohongshu_mcp.publish_content` when logged in.
8. Write a local publication record:
   - `<campaign>/note.md`
   - `published-notes.jsonl`

## Visual Direction

Default style: bright GitHub/open-source infographic card.

Follow `references/visual-style.md`.
For layout failure prevention, also follow `references/layout-safety-gate.md`.

Core traits:

- warm off-white background;
- bold black Chinese headline;
- gradient repository name;
- rounded feature cards;
- blue/green/yellow/pink/purple accents;
- small abstract document/agent icon;
- neon ring or progress halo;
- GitHub repo callout at the bottom for vertical cards.

## Image Generation Guardrails

Before generating any promo image, include explicit layout constraints in the image prompt:

- no decorative underline, stroke, glow, icon, ring, or divider may overlap text;
- underline strokes must sit below the headline baseline with clear vertical padding;
- every text box must have enough inner padding and may use shorter wording instead of shrinking below readability;
- feature-card titles and body lines must stay inside their cards;
- if a claim is too long for the layout, shorten the copy before generating the image.

After generation, inspect the image before using it in README or Xiaohongshu:

- reject if any text is clipped, crowded, or outside its rounded card;
- reject if the yellow underline crosses through Chinese or English glyphs;
- reject if small proof panels have stacked text that touches borders;
- reject if the visual hierarchy makes the repo name or headline hard to read.

When a generated asset fails this gate, regenerate with shorter text and more whitespace. Do not patch the README with a failing image.

## Public Safety

Do not publish raw terminal logs, credentials, cookies, tokens, private paths, account files, raw memory stores, or unredacted audit files.

Public evidence should be summarized and sanitized.

## Output Contract

For each promoted repository, provide:

- README image path;
- Xiaohongshu image path;
- README commit hash if committed;
- Xiaohongshu publish status and PostID if returned;
- local record path.

## MCP Publishing

Use `mcp__xiaohongshu_mcp.check_login_status` first.

Use `mcp__xiaohongshu_mcp.publish_content` with:

- `title`: <= 20 Chinese characters or English words;
- `content`: no hash tags in body;
- `tags`: list of topics;
- `images`: local absolute image paths;
- `is_original`: true when original assets/copy were generated;
- `visibility`: usually `公开可见` unless the user says otherwise.

If MCP returns an empty PostID, record `PostID: 空` and optionally search later.

