SuperAPI AI Directory

pdfcraft-cli-inspect

Office & productivity

View repository

Updated 11-04 23:01

About this skill

PDF read-only inspection

Inspect content via info/text in a new process; empty-text classification requires OCR or visual confirmation. When modification is needed, hand off to the page or specialized entry point.

Controlled development pre-release. Python 3.11+; pinned distribution printcraft-cli 0.2.1, only the macOS arm64 lock is verified. The entry point remains printcraft; do not treat research's PdfCraft new 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, still verifying all digests; does not modify PATH.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 executed or whose results are unknown cannot be replayed by changing directories or runId. Read-only reconciliation does not start native editing. Old/corrupt receipts are refused for recovery; keep the originals for investigation.

Explicitly --input register files or directories to protect and detect digests before and after execution; paths not registered in parameters are not covered by this check, and this is not a sandbox. Prefer editing working copies; existing user authorization is reused directly, and authorization is re-determined only for newly added overwriting of originals, real printing, or exceeding 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; no automatic revision loops. Forms, redaction, signatures, PDF/A, and OCR each record acceptance status separately.

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. Task directories may still contain sensitive PDFs and should be cleaned up by the user according to retention policy.

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

See contract and boundaries、success/failure/refusal cases。

Routing: general tasks pdfcraft-use; environment printcraft-cli-setup; inspection pdfcraft-cli-inspect; pages pdfcraft-cli-pages; batch recovery pdfcraft-cli-automation; specialized contracts printcraft-cli. If other skills are needed, install by name:npx skills add full-aigc-skills/pdfcraft-skills --skill <技能名>。