All plugins
Estonia plugin · arfiti-ee-country-pack

Estonia Country Pack

v1.0.0MIT14 commands

A complete Estonian VAT return workflow. A pre-close validation gate runs first — flagging payments without a document, cut-off issues, tax-code/jurisdiction mismatches, GL tie-out differences, and INF-threshold inconsistencies — and blocks generation until they are resolved. It then produces the KMD2 machine CSV (the format e-MTA accepts for upload) plus an XSD-validated vatDeclaration XML carrying the KMD main form and the KMD INF A/B annexes. The EC Sales List (Form VD) for intra-community B2B supplies is a separate filing. Tax codes are dynamically discovered and classified — never hardcoded — so the plugin adapts to your specific setup, including reverse-charge and intra-community acquisition handling and VAT GL reconciliation. A complete Estonian payroll calculation engine that processes gross-to-net for all employees in a payroll run. Applies all Estonian tax formulas: 33% social tax (employer), 22% income tax, 1.6% unemployment insurance (employee), 0.8% unemployment insurance (employer), and funded pension at 2%, 3%, or 6% depending on the employee's tier. Handles the basic tax exemption, pre-tax and post-tax voluntary deductions, and pro-rating for mid-month starts/exits. Generates TSD declaration XML files for direct upload to the EMTA (Estonian Tax and Customs Board) portal. A complete Estonian annual report preparation workflow covering all requirements for filing at ariregister.rik.ee. The plugin auto-determines your company size category (Micro, Small, Medium, or Large) which affects which statements are required. It generates the balance sheet in Annex 1 statutory format, income statement in Scheme 1 (by nature) or Scheme 2 (by function), cash flow statement, statement of changes in equity, notes to financial statements (3 notes for Micro, up to 15 for Medium/Large), management report with KPIs, and profit allocation proposal with statutory reserve calculation. Finally, it produces XBRL files using the et-gaap-2026 taxonomy for direct upload. A comprehensive year-end bookkeeping workflow designed for Estonian companies that need to build or rebuild a full year of accounting. Guides through five phases: Phase 1 sets up the chart of accounts (Estonian conventions), bank accounts, and posting profiles. Phase 2 imports opening balances with subledger detection (AR, AP, fixed assets). Phase 3 processes bank statements month-by-month — creating vendors/customers, classifying transactions, and posting them. Phase 4 fills gaps — missing bills, invoices, and special transactions (depreciation, payroll, tax). Phase 5 reconciles bank accounts, verifies the balance sheet equation, and closes all fiscal periods, preparing the entity for annual report filing.

The payroll skill of the Estonia country pack in Claude, showing its calculation procedure.
Actual product capture · Claude plugin. Historical screenshot values are not current tax guidance.

14 commands.
Nine procedures.

