跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

sn-image-resume

Generates a designed portfolio-resume image from resume content provided in conversation text. Extracts optional style instructions, converts the resume into a fixed portfolio-resume layout prompt, and generates the final image through sn-image-base. Use when user asks to create "resume image", "portfolio resume", "简历图", "简历海报", or "个人简历视觉设计".

文档与办公5.7kskills/sn-image-resume/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/opensensenova/sensenova-skills/sn-image-resume/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

sn-image-resume

Resume image generation scene skill (tier 1), relying on the sn-text-optimize and sn-image-generate tools provided by sn-image-base (tier 0).

Features:

  • Accepts resume content directly from conversational text
  • Supports optional user-provided style direction
  • Applies the fixed portfolio-resume layout rules in prompts/resume.md
  • Generates a tall designed resume image through sn-image-generate

Non-goals

  • Editing or polishing a plain text resume document without generating an image
  • Parsing uploaded resume files as the primary input format
  • Creating a conventional single-column ATS resume
  • Guaranteeing exact preservation of every long paragraph when the image layout requires compression

Input Specification

ParameterTypeDefault ValueDescription
resume_contentstringRequiredResume text provided by the user in conversation, including name, profile, education, experience, skills, projects, contact details, etc.
stylestringOptionalUser-specified visual style, tone, color palette, profession aesthetic, or reference mood. May be embedded in resume_content.
aspect_ratiostring9:16Output aspect ratio. Allowed values: 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 1:1, 16:9, 9:16, 21:9, 9:21. Default is 9:16 (vertical) because the template is a tall stacked portfolio-resume page.
image_sizestring2kImage size preset, 1k or 2k.
output_modestringfriendlyOutput mode: friendly or verbose.

API Configuration

All API calls in this skill are executed through the sn_agent_runner.py of the sn-image-base skill, with authentication parameters using default values (CLI > environment variables > built-in defaults), so they do not need to be passed explicitly in normal use.

Call TypeToolAuthentication ParametersDescription
LLMsn-text-optimizeDefault reads SN_TEXT_API_KEY -> SN_CHAT_API_KEY -> SN_API_KEYConverts user resume text into a detailed image generation prompt using prompts/resume.md as the system prompt
Image Generationsn-image-generateDefault reads SN_IMAGE_GEN_API_KEY -> SN_API_KEYGenerates the final resume image

If all capabilities use the same gateway, configure only:

SN_BASE_URL="https://your-api-endpoint.com/v1"
SN_API_KEY="your-api-key"

When encountering MissingApiKeyError or needing to specify a model: pass parameters explicitly via CLI. See $SN_IMAGE_BASE/references/api_spec.md.

$SN_IMAGE_BASE path explanation: $SN_IMAGE_BASE is the installation directory of the sn-image-base skill (SKILL.md exists). The agent can locate this path by skill name sn-image-base.

Architecture: Main Agent + Worker Agent

This skill uses a two-tier agent architecture:

RoleResponsibility
Main AgentReceive user request, normalize parameters, send preflight, start Worker, collect result, and send final text/image to user
Worker AgentExecute prompt generation and image generation, then return structured JSON

Responsibility Boundaries:

  • Worker Agent does not send any messages to the user directly, only returns structured JSON
  • Main Agent is responsible for all user-visible messages
  • Worker Agent's last message must be and only be the JSON string defined in the Return Contract
  • Worker Agent's low-level API calls execute directly through sn-image-base, without spawning nested subagents

Workflow

Main Agent Workflow

  1. Extract resume_content, optional style, aspect_ratio (default 9:16), image_size (default 2k), and output_mode (default friendly) from the user request
  2. Validate that resume_content is non-empty and contains enough resume information to generate a meaningful page
  3. Validate aspect_ratio against the allowed values: 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 1:1, 16:9, 9:16, 21:9, 9:21. If the user-provided value is not in this list, inform the user and fall back to the default 9:16
  4. Send uniform preflight message: "Using sn-image-resume skill to generate a resume image, please wait..."
  5. Start Worker Agent, passing in complete parameters and working directory
  6. When Worker Agent returns:
    • status=ok: send a short summary and the generated image
    • status=error: report the real error field content to the user

Worker Agent Workflow

Worker Agent receives resume_content, style, aspect_ratio, image_size, output_mode, and the working directory of this skill (SKILL_DIR).

