Batch shipping
Skill goshippo/ai/providers/codex/plugin/skills/batch-shipping
Shippo's AI distribution surfaces: Agent Skills + plugins for Claude Code, OpenAI Codex, ClawHub, and the Claude apps.
npx -y skills add goshippo/ai --skill batch-shippingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Process bulk shipments from CSV files, create and purchase batch labels, and generate end-of-day manifests via the Shippo API
SKILL.md
5.5 KB, as published. Nobody here has run it
Batch Shipping
Purchases Are Live
Batch purchases charge the authorized Shippo account for real. Before PurchaseBatch, show the shipment count, carrier/service, and estimated total cost, and require explicit user confirmation.
Purchase Confirmation Gate
Before every call to PurchaseBatch, summarize the following and ask the user for explicit confirmation:
- Total number of shipments to be purchased
- Carrier and service level (or selection rule if varied)
- Estimated total cost
- Number of domestic vs international shipments
Do not proceed without explicit user confirmation.
CSV Batch Processing
See shippo/references/csv-format.md for the column specification.
- Read and parse the CSV. Validate required columns are present. Report row count.
- Validate each row for non-empty required fields. Report invalid rows with reasons.
- Detect international rows (sender_country != recipient_country). Create customs declarations for those rows. See
shippo/references/customs-guide.md. Use correct customs enum values:RETURN_MERCHANDISE(notRETURN) for returned goods,HUMANITARIAN_DONATION(notHUMANITARIAN) for charitable donations. - Build the
batch_shipmentsarray with inline address and parcel objects per row. - Call
CreateBatchwith the array. - Poll
GetBatchuntil status isVALIDorINVALID. See Polling Intervals below. - If the status is
INVALID, some batch shipments failed validation: see "Fixing an INVALID batch" below, fix them, and re-poll untilVALID. Report per-shipment failures either way before proceeding. - Confirm purchase (see Purchase Confirmation Gate above).
- Call
PurchaseBatchto buy labels for all valid shipments. - Poll
GetBatchuntil status changes fromPURCHASINGtoPURCHASED. See Polling Intervals below. - Report: total attempted, succeeded, failed. For successes: tracking_number and label_url (complete URL). For failures: error messages.
Retrieving batch labels
A purchased batch does not put each label URL inline on the batch object. Each entry in batch_shipments[] carries a transaction field, which is a Transaction object_id. Call GetTransaction on it to get that shipment's label_url and tracking_number. The batch-level label_url is a merged multi-label PDF (up to 100 labels per file) and cannot be split per order.
Batch Size Guidance
For batches over 500 shipments, consider splitting into multiple batches. Large batches take longer to validate and purchase, and a single failure can be harder to diagnose.
Polling Intervals
- For batches under 100 shipments: poll every 3-5 seconds.
- For batches with 100+ shipments: poll every 5-10 seconds.
- Report progress to the user every 30 seconds.
- Stop after 60 retries and suggest the user check back later using
GetBatchwith the batch object_id.
Batch with Rate Shopping
- Call
CreateShipmentper shipment to get rate quotes (see Rate Shopping). - Present rates. User picks a service level rule (e.g., "cheapest for each" or a specific carrier/service).
- Build
batch_shipmentswithservicelevel_tokenper item. - Create, validate, confirm purchase, purchase, report as above.
Managing an Existing Batch
- Add shipments:
AddShipmentsToBatch(before purchase only). Note: adding an invalid shipment will change the entire batch status toINVALID. Check per-shipment statuses after adding. - Remove shipments:
RemoveShipmentsFromBatch(before purchase only).
Fixing an INVALID batch
If GetBatch returns status INVALID, one or more batch shipments failed validation and the batch cannot be purchased until they are fixed.
- Find the failures. Call
GetBatchwithobject_results=creation_failedto return only the failed shipments (paginate with?page=if there are many), or read eachbatch_shipments[].status(VALID/INVALID/INCOMPLETE/TRANSACTION_FAILED) and itsmessagesfor the reason. The batch-levelerrorsarray collects the same per-shipment failures in one place. - Fix them, either:
- Remove:
RemoveShipmentsFromBatchwith the failed batch-shipmentobject_ids (frombatch_shipments[].object_id, not the shipment object_id) to drop them, or - Correct and re-add:
AddShipmentsToBatchwith corrected shipment objects (fixed address, parcel, or servicelevel).
- Remove:
- Re-poll
GetBatchuntil status isVALID. - Then confirm purchase (see Purchase Confirmation Gate) and
PurchaseBatch.
End-of-Day Manifest
- Collect:
carrier_account(object_id),shipment_date(YYYY-MM-DD, default today),address_from(pickup address). - Optionally collect specific transaction object_ids to scope the manifest. You must pass specific transaction object_ids -- there is no auto-include for a date range.
- Call
CreateManifest. - Poll
GetManifestuntil status isSUCCESSorERROR. - Return the manifest PDF URL(s) and shipment count.
Quick Reference
CSV batch:
Parse CSV -> CreateCustomsDeclaration (international rows) -> CreateBatch -> poll GetBatch -> confirm -> PurchaseBatch -> poll GetBatch
Manifest:
CreateManifest (with transaction object_ids) -> poll GetManifest