First readFields, calculations, and command instructions. This skill draws on a fixed GitHub dynamic line-item workflow; the native operations and calculations are original adaptations, with sources inSource records。
Prepare the data for this session
According toExample structureprepare the data provided by the user, replacing all fictional entities and items. Quotation number, quotation date, quoting party, customer, currency, pricing basis, validity period, delivery terms, and line items are required; do not infer the user's name, prices, or tax rates from the example. Quantity supports only positive integers, and unit price uses a decimal string with at most two decimal places. Whether tax is included and the delivery scope must be explicitly provided by the user; the script does not automatically add tax, discounts, currency conversion, or charges.
The line amount is quantity multiplied by unit price, and the total is the sum of the line amounts. An expected_total may be provided to verify the total given by the user; if inconsistent, stop and do not modify unit prices to make the total match. Calculations do not use binary floating point.
This skill directory and CLI
Resolve SKILL_DIR as the actual directory of this skill currently loaded, and use actual paths for input and output; the script and template are both inside this skill, with no need to install other skill sources.
python3 "$SKILL_DIR/scripts/quotation.py" --input /path/to/quote.json --output /path/to/new-steps.json
python3 "$SKILL_DIR/scripts/quotation.py" --input /path/to/quote.json --output /path/to/new-steps.json --save /path/to/new-quote.docx --pdf /path/to/new-quote.pdf --cli /path/to/wordcraft-cli
If an existing CLI is needed, first check its version and actual commands, and do not install automatically. By default, only generate the steps plan; --save executes in the same native CLI process, then exports PDF. All outputs must not already exist and must be distinct from one another, and inputs are preserved; an output command plan is not proof of successful delivery. Line items are limited to 1 to 40 rows, a single line item description must not exceed 80 characters, text must not contain tabs or newlines, overly long command lines are explicitly rejected, and rows are not silently deleted. Long text and multi-page results must be checked separately.
MCP shared editor
Use the real tool schema of the installed WordCraft plugin to open the same editor. Confirm it is a new empty document; save any existing document first, and do not overwrite the whole document. If the current backend provides execute, call the compiled steps one by one in order:execute {"command":step.command,"params":step.params}. These values come from the script; do not pass step variables as-is into the tool.
First query the command catalog to verify that the commands and parameters exist. Use the current tool schema's create, save, get_text, and page rendering capabilities to verify the result; if the supported scope differs, clearly report the gap. Do not modify the file with an independent CLI and then claim the editor memory is synchronized. This scenario has been executed in a real Codex isolated host for two Chinese quotations, and the body text, tables, and local price changes were all synchronized to the same embedded page; saving DOCX/PDF and reopening for verification passed. This result does not cover other hosts or all complex inputs.
Acceptance and delivery
- Verify the user's items, quantities, unit prices, amounts, and currency line by line; the total must be recalculable, and no charges beyond the input may be added.
- The DOCX must be a native table, with 4 columns, the number of line items plus the header and the total row, not a screenshot; the header repeats across pages, and each row's description and amount must not be split across pages; within the A4 body, the column widths are 250/45/75/81pt, and numeric columns are explicitly right-aligned. After reopening, read the text, tables, and each row's keep-together page property.
- Render all pages and review for missing Chinese glyphs, overflow, truncated item descriptions, line breaks, and amount alignment. A PDF preview cannot replace verification of the DOCX editable structure.
- Deliver the DOCX and PDF that actually exist and have been checked, explaining the amount basis, the content pending business confirmation, and the host/platform verifications that have not been completed. READY_FOR_REVIEW only means that the field and calculation checks have passed; it does not mean that the quote has been approved or business-confirmed.
Two Chinese quotes have currently been generated with the official macOS 0.7.0 CLI, checking the DOCX native 4×4 tables, the exact total of 2740.80, one-page rendering, and Chinese display; both macOS and Windows check the amounts, line-break prohibition, and column widths with a regular quote, a small-amount precision case, and a 20-item Chinese long-detail case, with the long-detail output spanning two pages; on a real Codex host, additionally verify two quotes, changing prices in three cells, and saving and reopening. Other hosts, all user assets, and in-host pagination of 20 items have not yet been accepted.