Workflow skills¶
Beyond individual tools, these multi-step flows ship as workflow playbooks,
delivered two ways from one source. Their home is the anafpy-workflows
plugin (plugins/anafpy-workflows/skills/*/SKILL.md): installed from the
anafpy marketplace (/plugin marketplace add robert-malai/anafpy) they surface
in Cowork (and chat) as Agent Skills, invoked in plain language or picked from
the sidebar. The MCP server also re-serves the same files as same-name MCP
prompts, so other prompt-capable clients get them too: Claude Desktop's "+"
menu, or /mcp__anafpy__<name> in Claude Code. An optional source argument
seeds the workflow with where the data lives.
There is one source of truth — the plugin's SKILL.md files — with two consumers. A skill drives the anafpy tools, so a Cowork user needs both the plugin (the playbooks — setup walkthrough step 8) and the anafpy connector (the tools — steps 2–4 of the same walkthrough).
etransport-declare¶
Files an e-Transport declaration and obtains a UIT code from transport data found in any source — an email, a PDF invoice, a CMR, a spreadsheet, or the conversation itself. It triggers on plain-language asks in Romanian or English, with or without diacritics ("am de făcut un UIT", "trebuie să declar un transport", "declare this transport", "get me a UIT"). The playbook walks Claude through the full flow:
- Extract the transport data from the source you point it at.
- Map it onto the structured declaration (looking up ANAF codes via
etransport_nomenclaturewhere needed). A value in euro or another currency is converted at BNR's official rate for the filing day, by thebnr_fx_ratetool — Claude never does that arithmetic itself, and the rate's own date is reported back to you with the figures. - Prepare —
etransport_prepare_declarationcomposes the XML and returns a preview plus a confirmation token. - Show you the preview for approval. Nothing has been filed yet.
- Submit on your explicit approval —
etransport_submitwith the token. - Poll the status until ANAF issues a valid UIT, and report it.
- Render the driver's UIT card (
etransport_uit_card— a phone-shaped PDF with the code set large and a QR) after every accepted filing, and offer the A4 detail document (etransport_uit_details) for the partner company or the user's records.
The card always prints the UIT's validity — but says where it comes from.
ANAF's own date, data_exp_uit, is served only by the info endpoint, which
ANAF scopes to the transport organizer: a filing where someone else carries
the goods has no readable expiry, which is the usual case. Rather than leaving
the driver with no date, the card then shows the window the law fixes (OUG
41/2022 art. 11, counted from the transport date) in amber and labelled as an
estimate, and the playbook relays it as one. The window is also shown at the
preview step, while the transport date can still be changed.
Before extracting anything, the playbook orients on the legal requirements
(OUG 41/2022 and the ANAF/AVR procedure): whether the transport must be declared
at all — exemptions included — whether the filing CIF is the party the law
obliges to declare, and the UIT timing windows. After filing, it relays the
obligations that attach to the issued UIT: handing it to the driver before
departure, GPS tracking for the whole route, and the declaration's immutability
once the vehicle moves. The compiled legal reference behind this guidance is
served to the model as the anafref://etransport/legal resource.
It also handles corrections of an already-issued UIT (correction_of_uit).
The same two-step gate described in Tools applies throughout: the
skill can never skip the preview-and-approval step, because the submit tool
refuses to file without the single-use confirmation token plus confirm=true.
personal-income-summary¶
Answers "what was my income?" for a Romanian natural person by pulling the authoritative ANAF records from the SPV mailbox and presenting a clean per-year summary — with an optional Excel workbook. It triggers on both formal and casual phrasing, in Romanian or English ("veniturile mele", "cât am câștigat anul trecut", "income summary", "adeverință de venit"). The playbook walks Claude through:
- Confirm the SPV session —
auth_statusthenspv_status(which returns the certificate holder's CNP and authorized CUIs). This skill is read-only: it never files anything. - Pick the CNP and years — defaults to personal income (the CNP on the certificate) over the last three completed fiscal years; asks only if the account also holds company CIFs and the request is ambiguous.
- Request the reports —
spv_cererefor bothAdeverinte Venit(the authoritative income certificate) andD212(the Declarația Unică duplicate, as a cross-check) per year. - Wait and download —
spv_asteapta_raportsaves each PDF to disk (retrying the occasional handshake timeout). - Extract and summarize — reads the figures from the certificates and gives a per-year table with totals and a trend line, keeping the official PDFs alongside.
- Offer an Excel workbook (optional) — a formula-driven per-year summary plus one detail sheet per year, built via the xlsx skill.
Because it only uses the read-only spv_* tools, there is no filing gate — the
human gate here is the SPV login (certificate PIN / 2FA), described in the
setup walkthrough step 6.
declaratie-prepare¶
Builds, validates, renders, signs, files, and tracks a Romanian tax
declaration starting from unstructured source data — an accountant's
email, a spreadsheet, pasted numbers, or just "file my VAT return for March".
It drives the declaratie_* tools plus the public anaf_* lookups. The
playbook walks Claude through:
- Identify the form — named by you it is simply echoed; otherwise inferred
from the data against the form inventory, asking only when two forms remain
plausible.
declaratie_duk_statusconfirms DUKIntegrator is configured and flags a stale validator. - Read the form's completion guide (served as an
anafref://resource) — who files and when, the row-by-row → XSD attribute map, validated example instances, and the known gotchas. - Infer identity via lookup, not questions —
anaf_lookup_taxpayersfills the company name/address from the CUI and cross-checks eligibility (VAT registration, cash accounting, inactive flags); partner CUIs are validated the same way. - Ask for the rest in one batch — period, settlement type, amounts, and the form's must-ask fields; amounts are never guessed or extrapolated.
- Author the XML from the guide's mapping, computing derived rows and the
control sum per its formulas, and
nr_evidwithdeclaratie_nr_evid(form-aware), never by hand. - Validate in a loop —
declaratie_validate; the findings are ANAF's own messages, so fix the XML and retry untilok(warning-only forms like D700 pass with the notice relayed). - Pre-filing reconciliation — states what ANAF will cross-check this filing against (D300 ↔ D394 ↔ D390, e-Factura, SAF-T) so mismatches surface before filing, not as conformity notifications after.
- Render and review —
declaratie_renderwrites the official PDF for you to check. - Sign on your explicit go —
declaratie_signwithconfirm=true, after a warning that the certificate PIN/2FA prompt is about to fire. - File on your explicit go —
declaratie_portal_statusprobes the portal session (no 2FA); if it lapsed,declaratie_portal_loginwith your approval (your certificate prompt fires); thendeclaratie_prepare→ filing recap →declaratie_submitwithconfirm=true. Where the portal tools are opted out (ANAFPY_DECLARATII_UPLOAD), you file the signed PDF at anaf.ro → Depunere declarații yourself and note the upload index. - Confirm —
declaratie_statuschecks acceptance by upload index (no login needed) anddeclaratie_recipisasaves the signed filing receipt — available only ~60 days, so it's archived promptly.
The human gates are the batched questions, the PDF review, the signature
approval, the portal login (both fire your certificate PIN / 2FA), and the
filing approval; the skill never signs or files without your explicit
go-ahead relayed as confirm=true, and a signature approval never doubles as
the filing approval.