All of them run inside Claude against the governed ledger.

  1. 01

    /prepare-vat-declaration — Run the full monthly VAT return. Discovers and classifies tax codes dynamically, fetches posted transactions, then runs a pre-close validation gate (payments without a document, cut-off, tax-code jurisdiction, GL tie-out, INF threshold) that blocks generation until issues are fixed. Generates the KMD2 machine CSV (e-MTA upload format) plus an XSD-validated vatDeclaration XML with KMD INF A/B annexes. Add "validate" to run the gate only, without generating.

  2. 02

    /prepare-ec-sales-list — Prepare the EC Sales List (Form VD) for intra-community B2B supplies — a separate e-MTA filing. Discovers tax codes indicating IC supply, fetches AR invoices, groups by purchaser VAT number (one row per purchaser, full euros), classifies goods / services / triangular per the official form columns, validates EU VAT numbers via VIES, and reconciles goods with KMD line 3.1.1 and services with line 3.1 − 3.1.1.

  3. 03

    /calculate-payroll — Calculate gross-to-net payroll for all employees in a payroll run. Loads the payroll run, fetches employees with compensation/tax settings/deductions, applies all Estonian tax formulas, validates net pay within 0.02 tolerance, and submits calculated results. Shows summary table with per-employee breakdown.

  4. 04

    /generate-tsd — Generate the Estonian monthly TSD declaration XML for EMTA filing. Fetches calculated payroll data, builds structured JSON input, and runs the generate_tsd.py script to produce validated XML with correct namespace and per-employee data (personal ID, gross pay, income tax, social tax, unemployment, pension).

  5. 05

    /prepare-annual-report — Execute the complete annual report preparation. Verifies year-end close, determines company size, fetches all financial data, compiles balance sheet (Annex 1 format), income statement (Scheme 1 or 2), cash flow, equity changes, notes, management report with KPIs, profit allocation proposal, and XBRL mapping.

  6. 06

    /check-prerequisites — Quickly verify whether a legal entity is ready for annual report preparation. Checks: fiscal period close status, company size classification, audit/review requirement, trial balance verification, and prior year data availability. Returns a status report of any blockers.

  7. 07

    /generate-xbrl-file — Generate XBRL files (.xsd + .xbrl) for upload to ariregister.rik.ee. Builds structured JSON from financial data and runs the generate_xbrl.py script to produce a validated XBRL instance document and companion schema using et-gaap-2026 taxonomy.

  8. 08

    /generate-xbrl-mapping — Generate an account-to-XBRL element mapping table for portal data entry. Creates mapping from your chart of accounts to Estonian GAAP XBRL taxonomy elements. Shows Account Number, Account Name, Balance, XBRL Element, and Report Line.

  9. 09

    /setup-entity — Import chart of accounts (from CSV, Merit Aktiva, or Estonian template), create bank accounts with IBANs, and configure posting profiles for all transaction types. Validates account structure and posting profile completeness.

  10. 10

    /upload-opening-balance — Import and verify opening balances from the prior year balance sheet. Detects subledger accounts (AR 1200-range, AP 2110-range, FA 1500-1599) and asks for individual open items. Validates total debits equal total credits.

  11. 11

    /process-bank-statements — Read bank statements (CSV or PDF), create missing vendors/customers, classify transactions by type, and post them. Processes one month at a time for manageable review. Creates AR/AP payments, expense bills, and revenue invoices.

  12. 12

    /fill-gaps — Identify and post missing source documents — bills without bank payments, invoices without receipts, depreciation entries, payroll postings, tax accruals, and year-end adjustments.

  13. 13

    /reconcile-and-close — Reconcile bank account balances (GL vs bank statement), verify balance sheet equation (A = L + E), close all fiscal periods, and confirm readiness for annual report preparation.

  14. 14

    /check-progress — Review progress across all 5 phases — what is done, what is next, and any issues blocking progress. Shows phase completion status and recommended next step.

Highlights

Monthly VAT return (KMD2 CSV and XML with the KMD INF annex) and the EC Sales List. Gross-to-net payroll and the TSD declaration for EMTA. Annual report with XBRL for the e-Business Register. A full year of books built from bank statements and source documents.

How a run behaves.
Nine procedures, step by step.

Full VAT Declaration Workflow
  1. 01
    Discover and classify tax codes dynamically — map each to the appropriate KMD line
  2. 02
    Fetch all posted AR invoices, AP invoices, credit notes, and journal entries with VAT impact
  3. 03
    Verify tax code coverage — flag any transaction lines with missing or inactive tax codes
  4. 04
    Run the pre-close validation gate (BLOCK/WARN): payments without a document, cut-off, tax-code jurisdiction, GL tie-out, INF threshold — refuse to generate while any BLOCK is open
  5. 05
    Compute the KMD main form: taxable bases by rate, input VAT, reverse charge (lines 6/7), IC acquisitions, adjustments (e-MTA derives total VAT and net payable)
  6. 06
    Prepare KMD INF Annex: group sales (Part A) and purchase (Part B) partners above EUR 1,000 threshold
  7. 07
    Reconcile the KMD to the GL VAT accounts (trial-balance tie-out)
  8. 08
    Generate the KMD2 machine CSV (primary) and XSD-validated vatDeclaration XML with INF A/B annexes — ready for e-MTA upload
  9. 09
    Hand off the EC Sales List (Form VD) when intra-community supplies exist; provide filing guidance — deadline is the 20th of the following month
Payroll Calculation
  1. 01
    Load payroll run and verify status is "draft"
  2. 02
    Fetch all active employees with compensation records, tax settings, and voluntary deductions
  3. 03
    Load Estonian tax rates from payroll tax jurisdiction configuration
  4. 04
    For each employee: calculate gross pay (pro-rated if mid-month start/exit)
  5. 05
    Calculate employee deductions: unemployment insurance (1.6%), funded pension (2%/3%/6%)
  6. 06
    Apply pre-tax voluntary deductions
  7. 07
    Calculate taxable income = gross - unemployment - pension - pre-tax deductions - basic exemption
  8. 08
    Calculate income tax = max(0, taxable income x 22%)
  9. 09
    Apply post-tax voluntary deductions
  10. 10
    Calculate net pay = gross - all employee taxes and deductions
  11. 11
    Calculate employer costs: social tax (33%), employer unemployment (0.8%)
  12. 12
    Validate: net pay = gross - total taxes - total deductions (within 0.02 tolerance)
  13. 13
    Submit calculation results and show summary table
