Customs seed
Add reference/code-table values or generate realistic sample operational data (manifests, SAD declarations with items, valuation notes, tax lines, payments) for the Sydonia Toolkit customs model, respecting every foreign key and the natural-key insert pattern. Use when the user wants more seed data, test declarations or manifests, demo data, or additional countries / tax types / HS codes / offices in the customs schema.From its SKILL.md
npx -y skills add FrancoisChastel/sydonia-toolkit --skill customs-seedAssembled 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.
SKILL.md
3.6 KB, 796 tokens by cl100k_base, as published. Nobody here has run it
Customs seed
Two jobs: extend the reference tables with more code values, and generate operational sample data (declarations, manifests) that inserts cleanly.
When to use
"Add a country / currency / tax type / HS code / office"; "generate N sample declarations / manifests"; "give me demo data with 2–4 items each". If the schema is not loaded yet, use customs-schema-setup first.
Golden rules
- Insert into the
asycudaschema: begin scripts withSET search_path TO asycuda, public;inside aBEGIN … COMMIT;transaction. - Use natural-key subselects, never hard-coded surrogate ids — this is how
examples/e2e.sqlstays order-independent:(SELECT id FROM ref_country WHERE iso_alpha2 = 'CN') - Respect UNIQUE business codes — every
ref_*row andtrader.tin,bill_of_lading.bl_reference,receipt.receipt_number, etc. must be unique. - Keep it balanced — for a declaration, the per-item
tax_amounts should reconcile to thepayment.amountandreceipt.total_amount(as in the e2e).
Adding reference values
Insert into the relevant ref_* table. Provenance still matters:
- If the value comes from the referenced standard/source, note it
(
-- src: S008for a transport mode, ISO code, etc.). - If it is an illustrative sample you chose, note
-- inferred sample. - Standard code lists (ISO 3166/4217, HS, UN/LOCODE) are seeded as representative samples, not exhaustive catalogues — say so.
See reference/patterns.sql for copy-paste templates.
Generating a declaration
Follow the e2e ordering so foreign keys resolve:
trader(+trader_role) for any new parties,sys_userif needed.- (optional)
manifest→bill_of_lading→container→manifest_cargo_item. declaration(header) →declaration_item(lines).valuation_note+item_value_note(apportion freight/insurance to item CIF).declaration_tax_lineper item per tax (base · rate · amount).declaration_attached_document,declaration_previous_document(write-off).declaration_status_historytransitions;selectivity_result+inspection_actif not GREEN;payment+receipt; finalUPDATE declaration SET status_id = released.
The bundled reference/patterns.sql has a minimal but complete declaration
template you can duplicate and vary (different HS codes, item counts, values,
lane). Change the trader_reference / registration_number for each new one so
they stay unique.
Verify after seeding
Re-run the balance check (or the customs-validate skill):
SET search_path TO asycuda, public;
SELECT d.registration_number,
(SELECT sum(tl.tax_amount) FROM declaration_item di
JOIN declaration_tax_line tl ON tl.declaration_item_id = di.id
WHERE di.declaration_id = d.id) AS assessed,
(SELECT sum(amount) FROM payment WHERE declaration_id = d.id) AS paid
FROM declaration d;
Don't
- Don't invent real trader identities or real TINs — use obviously-synthetic names/ids for sample data.
- Don't disable constraints to force a load — if an insert fails, fix the data.
What ships with it: 1 file
7.0 KB alongside SKILL.md
reference/
- patterns.sql7.0 KB
Gives 0 of the 12 instructions most finance skills give in 796 tokens
Counted across 469 of the 469 authors here whose files we hold, read 2026-08-07
- Extract date vendor amount and descriptionin 15 of 469, across 3 files
- Scan folder for invoice filesin 14 of 469, across 2 files
- Rename files to standard formatin 14 of 469, across 2 files
- Show organization plan before movingin 14 of 469, across 2 files
- Generate summary CSVin 14 of 469, across 2 files
- Organize files by categoryin 13 of 469, across 1 file
- Preserve original filesin 13 of 469, across 1 file
- Flag files missing critical infoin 13 of 469, across 1 file
- Produce the requested output filein 9 of 469, across 4 files
- Build best, base, and worst case scenariosin 9 of 469, across 5 files
- Implement backoff if rate limit errors occurin 8 of 469, across 3 files
- Determine the weighted average cost of capitalin 8 of 469, across 4 files
Said here and by no other author read
- begin scripts with set search_path to asycuda public inside a transaction
- use natural-key subselects instead of surrogate ids
- ensure every business code value is unique
- reconcile assessed item taxes with payment and receipt amounts
- note provenance for every reference value
- follow end-to-end table ordering to resolve foreign keys
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.