Professional Portrait Card
Turn one authorized source portrait into either a clean business headshot or a professional profile card with deterministic typography. Deliver an actual image unless the user explicitly asks only for a prompt.
Route the request
- Use
portrait-onlywhen the user wants a clean headshot without text. - Use
profile-cardwhen the user wants a name, title, organization, department, or similar display information. - Use
prompt-onlyonly when the user explicitly asks for a reusable prompt instead of an image. - Treat a mention of Xiaohongshu, Douyin, LinkedIn, or another platform as output context, not permission to publish there.
Do not describe the result as a passport photo, government ID photo, credential, license, or proof of employment. This skill makes presentation imagery, not official documents.
Required inputs
Require one readable portrait that the user is authorized to use. If no source portrait is available, ask the user to attach it rather than inventing a person.
For profile-card, collect only the fields the user wants displayed:
- display name;
- job title or professional role;
- organization, department, specialty, or affiliation;
- output language, only when a translation or transliteration is wanted;
- requested aspect ratio or pixel dimensions, if any.
Never infer a real employer, title, qualification, or affiliation. Preserve a person's name exactly as supplied. Translate a title only when requested. For an organization, use the user's official English name or keep the original; do not fabricate an official translation. If a name needs romanization and no accepted spelling is given, ask for that spelling.
Workflow
- Inspect the source portrait before editing. Check that the face is visible enough for the requested crop and that the image is not already an official identity document.
- Lock the requested mode, fields, language, and geometry. If geometry is unspecified, use the source-inspired default of 1080 x 1920 pixels with a 24% lower information panel for
profile-card. Treat this as a design default, not a current platform requirement. - Read references/design-contract.md before generating or editing the portrait. Read references/quality-and-safety.md for any third-party portrait, public posting request, translation, credential-like use, or final QA.
- Create the portrait layer first, with no letters, logos, badges, seals, or information panel. Use the available image-editing tool with the source portrait as the identity reference. Preserve facial proportions, face shape, age cues, skin tone, distinctive features, and overall identity as closely as the tool permits.
- Inspect the portrait layer. Reject or regenerate visible identity drift, extra accessories, altered age or ethnicity, waxy skin, malformed hands or clothing, incorrect crop, text artifacts, and background defects.
- For
portrait-only, export the verified portrait and stop. Forprofile-card, add the information panel withscripts/compose_profile_card.py; do not ask an image model to draw the final text. - Compare every rendered character against the approved fields. Confirm left alignment, three-level hierarchy, safe margins, no clipping, no unintended translation, and readable contrast.
- Open the final image and inspect it at full size. Confirm exact pixel dimensions, decodability, portrait clarity, panel containment, and absence of unnecessary EXIF or GPS metadata.
- Deliver the final local image. Optionally deliver the clean portrait layer when the user may need to update the text later. Do not upload source portraits, generated portraits, or personal metadata to GitHub.
Deterministic card composition
Use the helper after the clean portrait exists:
python3 scripts/compose_profile_card.py portrait-clean.png business-profile-card.png \
--name "Alex Chen" \
--title "Product Operations Lead" \
--organization "Northstar Studio" \
--width 1080 \
--height 1920 \
--panel-ratio 0.24 \
--report qa.json
The helper preserves the input file, strips inherited image metadata, creates a solid white lower panel, fits one to three left-aligned lines within bounded margins, and fails instead of producing unreadably small or overflowing text. Use --font and --font-bold when the requested language needs a font not available by default.
The JSON report contains dimensions, character counts, font sizes, and bounding boxes, not raw display strings, filenames, image hashes, text hashes, or biometric descriptors. It does not prove that the portrait preserved identity or that the visible text is correct; those remain visual checks.
Default visual direction
Unless the user gives another direction:
- centered head-and-shoulders or mid-shot composition;
- soft gray-to-white studio gradient;
- soft, even, low-contrast light and natural skin texture;
- dark business jacket with a white or light shirt; tie optional;
- calm, natural, confident expression;
- white information panel, approximately 24% of total height;
- name in dark blue, supporting lines in near-black, all left aligned.
Defaults are configurable. User-provided brand colors, attire, background, crop, and language override them when safe and technically feasible.
Failure behavior
- If the portrait source is missing, unreadable, too small for a meaningful edit, or not authorized, stop and state what is needed.
- If the editing tool cannot use the source image as a reference, do not generate a lookalike from text alone.
- If a requested string cannot fit above the readable minimum, return the layout error and ask to shorten it, enlarge the panel, or increase the canvas width.
- If image generation is unavailable, report the blocked image step. Do not silently return prose unless the user requested
prompt-only. - If current platform compliance is requested, verify the current official specification before claiming compliance; a local dimension check is not platform approval.
Boundaries
- Keep the original image unchanged and write new files.
- Do not create face databases, identity scores, or persistent biometric profiles.
- Do not add false uniforms, credentials, company marks, seals, badges, or qualifications.
- Do not claim exact biometric identity preservation; report it as a best-effort visual constraint.
- Do not claim that the image will go viral, win clients, pass platform review, or make money.
- Generating an image is not authorization to publish it, impersonate someone, or represent an employment relationship.
Completion evidence
Report these states separately:
- portrait layer generated and visually checked;
- information card composed and text checked;
- final file decoded and dimensions verified;
- platform publication, if separately authorized and actually completed;
- commercial outcome, only when independently evidenced.
Local generation, GitHub publication of this Skill, likes, inquiries, orders, receivables, and money received are different states. Never promote one state into another without evidence.