TSD Declaration Generation
  1. 01
    Fetch calculated or approved payroll run data
  2. 02
    Build structured JSON input with per-employee tax details
  3. 03
    Run generate_tsd.py script to produce validated XML
  4. 04
    Output includes header, summary totals, and Annex 1 per-employee lines
  5. 05
    XML ready for upload to e-MTA portal
Full Annual Report Workflow
  1. 01
    Check prerequisites & determine company size category (assets, revenue, employees thresholds)
  2. 02
    Fetch all financial data: trial balance (current + prior), BS, IS, AR/AP aging, fixed assets, bank accounts, employees
  3. 03
    Generate Balance Sheet (Bilanss) in Annex 1 statutory format — validate A = L + E
  4. 04
    Generate Income Statement (Kasumiaruanne) in Scheme 1 (by nature) or Scheme 2 (by function)
  5. 05
    Generate Cash Flow Statement (Rahavoogude aruanne) for Medium/Large companies using indirect method
  6. 06
    Generate Statement of Changes in Equity (Omakapitali muutuste aruanne) for Medium/Large
  7. 07
    Generate Notes to Financial Statements (Lisad) — 3 notes for Micro, up to 15 for Medium/Large
  8. 08
    Generate Management Report (Tegevusaruanne) with calculated KPIs
  9. 09
    Calculate Profit Allocation Proposal — statutory reserve at 5% of net profit until 10% of share capital
  10. 10
    Compile complete output with all statements, notes, and management report
  11. 11
    Generate XBRL files (.xsd + .xbrl) for upload to ariregister.rik.ee
  12. 12
    Provide filing guidance — deadline is 6 months after fiscal year end
Phase 1: Entity Setup
  1. 01
    Import or create chart of accounts with Estonian conventions
  2. 02
    Create bank accounts with IBANs
  3. 03
    Configure posting profiles for all transaction types
Phase 2: Opening Balances
  1. 01
    Upload prior year closing balances
  2. 02
    Detect subledger accounts (AR, AP, Fixed Assets)
  3. 03
    If details provided: create individual open items
  4. 04
    Verify opening balance matches prior year balance sheet
Phase 3: Bank Statements
  1. 01
    Import bank statements (CSV/PDF) month by month
  2. 02
    Create vendors/customers as needed
  3. 03
    Classify and post transactions
  4. 04
    Match payments to invoices
Phase 4: Fill Gaps
  1. 01
    Post missing bills, invoices, and special transactions
  2. 02
    Record depreciation, payroll, and tax entries
  3. 03
    Post year-end adjustments
Phase 5: Reconcile & Close
  1. 01
    Reconcile bank balances (GL vs statement)
  2. 02
    Verify balance sheet equation
  3. 03
    Close all fiscal periods
  4. 04
    Hand off to annual report plugin
Validation gate · 25 checks

All transactions for the period are posted (no drafts remain). All transaction lines have tax codes assigned. KMD calculations balance: output VAT minus input VAT equals net VAT. KMD INF totals reconcile with KMD output VAT lines. EC Sales List reconciles with KMD Lines 3.1 (goods) and 3.2 (services). Payroll run exists and is in "draft" status. All employees in the run have active compensation records. All employees have tax settings (pension tier, basic exemption). Tax rates loaded from payroll tax jurisdiction (country_code = "EE"). For each employee: net pay equals gross minus total taxes minus deductions (within 0.02). Submission succeeds without validation errors. All 12 fiscal periods for the year must be closed. Company size category must be determined (affects required statements). Trial balance must balance (total debits = total credits). Prior year comparatives must be available and verified. Balance sheet must balance (Total Assets = Total Liabilities + Total Equity). Cash flow net change must equal closing cash minus opening cash. Chart of accounts imported with all 5 account types. Bank accounts created for every bank. Posting profiles configured for all transaction types. Opening balance posted — debits equal credits. Opening balance matches prior year balance sheet. Each month of bank statements processed and reconciled. Balance sheet balances (Assets = Liabilities + Equity). All fiscal periods closed.

Reference data · 26 files
tax-codes-ee.mdkmd-form-structure.mdkmd-inf-annex.mdec-sales-list.mdvat-rates-ee.mdvalidation-checklist.mdemta-filing-guide.mdestonian-tax-formulas.mdsubmission-format.mdtsd-declaration.mdrtj-standards.mdbalance-sheet-format.mdincome-statement-format.mdcash-flow-format.mdequity-changes-format.mdnotes-templates.mdmanagement-report.mdprofit-allocation.mdxbrl-generation.mdxbrl-mapping.mde-business-register.mdestonian-coa-mapping.mdopening-balance-guide.mdbank-statement-classification.mdposting-profiles-setup.mdannual-report-handoff.md

Your procedures,
written down.

Swap the reference files for your policies and run it in Claude. Writes still go through the governed gateway.