agentleFS
Salberg87Salberg87/fiken-folio-skills/skills/folio-kladd/SKILL.md

folio-kladd

Skill0 starsChanged 27 days agoApache-2.0View on GitHub

Prepare bookkeeping on Folio (folio.no) bank events without completing them — set purpose, note, participants and ledger category, and upload receipts (kvittering). Use when the user wants to categorize a Folio transaction, add a receipt or note to it, or prepare a month's Folio events. Never completes (bokfører) an event and never moves money.

  • Reads credentials

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
  1. Very specific:

    Every write is logged to ~/.local/state/fiken-folio-skills/audit.jsonl (override with FIKEN_FOLIO_AUDIT_LOG) and is never retried …

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Folio kladd (prepare)

Fills in Folio events so the user can complete them in Folio. Uses scripts/folio-kladd.sh and $FOLIO_WRITE_KEY (a key without payment access). Read events with the folio skill.

Why some writes are refused. Folio completes an event by itself as soon as it has a ledger category and whatever that category requires. A category that doesn't require a receipt (customer payments, refunds, VAT payments, fees) completes the event the moment it is set. With Folio's Fiken integration on, that books it in Fiken. Completing is bokføring, so the script keeps each event where Folio can't complete it — no category, or a category that requires a receipt and no receipt yet — and reads the event and the category from Folio before every write. It refuses:

  • any change to a completed event
  • a category that doesn't require a receipt
  • a category on an event that already has a receipt
  • a receipt on an event that has a category
  • purpose/note changes on an event that Folio could already complete

So per event, do one of: a receipt-requiring category (+ purpose/note), or a receipt (+ purpose/note). The step that makes the event complete is the user's, in Folio. When refused, tell the user what's left to do in Folio; don't work around it.

Setup (one-time):

export FOLIO_WRITE_KEY=...               # https://app.folio.no/til/api-tilgang, no payment access
# or: export FOLIO_ENV=~/.config/folio/.env

Every write is logged to ~/.local/state/fiken-folio-skills/audit.jsonl (override with FIKEN_FOLIO_AUDIT_LOG) and is never retried automatically.

Workflow

F=~/.claude/skills/folio-kladd/scripts/folio-kladd.sh
R=~/.claude/skills/folio/scripts/folio.sh

bash "$R" events 2026-05-01 2026-05-31                 # find events with complete:false
bash "$R" category <ledgerCategoryId>                  # what does the category require?
bash "$F" patch-event <eventId> --purpose "Kundemøte" --participants "Navn" --category <ledgerCategoryId>
bash "$F" attach <eventId> ~/Downloads/kvittering.pdf  # only on events without a category
# Categories that don't require a receipt are refused: suggest them to the user instead.

Sharp edges (learned in production):

  • With Folio's Fiken integration on, a completed event is booked in Fiken. Don't also make a Fiken purchase draft for the same card charge, or it's booked twice. Fiken drafts are for things Folio never sees, like expenses paid with a private card (utlegg).
  • Refunds (incoming events) need an incoming category. An expense category has isIncoming: false; a refund set to it showed complete: true but never synced to Fiken. Use a category with isIncoming: true. There is no list endpoint for categories — find ids on past events (bash "$R" events <range> | jq '.events[].ledgerCategory') and inspect them with bash "$R" category <id>.

Full API reference: REFERENCE.md in the folio skill.


Part of fiken-folio-skills by Fredrik Skorge Salberg (Pifre AS). Not affiliated with Folio.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.