Register the --input original and save as a copy; page numbers start at 1, and coordinates and rotation follow the tool Schema. Even if the page count is correct, you must still verify order, page boxes, and truncation.
Controlled development pre-release. Python 3.11+; pinned distribution printcraft-cli 0.2.1, only the macOS arm64 lock has been verified. The entry point remains printcraft; do not treat research's new PdfCraft interface as a capability of the current release.
Set SKILL_DIR to the directory of this file as actually loaded by the host. All scripts and references are distributed with this skill and do not depend on sibling directories; at runtime, place them in a separate user data directory.
python3 -I -B "$SKILL_DIR/scripts/bootstrap.py" --diagnose
# 仅已有安装授权时:
python3 -I -B "$SKILL_DIR/scripts/bootstrap.py" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" list --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" describe doc_open --runtime-home "$RUNTIME_DIR"
--archive may specify an offline pinned ZIP, and all digests are still verified; PATH is not modified.cli.py -- tools may install on first use and cannot be called a read-only installation diagnostic.
Plan format:{"domain":"printcraft","steps":[{"command":"实际工具名","params":{}}]}. Check the Schema before filling in parameters.
python3 -I -B "$SKILL_DIR/scripts/commands.py" check "$PLAN" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" run "$PLAN" --output "$NEW_TASK_DIR" --expect "$OUTPUTS" --input "$ORIGINAL_PDF" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" status "$NEW_TASK_DIR/receipt.json"
python3 -I -B "$SKILL_DIR/scripts/commands.py" reconcile "$NEW_TASK_DIR/receipt.json"
python3 -I -B "$SKILL_DIR/scripts/commands.py" verify "$VERIFY_REQUEST" --runtime-home "$RUNTIME_DIR"
The output directory must be brand new; runId is only for tracking and does not guarantee exactly-once. Tasks that have already run or whose results are unknown cannot be replayed by changing the directory or runId. Read-only reconciliation does not start native editing. Old or corrupted receipts are refused for recovery; retain the original for investigation.
Explicitly --input register files or directories that need protection, and check their digests before and after execution; paths not registered in the parameters are not covered by this check, and this is not a sandbox. Prefer editing a working copy; reuse existing user authorization directly, and re-determine authorization only when newly adding original-file overwrite, real printing, or output beyond the authorized scope. Native processes may write files, access the network, or use system resources.
A zero exit only reaches REVIEW_REQUIRED. You must check the explicit manifest, size/digests, reopening in a new process, page-by-page text and geometry, and then complete the visual review bound to the current digest. Unknown or partial results are not automatically replayed; do not automatically loop revisions. Record acceptance status separately for forms, redaction, signatures, PDF/A, and OCR.
Secret fields include password/passwd/secret/token/api_key/credential; public receipts are redacted, private execution materials have permissions 0600, and are cleaned up afterward. Avoid putting secrets in file names or unrelated ordinary fields. The task directory may still contain sensitive PDFs and should be cleaned up by the user according to the retention policy.
Chinese scan recognition: for the explicit optional Tesseract backend, see Chinese OCR contract. Native 0.2.1 still only supports English; that path generates a rasterized new copy, so first verify the output policy and backend identity.
See contracts and boundaries、success/failure/rejection cases。
Routing: general tasks pdfcraft-use; environment printcraft-cli-setup; checks pdfcraft-cli-inspect; pages pdfcraft-cli-pages; batch recovery pdfcraft-cli-automation; specialized contracts printcraft-cli. If other skills are needed, install them by name:npx skills add full-aigc-skills/pdfcraft-skills --skill <技能名>。