SuperAPI AI Directory

designcraft-cli-export

Design & creation

View repository

Updated 11-02 01:06

About this skill

Layout Export

Candidate implementation; actual host, native installation, and authoring acceptance are not yet complete. macOS arm64 and Python 3.11+ only.

Routing Scope

Only export an existing DesignCraft project to a user-specified format and location; creating new or making wholesale revisions is delegated to designcraft-use(Install: npx skills add full-aigc-skills/designcraft-skills --skill designcraft-use), and reopening and saving the project is delegated to designcraft-cli-document(Install: npx skills add full-aigc-skills/designcraft-skills --skill designcraft-cli-document). Export creates files; before starting, confirm the source project, target format, output location, and overwrite scope. On failure or UNKNOWN, check the files already generated; do not automatically replay the export. Acceptance checks file identity, format, page count/dimensions, and actual content; record format losses for PDF, IDML, EPUB, and images separately; zero exit does not equal visual or editability acceptance.

When to Use

Use when the user has provided an openable DesignCraft project and explicitly requests output as PDF, images, IDML, or EPUB. Project revision, reopen checks, and full-document layout requests are each handed off to the corresponding skill.

Out of Scope and Safety Boundaries

  • Do not assume formats supported by research source code or local development branches are supported by the fixed CLI; use the real directory as the authority.
  • Do not overwrite existing output unless the user authorizes it; after a failure, first check whether a valid file already exists.
  • Read and write the source project and target directory with the current user's permissions. The input summary cannot prevent side effects from unregistered paths within parameters.
  • Export format conversion may lose editing capability or semantics; state verified losses and keep unknown items unknown.

Workflow

Step 1: Verify the Source Project

Confirm the project path, current summary, page count, target format, and whether a working copy should first be saved separately.

Step 2: Query Format Capabilities

Confirm supported export operations and parameters from the fixed CLI's real command directory; do not execute using research source code or offline directories.

Step 3: Confirm Output Scope

Record the target path, file type, overwrite authorization, expected page count/dimensions, and content the user requires to be preserved.

Step 4: Execute and Verify Files

After exporting, check that files exist, along with their summaries, formats, and page counts/dimensions; on failure or UNKNOWN, read the receipt and do not automatically replay.

Step 5: Explain Losses and Review

Check key text, linked assets, and visual results; record the measured losses and unverified items for that format separately. An internal PDF/X check is not external certification.

Rules (Execution Constraints)

  • An exported file's existence does not mean the page content is correct; perform content checks according to the format.
  • A successful export does not prove the source project saves or reopens successfully.
  • Report only verification bound to the current artifact summary; do not reuse old export reviews.

Gotchas (Common Misconceptions)

  1. Old export records may be stale: re-verify after the source project or inputs change.
  2. Success in one format does not prove other formats work: accept each format separately.
  3. Zero exit does not prove the file is complete: check byte size, summary, and expected content.
  4. Image preview dimensions are not document page count: check the corresponding dimension according to the export type.
  5. An internal PDF/X check is not certification: do not claim externally that certification was passed.

First use

Set SKILL_DIR to the absolute directory where the host actually loaded this SKILL.md. The skill can be installed independently into the project .agents/skills, the user skills directory, or the plugin cache; do not guess sibling directories, and do not modify skill files. When the user request has authorized the necessary dependencies, the public cli.py automatically verifies and installs the pinned native version into the user data directory; do not use sudo, and do not modify PATH.

: "${SKILL_DIR:?设置为本技能真实加载目录}"
python3 -I -B "$SKILL_DIR/scripts/cli.py" -- commands

When only an install check is needed:

python3 -I -B "$SKILL_DIR/scripts/bootstrap.py"
python3 -I -B "$SKILL_DIR/scripts/cli.py" -- --version

--runtime-home or CRAFT_RUNTIME_HOME to specify an isolated runtime directory, placed before -- . --archive points to an existing pinned ZIP, and still verifies the archive and binary digests. If installation fails, return dependencySetup, and do not automatically retry editing or rendering; if verification fails, keep the existing directory. The current lock only pins the native CLI; the release snapshot and host auto-discovery still require separate verification.

Current scenario

First record the user's assets, goals, output location, dimensions/page count/format, and modification boundaries. Query the real parameters from the native directory, confirm the command, and then execute; do not invent commands, and do not treat new interfaces in local source code as supported by the pinned artifacts. The asset paths and output locations in the examples below must be replaced with the paths actually authorized for the current task.

python3 -I -B "$SKILL_DIR/scripts/cli.py" -- run --in /absolute/path/input.designcraft --export /absolute/path/output.pdf

Deliver the native .designcraft project, the collected asset and font license inventory, page-by-page previews, and applicable PDF/IDML/EPUB. Reopen the native project to check page count, text, and linked assets; record interchange format losses separately.

CLI parameters are passed via argv, without executing a shell. Native commands may have file-writing and network behavior; use them only within the scope authorized by the task. If execution fails, first check the project and output; do not replay writes for unknown results. For output to the same path, protect existing files first. A command query or zero exit does not mean delivery passes: check the actual files, save and reopen, and verify the content and the post-modification results, while separately recording the creative review. Runtime and skill installation, host skill discovery, and model natural-language selection are gates that are verified separately.

For the structured artifact inventory fields, reopen verification records, and status meanings, see this skill's references/artifact-manifest.md. Use scripts/artifact_manifest.py to validate the inventory and local files;NOT_RUN indicates that only artifact identity was checked and cannot serve as evidence of AV-02 reopen passing, nor can it mark the task as complete.

When the identifiable structure of export files needs to be checked separately, use scripts/format_probe.py --file <绝对路径>; for format check coverage and PASS/PARTIAL boundaries, see references/format-checks.md. Probe results are not acceptance of visuals, content, editability, loss, or native support.

For page-by-page preview review records and the pinned rubric, see references/page-review.md. Only after AV-02 project reopen passes, use scripts/page_review.py to validate the page-by-page preview summary, review sources, and independent conclusions; the validator binds records and does not replace actual review of pages by a person or vision model.

For page/object/Story local revisions, the affected page closure, and post-revision export identity re-verification, see references/revision-evidence.md;scripts/revision_evidence.py to validate the consistency of the two rounds of AV-02/AV-03 evidence, the normalized object snapshots, and the authorization statements. It does not perform native editing, nor does it prove that these statements actually occurred; the real CLI directory and creative acceptance still need to be completed separately.

Scenario examples

For this skill's existing-project export success path and the recovery boundaries for warnings/unknown results, see scenario examples、PDF check、IDML round-tripandunknown export result. The examples only illustrate the process and do not prove that the pinned native CLI has passed acceptance.

Required reading before execution

Before executing the command plan, checkpoint recovery, or delivery verification, you must read this skill's execution and acceptance details, and operate according to its input preservation, UNKNOWN, receipt, and format verification requirements. A summary can only detect changes; it cannot isolate or roll back writes. Unknown results must not be automatically replayed.