SuperAPI AI Directory

designcraft-data-merge-badges

Design & creation

View repository

Updated 11-02 01:06

About this skill

CSV batch badges

Suitable for 90×54 mm badges with one template and one page per record. Native coordinates use points; multiply millimeters by 72/25.4. The input CSV requires unique, case-sensitive Name and Role columns, in UTF-8 or UTF-8 BOM; preserve commas inside quotes and full text, and do not overwrite the CSV. Other columns do not go into the badge. The current executor supports 1 to 200 single-line fields; operate on existing projects using a copy, and do not run new-document examples that overwrite user documents.

First readactual method、original template recipe、current command evidenceandGitHub source. The recipe contains fixed synthetic data; actual execution must use user-authorized data.

  1. First review the fields, record count, output location, and print dimensions. When copying fonts into Document Fonts next to the task project, retain the license; this skill does not install system fonts.
  2. For Chinese-language tasks, first usefont sourcethe provided fixed summary to obtain Noto fonts. Save a blank template, then reopen it to load Document Fonts; create fields afterward. file.new resets the font environment, so you cannot create a new document after loading fonts.
  3. data.source.select actually selects the data source; data.fields only lists fields. Insert Name/Role separately into empty stories with data.placeholder.add; do not leave the NAME/ROLE example text after the fields.
  4. text.select uses UTF-8 byte positions, not character counts. data.preview records start at 1; compare complete fields one by one with story.get, check overflow with document.inspect, and check missing glyphs with preflight.run.
  5. If a 22pt name overflows, preview again at 18pt and 14pt; do not go smaller, truncate, or automatically rename. If it still overflows, glyphs are missing, or another error occurs, stop and keep the draft for the user to confirm re-layout.
  6. data.preview.stop restores the original fields; verify the stories still contain placeholders, then save the editable template. data.merge generates a new document; verify actual records/pages, missing images, and overflow; do not treat a template preview as the complete merge result.
  7. Save the merged project and PDF; reopen in a new process, verify the title, name, and full role text page by page along with preflight, and generate per-page PNGs for viewing. By default, do not generate multi-up imposition or crop marks; verify delivery specifications separately for production printing.

Executable entry point

For English with built-in fonts covering the input:python3 <本技能目录>/scripts/build_badges.py --cli <designcraft-cli> --csv <输入.csv> --output-dir <不存在的输出目录>。

Chinese: firstpython3 <本技能目录>/scripts/fetch_font.py --directory <任务字体目录>, call the above entry point with the returned fontFile and add--font-file <字体路径>. If retrieval fails, stop; do not record output with missing glyphs as success. You may also pass in fonts you have usage rights to and--font-family, but still perform a real preflight. Keep fonts and licenses only in the task directory; do not rely on sibling skill directories or global installation.

Output includes the editable template, merged project, PDF, per-page PNGs, and check results; on failure, drafts and diagnostic files may remain and must not be delivered as passing. Commands use argv, and stdout is ASCII-escaped JSON to preserve Chinese paths on Windows.

Same-screen MCP

Hand off to the designcraft-editor skill, installed separately:npx skills add full-aigc-skills/designcraft-skills --skill designcraft-editorIn the same session, read the actual schemas such as execute/inspect_document/get_story, bind the real return values step by step, and then preview, stop, merge, and save; native $N or manual $ref cannot be passed directly to MCP. Separately opening a CLI to modify files does not prove that the current editor is synchronized. Native font loading also does not automatically prove that the Web runtime supports the same font path. The currently built-in Web runtime is availableLXGW WenKai, and after confirmation via font.list and preflight checks, after exiting preview you can use font.replace to replace the sample font with it, then preview and merge one by one; brand-specified fonts must not be silently replaced. If a saved Web project needs to be reopened via CLI, followWeb font recordto obtain the same font and license and place them into Document Fonts; missing glyphs or font-substitution results must not be passed off as consistent.

This skill belongs to the development pre-release scenario; the current verification status of the CLI, Windows, and the target host is subject to the accompanying records. The badge is layout content, not access-control authentication or an identity credential.