bpost-label
Build bpost parcel orders (guest or signed-in on parcel.bpost.be) from a Shopify order or an address pasted in chat, stop for review, then hand back the bpost basket link or a MultiSafepay checkout link. Use when the user asks for bpost labels/orders, to ship a Shopify order with bpost, to quote bpost parcel prices, or to turn an address into a payable bpost cart without paying inside the agent.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/c1sc0c0--starterslabo-bpost)HTML
<a href="/listings/c1sc0c0--starterslabo-bpost"><img src="/api/listings/c1sc0c0--starterslabo-bpost/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Clone this repo **as the skill folder** (`SKILL.md` at the root):
# Cursor — this project git clone https://github.com/c1sc0c0/starterslabo-bpost.git .cursor/skills/starterslabo-bpost # Cursor — all projects git clone https://github.com/c1sc0c0/starterslabo-bpost.git ~/.cursor/skills/starterslabo-bpost # Claude Code — this project git clone https://github.com/c1sc0c0/starterslabo-bpost.git .claude/skills/starterslabo-bpost
Start a new agent chat so the skill is picked up. The skill id in `SKILL.md` is **`bpost-label`** (the repo is `starterslabo-bpost`, following the other skill repos). No packaging step, no third-party Python packages — stdlib only, Python 3.10+.
cd .cursor/skills/starterslabo-bpost # or ~/.cursor/skills/starterslabo-bpost cp sender.example.yaml sender.yaml $EDITOR sender.yaml # the return address printed on every label
Credentials for the signed-in mode live in the **macOS Keychain**:
security add-generic-password -s scout_bpost -a email -w 'you@example.com' -U security add-generic-password -s scout_bpost -a password -w 'your-bpost-password' -U python3 .cursor/skills/starterslabo-bpost/scripts/bpost_order.py login # signs in, stores cookies python3 .cursor/skills/starterslabo-bpost/scripts/bpost_order.py whoami # check it is still valid
`login` writes `.bpost-session` (mode 600, gitignored). On first login it also finishes bpost's account-type registration as **private**, which removes the "Voor mezelf / Voor mijn bedrijf" modal that otherwise covers the cart.
Skip all of that and everything still works as a guest — you just lose the plain basket URL.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 133 lines
- ---
- name: bpost-label
- description: >-
- Build bpost parcel orders (guest or signed-in on parcel.bpost.be) from a
- Shopify order or an address pasted in chat, stop for review, then
- hand back the bpost basket link or a MultiSafepay checkout link. Use when the
- user asks for bpost labels/orders, to ship a Shopify order with bpost, to
- quote bpost parcel prices, or to turn an address into a payable bpost cart
- without paying inside the agent.
- ---
- # bpost — orders from a Shopify order or a pasted address
- Unofficial. Not affiliated with bpost. Chrome/agent side: no bpost login is required for the guest
- flow; the signed-in flow uses Keychain credentials.
- **The skill never pays.** It builds the cart, stops, and hands the human a bpost basket link (signed in)
- or a hosted checkout link (on request).
- ## Workflow
- ```
- Progress:
- - [ ] 1. Get the shipment source: Shopify order number, or the address pasted in chat
- - [ ] 2. Quote (no writes)
- - [ ] 3. Dry run (real draft, real price, deleted again; guest order, cart untouched)
- - [ ] 4. Create -> prints REVIEW, nothing payable
- - [ ] 5. Hand over https://parcel.bpost.be/nl/basket (signed in) or a seeded tab (guest)
- - [ ] 6. `pay <id>` only if a portable link is explicitly wanted
- ```
- **Step 5 is the default handoff, not step 6.** With a session the order sits on the account's
- `order-in-progress`, so the plain basket URL works on any device. Only mint a MultiSafepay link when the
- human asks for a URL (phone, another device, later).
- ## Addresses pasted in chat
- Pass the text through `--to`, verbatim, commas or newlines, and add the weight:
- ```bash
- python3 scripts/bpost_order.py \
- --to "Jane Doe, Beispielweg 5, 67655 Kaiserslautern, Germany" --weight 9.52
- ```
- The parser takes the postcode line as zip+city, the line with a house number as street (+ `bus`/`box`),
- matches the country name against bpost's catalog (nl/en/fr/de), and treats the remainder as the name.
- Belgian addresses get canonicalised via bpost's proofing API (`--no-normalize` to skip). If the paste is
- ambiguous, echo the parsed plan back to the human before creating anything.
- Ask for anything missing: weight (required), delivery type (defaults to pickup point in BE), and the
- email for tracking.
- ## Shopify orders
- ```bash
- python3 scripts/bpost_order.py --shopify 1002 --split line
- ```
- `--split line` = one parcel per line item (matches one label per carton), `--split single` = whole order
- in one parcel. Quote both when the order has several cartons; the gap is real (2 cartons to DE: €33.00
- vs €42.20). Weight comes from the line items, so never ask for it.
- ## Commands
- | Command | Effect |
- |---|---|
- | `create` (default) | build the order, print REVIEW, **nothing payable** |
- | `create --quote` | price only, nothing created |
- | `create --dry-run` | draft order, real price, then deleted (forced to a guest order) |
- | `pay <orderId>` | mint the hosted checkout link |
- | `open <orderId>` | write a printable HTML mirror of the basket |
- | `review <orderId>` | read-only re-print |
- | `login` / `whoami` | Keychain sign-in / session check |
- ## Setup
- Once per machine:
- ```bash
- cp sender.example.yaml sender.yaml # return address
- security add-generic-password -s scout_bpost -a email -w 'you@example.com' -U
- security add-generic-password -s scout_bpost -a password -w '…' -U
- python3 scripts/bpost_order.py login
- ```
- `login` posts the bpost Ping form, follows the OAuth callback, stores `parcel.bpost.be` cookies in
- `.bpost-session` (mode 600, gitignored) and completes the account-type registration as **private** when
- bpost reports it incomplete — without that, a "Voor mezelf / Voor mijn bedrijf" modal covers the cart.
- If bpost asks for a one-time code, `login` prompts on stdin: run it in a terminal, not from the agent.
- Never print the password or the cookie. No `-w` echo, no `cat .bpost-session`, no logs.
- ## Delivery and weight
- | `--delivery` | Recipient gets | Notes |
- |---|---|---|
- | `pickup` (default) | pickup point near their postcode | domestic only |
- | `address` | home delivery | required for non-BE |
- | `locker` | bpost Bbox | domestic only |
- `--pickup "EIERMARKT"` or a point id narrows the choice; otherwise the nearest point is used and printed
- in the plan so the human can veto it before anything is created.
- WARRANTY (insurance, €1.55/parcel, cover up to €500) is **on by default for Belgian parcels** —
- `--no-insurance` opts out. bpost does not offer it abroad: international parcels are built uninsured
- with a note, and an explicit `--insurance` for a non-BE destination is an error.
- Weight bands: 0-2 / 2-5 / 5-10 / 10-20 / 20-30 kg (`DOM_*` domestic, `INT_*` international). Over 30 kg
- is rejected — split the parcel or use the `order-ship-mode` skill. The product line is the cheapest one
- that supports country + destination + band (`--product-line` overrides); international ECONOMY is often
- limited to 0-2 kg.
- ## Guardrails
- - Quote, then dry run, then create. A created order is a real (unpaid) bpost order that expires.
- - Do not mint a payment link unless the human asked (`pay` or `--pay-link`).
- - Never open, pay, shorten or re-host the payment link. Never drive the payment page.
- - If the cart is emptied in the browser, bpost keeps an empty `order-in-progress` that shadows new
- orders; `create` deletes it first — do not "fix" it by creating more orders.
- - Recipient email is the customer's; bpost sends them tracking from it.
- ## Troubleshooting
- | Symptom | Cause | Fix |
- |---|---|---|
- | cart empty in the browser | signed into another bpost account, or an older session | `whoami`, compare email; re-run `login` |
- | "Voor mezelf / Voor mijn bedrijf" modal | account registration incomplete | re-run `login` (it completes it as private) |
- | new order not in the cart | stale empty in-progress order | `create` clears it; otherwise delete the empty order |
- | `bpost login failed: We didn't recognize…` | wrong Keychain password | update the Keychain item |
- | session rejected, commands continue as guest | expired session | `python3 … login` |
- Files: [README.md](README.md) (usage) · [reference.md](reference.md) (API map) ·
- `sender.yaml` (return address) · `records/` (order JSON + review sheets).
README.md · README · 137 lines
- # bpost — parcel orders from a Shopify order or a pasted address
- Unofficial. Not affiliated with bpost.
- Builds a bpost **Verzendplatform** cart (guest or signed in), stops before payment, and gives you
- either the bpost basket link or a MultiSafepay checkout link. Written for a small Belgian shop's daily shipping.
- The skill **never pays** and never sees card data: the money step happens on bpost's own payment screen
- or on the hosted checkout page the payment link opens.
- ## Why it is built this way
- `parcel.bpost.be` is an Angular SPA. The cart lives server-side under an `orderId`, but the SPA only
- reads that id from `sessionStorage`. A guest cart therefore has **no shareable URL** — `/nl/basket`,
- `/nl/basket/<id>`, `/nl/order/<id>`, `/nl/checkout/<id>`, `/nl/pay?orderId=` all fail (verified).
- Signed in, the cart is the account's `order-in-progress`, so `https://parcel.bpost.be/nl/basket` just
- works — laptop, phone, anywhere. That is the recommended mode. Details and the full API map:
- [reference.md](reference.md).
- ## Install
- Clone this repo **as the skill folder** (`SKILL.md` at the root):
- ```bash
- # Cursor — this project
- git clone https://github.com/c1sc0c0/starterslabo-bpost.git .cursor/skills/starterslabo-bpost
- # Cursor — all projects
- git clone https://github.com/c1sc0c0/starterslabo-bpost.git ~/.cursor/skills/starterslabo-bpost
- # Claude Code — this project
- git clone https://github.com/c1sc0c0/starterslabo-bpost.git .claude/skills/starterslabo-bpost
- ```
- Start a new agent chat so the skill is picked up. The skill id in `SKILL.md` is **`bpost-label`** (the
- repo is `starterslabo-bpost`, following the other skill repos). No packaging step, no third-party Python
- packages — stdlib only, Python 3.10+.
- ```bash
- cd .cursor/skills/starterslabo-bpost # or ~/.cursor/skills/starterslabo-bpost
- cp sender.example.yaml sender.yaml
- $EDITOR sender.yaml # the return address printed on every label
- ```
- Credentials for the signed-in mode live in the **macOS Keychain**:
- ```bash
- security add-generic-password -s scout_bpost -a email -w 'you@example.com' -U
- security add-generic-password -s scout_bpost -a password -w 'your-bpost-password' -U
- python3 .cursor/skills/starterslabo-bpost/scripts/bpost_order.py login # signs in, stores cookies
- python3 .cursor/skills/starterslabo-bpost/scripts/bpost_order.py whoami # check it is still valid
- ```
- `login` writes `.bpost-session` (mode 600, gitignored). On first login it also finishes bpost's
- account-type registration as **private**, which removes the "Voor mezelf / Voor mijn bedrijf" modal
- that otherwise covers the cart.
- Skip all of that and everything still works as a guest — you just lose the plain basket URL.
- ## Quickstart
- ```bash
- B=.cursor/skills/starterslabo-bpost/scripts/bpost_order.py
- # price only (no order created)
- python3 $B --shopify 1002 --quote
- # create the order, stop before payment
- python3 $B --shopify 1002 --split line
- # same, from an address pasted straight out of a chat or a webshop
- python3 $B --to "Jane Doe, Beispielweg 5, 67655 Kaiserslautern, Germany" --weight 9.52
- # hand over a checkout link only when a URL is actually needed
- python3 $B pay orderId-…
- # review sheet (printable HTML mirror of the bpost basket)
- python3 $B open orderId-…
- ```
- ## Address paste
- Any of these work — commas, newlines, or both:
- ```
- Jane Doe
- Beispielweg 5
- 67655 Kaiserslautern
- Germany
- ```
- ```
- Jan Peeters, Voorbeeldstraat 51 bus 3, 2000 Antwerpen, België
- ```
- The parser finds the postcode line, the street + house number (including `bus`/`box`/`bte`), the country
- (full names in nl/en/fr/de, resolved against bpost's own country catalog), and treats what is left as
- the name. Belgian addresses are then canonicalised through bpost's address proofing API.
- Weight is required with `--to` (`--weight 9.52`, kg). Delivery type defaults to pickup point for
- Belgian addresses; use `--delivery address` or `--delivery locker`.
- Belgian parcels get bpost's WARRANTY cover **by default** (€1.55 per parcel, up to €500 of goods), because
- an uninsured parcel is the expensive mistake. `--no-insurance` opts out. bpost does not offer the option
- abroad, so international shipments are built uninsured with a one-line note; forcing `--insurance` there
- is an error rather than a silent no-op.
- ## Commands
- | Command | What it does |
- |---|---|
- | `--shopify 1002` | build from a Shopify order (`--split line` = parcel per carton, `--split single` = one parcel) |
- | `--to "<address>"` | build from a pasted address |
- | `--json file.json` | build from a batch file |
- | `--insurance` / `--no-insurance` | WARRANTY cover — **on by default for Belgian parcels**, +€1.55, up to €500; `--no-insurance` to opt out |
- | `--quote` | price only, nothing created |
- | `--dry-run` | real draft, real price, then deleted (guest order, never touches your cart) |
- | `pay <id>` | mint the MultiSafepay checkout link |
- | `open <id>` | write `review-<id>.html`, a printable mirror of the basket |
- | `review <id>` | print the order as bpost has it |
- | `login` / `whoami` | keychain sign-in, session check |
- Records land in `records/<orderId>.json` next to the skill (gitignored); override with
- `BPOST_OUTPUT_DIR` or `output_dir:` in `config.yaml`.
- ## Notes
- - Shopify access: set `SHOPIFY_SHOP` and `SHOPIFY_ADMIN_TOKEN`, or store an admin token in Keychain
- under `SHOPIFY_KEYCHAIN_SERVICE` (default `scout_shopify`, accounts `api` or `client_id` +
- `client_secret`).
- - `--guest` forces an anonymous cart, `--cookie` overrides the session for one run,
- `BPOST_SESSION` / `--keychain-service` point somewhere else.
- - Emptying the cart in the browser leaves an empty in-progress order behind; `create` clears it first,
- because bpost keeps pointing at it otherwise.
- - See [SKILL.md](SKILL.md) for the agent workflow and guardrails, [reference.md](reference.md) for the
- reverse-engineered API.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.