Step 0 — Initialization
  1. Generate task_id using timestamp format YYYYMMDD_HHMMSS
  2. Create temporary directory: /tmp/openclaw/sn-image-resume/<task_id>/ as TEMP_DIR
  3. Persist normalized inputs:
echo "$RESUME_CONTENT" > "$TEMP_DIR/resume-content.txt"
echo "$STYLE" > "$TEMP_DIR/style.txt"
Step 1 — Resume Prompt Generation

Use prompts/resume.md as the system prompt and call sn-text-optimize to convert the user resume content into a detailed image generation prompt.

USER_PROMPT=$(cat << EOF
Resume content:
$RESUME_CONTENT

Optional style instruction:
${STYLE:-No explicit style instruction. Infer an appropriate professional visual style from the resume content.}

Task:
Convert the resume content into a complete text-to-image prompt for a tall portfolio-resume image.
Follow the fixed layout, language, content mapping, typography, panel, and style translation rules in the system prompt.
Return only the final image generation prompt. Do not include explanations, markdown fences, or alternative options.
EOF
)

python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \
  --system-prompt-path "$SKILL_DIR/prompts/resume.md" \
  --user-prompt "$USER_PROMPT" \
  --output-format json

Parse JSON stdout and extract result as generation_prompt. If the process exits non-zero, returns invalid JSON, or result is empty, return status=error with the actual error.

Persist output:

echo "$GENERATION_PROMPT" > "$TEMP_DIR/generation-prompt.txt"
Step 2 — Resume Image Generation

Generate the final image using sn-image-base's sn-image-generate tool.

python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-generate \
  --prompt "$GENERATION_PROMPT" \
  --image-size "$IMAGE_SIZE" \
  --aspect-ratio "$ASPECT_RATIO" \
  --save-path "$TEMP_DIR/resume.png" \
  --output-format json

Parse JSON stdout. If generation fails, return status=error with the actual error. The generated image path is $TEMP_DIR/resume.png.

Error Handling Rules

  • If required resume content is missing, ask the user to provide resume text before starting generation
  • If sn-text-optimize fails or returns an empty result, stop and report the real error
  • If sn-image-generate fails, stop and report the real error
  • Do not silently substitute a generic resume prompt when user content is incomplete or prompt generation fails
  • Do not invent factual resume details that the user did not provide; only reorganize, condense, and visually map provided information

Return Contract

After Worker Agent completes, its last message must be and only be the following JSON string (bare JSON, no code fences, no preceding or trailing text).

Normal Flow:

{
  "status": "ok",
  "need_main_agent_send": true,
  "output_mode": "friendly|verbose",
  "image": "$TEMP_DIR/resume.png",
  "generation_prompt": "<included only when output_mode=verbose>",
  "timing": {
    "total_elapsed_seconds": 25.12,
    "prompt_generation": { "elapsed_seconds": 5.23, "model": "sensenova-6.8-flash-lite" },
    "image_generation": { "elapsed_seconds": 19.89, "model": "sn_image_model" }
  }
}

Error Flow:

{
  "status": "error",
  "error": "<Actual error information>"
}

Rules:

  • status=ok must contain need_main_agent_send: true
  • generation_prompt must contain when output_mode=verbose; omit it in friendly mode
  • timing.prompt_generation.elapsed_seconds and timing.prompt_generation.model are read from sn-text-optimize JSON output
  • timing.image_generation.elapsed_seconds is read from sn-image-generate JSON output
  • timing.image_generation.model is fixed to "sn_image_model" because sn-image-generate does not return a model field

Output Format

friendly mode (default)

Text Summary: one sentence describing that the resume image has been generated, no more than 50 words.

Image: send the single generated resume image.

verbose mode

Resume image generated
---
Aspect ratio: <aspect_ratio>
Image size: <image_size>
---
Generation prompt:
<generation_prompt>
---
Time statistics: Total <total>s | Prompt generation <t>s | Image generation <t>s
---
Image:
<image path>

Call Relationship

  • Bottom-level dependency: sn-image-base → sn-text-optimize, sn-image-generate
  • System prompt: prompts/resume.md

References

  • prompts/resume.md - Fixed portfolio-resume layout and language/content mapping rules
  • ../sn-image-base/SKILL.md - Base-layer image/text tool behavior
  • ../sn-image-base/references/api_spec.md - CLI parameter details

相似的 Skill

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

文档与办公

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

文档与办公

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

文档与办公

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

文档与办公

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

文档与办公

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

文档与办公