SuperAPI AI Directory

pdfcraft-cli

Office & productivity

View repository

Updated 11-04 23:01

About this skill

Native tool contract

First use list/describe to obtain the real schema; accept specific operations separately, and do not infer that a feature has passed from the tool's existence.

Controlled development pre-release. Python 3.11+; fixed 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 current distribution capability.

Set SKILL_DIR to the directory of this file 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 an independent 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 can specify an offline fixed 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 executed or whose results are unclear cannot be replayed by changing the directory or runId. Read-only reconciliation does not start native editing. Old/corrupt receipts are refused for recovery, and the originals are retained for investigation.

Explicitly register the files or directories to be protected with --input , and check 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; existing user authorization is reused directly, and authorization is re-determined only when adding original-file overwrite, real printing, or going beyond the output scope. Native processes may write files, access the network, or use system resources.

Zero exit only reaches REVIEW_REQUIRED. You must check the explicit manifest, size/digest, reopening in a new process, per-page text and geometry, and then complete the visual review bound to the current digest. Unknown or partial results are not automatically replayed; revisions are not automatically looped. Forms, redaction, signatures, PDF/A, and OCR each have their acceptance status recorded separately.

Secret fields include password/passwd/secret/token/api_key/credential; public receipts are redacted, private execution materials have permissions 0600, and they are cleaned up afterward. Avoid putting secrets in file names or unrelated ordinary fields. Task directories may still contain sensitive PDFs and should be cleaned up by the user according to the retention policy.

Chinese scan recognition: the explicit optional Tesseract backend is described in Chinese OCR contract. Native 0.2.1 still only has English; this path generates a rasterized new copy, so first verify the output policy and backend identity.

See contract 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; specific contracts printcraft-cli. If other skills are needed, install them by name:npx skills add full-aigc-skills/pdfcraft-skills --skill <技能名>。