swedish-sie-import-export
Skill96 starsChanged 2 months agoMITView on GitHub
Swedish SIE4 file format: parsing, validation, generation, troubleshooting. All record types (#VER, #TRANS, #IB, #UB, #RES, #KONTO, #RAR, #FLAGGA, #KSUMMA, #SRU, etc.), SIE types 1-4, encoding detection (CP437/UTF-8/Latin-1), mojibake diagnosis, verification balance integrity, IB/UB continuity, multi-year migration, diffing, audit trail under BFL, BAS account classes, SRU tax codes, and error patterns. Trigger on ANY SIE question: import, export, parsing, validation, encoding issues, garbled å/ä/ö, unbalanced verifications, IB/UB mismatch, #FLAGGA, SIE migration between Fortnox/Visma/BL/SpeedLedger/Bokio, .SE/.SI files, verification series, or code reading/writing SIE data. Always use over training data.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- erp-mafia/accountedword for word, first seen Oct 8, 2026
- erp-mafia/swedish-accounting-skillsword for word, first seen Sep 18, 2026
Other versions2 projects use a version of this.
Word for word · 2
- erp-mafia/accounted★ 403100% same
- erp-mafia/swedish-accounting-skills★ 96100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- swedish-accounting-complianceSkill
- swedish-asset-accountingSkill
- swedish-cash-registerSkill
- swedish-daily-bookkeepingSkill
- swedish-ef-skatteplaneringSkill
- swedish-financial-reportingSkill
- swedish-industry-byggSkill
- swedish-industry-ehandelSkill
- swedish-industry-restaurangSkill
- swedish-industry-saasSkill
- swedish-industry-vardSkill
- swedish-inventorySkill
- swedish-invoice-complianceSkill
- swedish-payrollSkill
- swedish-project-accountingSkill
- swedish-sru-filingSkill
- swedish-tax-planningSkill
- swedish-vatSkill
- swedish-year-end-closingSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Generating files: write CP437, every verification balanced and in ascending verno order per series, every account declared, #FLAGGA 0.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Swedish SIE4 Import/Export
Deterministic reference for parsing, validating, generating, and troubleshooting SIE4 files.
SIE4 (Standard Import Export) is Sweden's universal accounting data interchange format. Tagged plain-text, one record per line, #LABEL prefix, space-delimited fields. .SE = export, .SI = import. Current spec: utgåva 4C (2025-08-06), which still allows only CP437 (#FORMAT PC8). SIE 5 is a separate XML format; this skill covers SIE 4.
Reference files
| File | When to read |
references/record-types.md | Every record label and its fields, the five subtypes (1, 2, 3, 4E, 4I), field format rules, verification example, series conventions, multi-year handling, record ordering, #KSUMMA |
references/encoding.md | Encoding detection, byte tables, mojibake diagnosis, per-software behaviour, normalization on import |
references/validation-rules.md | Common-error lookup, all validation rules and severities, validation order, remediation workflow, post-import issues, file diffing |
references/bas-sru.md | BAS account classes, #KTYP, key accounts, SRU codes, year-end closing and IB/UB flow, #KPTYP |
references/migration-and-audit-trail.md | Migrating between systems, what SIE does not carry, post-migration validation, retention and audit trail under BFL |
Core invariants (never violate)
- Verification balance: Sum of all #TRANS amounts within a #VER block = 0.00 exactly
- IB/UB continuity: UB(year N, account) = IB(year N+1, account) for all balance sheet accounts (1xxx-2xxx)
- Result account reset: IB for income statement accounts (3xxx-9xxx) must be zero at year start
- #FLAGGA idempotency: 0 = not imported, 1 = already imported. Prevents double-import.
- Sequential numbering: Verifications within a series appear in ascending verno order
- Sign convention: Debit = positive, Credit = negative (in #TRANS, #IB, #UB, #RES)
Procedure for any SIE file
- Detect the encoding before parsing.
#FORMAT PC8is unreliable: cloud programs declare PC8 and export UTF-8. Detection order inencoding.md; skip #KSUMMA unless CP437. - Check #FLAGGA.
1means the file has already been read in: don't import it. - Validate in order: structure → encoding → parsing → chart of accounts → balances → verifications → fiscal year boundaries → dimensions → KSUMMA (CP437 only). Checks and severities in
validation-rules.md. - Diagnose before adjusting. Any difference (unbalanced #VER, IB/UB mismatch, non-zero IB on result accounts): keep the file untouched, report the exact difference, compare with the source ledger, fix the cause, re-export. A rättelsepost only when the books themselves are wrong, in the period the error is discovered.
- Generating files: write CP437, every verification balanced and in ascending verno order per series, every account declared,
#FLAGGA 0.
Never guess these
| Situation | Why | What to do |
| The file's actual encoding | PC8 is declared even by UTF-8 exporters, and mojibake is silent | Run the detection order in encoding.md on the raw bytes |
| An unbalanced verification | The cause decides the fix; a balancing line hides a missing cost | Compare with the source voucher and re-export. Never add a balancing line |
| An IB/UB difference | IB must equal the previous year's UB (ÅRL 2:4 p.7) | Diagnose per account against the source. Never adjust the opening or a closed period undiagnosed |
| Resetting #FLAGGA to 0 | It defeats the double-import guard (spec 7.4) | Confirm the vouchers are not in the target, and document why |
| VAT codes after an import | SIE carries no moms information | Configure them manually in the target system |
| The series to import into | Collisions create duplicate verification numbers | Remap to an unused series, document the mapping |
Related skills
| Question | Skill |
| SRU codes and the files sent to Skatteverket | swedish-sru-filing |
| BFL bookkeeping duties, verifikationer, archiving | swedish-accounting-compliance |
| The closing entries behind UB and next year's IB | swedish-year-end-closing |
| Moms codes and rules to configure after an import | swedish-vat |
| Project dimensions (#DIM 6 / #OBJEKT) in the books | swedish-project-accounting |
| Årsredovisning and INK2 from the same balances | swedish-financial-reporting |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

