Before executing the specific method, read Craft scenario commands and parameters, and execute according to the object selection, session, input replacement, and result checking within.
Task Starting Point
First read the materials, confirm the delivery purpose, target size or duration, modification scope, and required format. Details that can be determined from the task and materials should directly adopt reasonable defaults; only ask about missing conditions that would change the result.
When a visible editor is needed, hand it over to the pdfcraft-editor skill. Standalone installation:npx skills add full-aigc-skills/pdfcraft-skills --skill pdfcraft-editor. The currently added skill is a local candidate; before release, use the local companion plugin, and do not treat this installation command as proof of release.
Execution Steps
- Inventory the input page count, orientation, and encryption status, and determine the target page order.
- Establish a mapping by source page number, and perform merging or splitting.
- Correct the orientation, preserving the original page size or clearly defining a unified rule.
- After saving, verify the content and page order page by page.
Tool Implementation
The upstream tool name belongs to PdfCraft. doc_open/doc_create return a doc handle; subsequent doc_info, doc_save, and page_render use the same doc. PDF page numbers start from 1, and parameters are subject to the actual schema.
First read the actual tool schema, then fill in the parameters; use the returned values for object or document IDs. The queried commands must be available in the current backend. Before saving, choose a new output path and preserve the input. If the required algorithm, format, or command does not exist, explain the gap; do not pass off a similar name as the real thing.
Result Checking
- The page count matches the mapping table.
- Blank pages, landscape pages, and attachments are not accidentally lost.
- Deliver the new PDF and the source page mapping.
Check the actual content against the user's goal, not just the process exit code. For local edits, inspect local details; for layout tasks, inspect the full page; for time-based media, inspect the start, end, and key segments. For abnormal results, first check the current project to avoid repeatedly performing irreversible operations.
Delivery
Return the editable project, the actual derived files, and a brief explanation: what modifications were made, which steps were not executed due to current capabilities, and what requires the user's judgment. List only files that actually exist and have been checked. If the user subsequently reworks it, read this source project and make local modifications, preserving the content that has already been accepted.