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

reconcile

Skill0 starsChanged 27 days agoApache-2.0View on GitHub

Reconcile Folio card charges / bank events against Fiken and prepare the missing bookings as Fiken DRAFTS. Use when the user wants to reconcile, match bank transactions to accounting, find unbooked card charges, or do a monthly bookkeeping pass across Folio + Fiken. Plans first, creates drafts only — never posts to the ledger and never moves money.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close, brief and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • HermeticOrmusSkill

    close

    End-of-session ritual. Captures session state, updates auto-memory, writes a session summary, then exits the session cleanly.

    Also in 3 projects that use this

  • AnthropicSkill

    brief

    Generate contextual briefings for legal work — daily summary, topic research, or incident response. Use when starting your day and need a scan of legal-relevant items across email, calendar, and contracts, when researching a specific legal question across internal sources, or when a developing situation (data breach, litigation threat, regulatory inquiry) needs rapid context.

    Also in 3 projects that use this

  • renatorozasSkill

    grill

    Adversarial code review. Don't let me ship until the changes pass your scrutiny.

    Also in 3 projects that use this

  • AnthropicSkill

    start

    Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.

    Also in 3 projects that use this

  • nicolasestremSkill

    brainstorm

    Structured idea generation and solution exploration with systematic analysis.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

  • +1 more from anthropics

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you have the receipt PDF (e.g.

    line 83
  2. Distinctive:

    Don't post or complete anything from here.

    line 96

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “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

Reconcile (Folio ↔ Fiken)

A reconciliation workflow on top of the folio, fiken and fiken-kladd skills. It matches uncompleted Folio events (card charges / bank events) against existing Fiken purchases, then proposes Fiken purchase drafts for the unmatched ones. The matching/classification is a pure, offline plan step (scripts/reconcile.py); the only writes are drafts through fiken-kladd.

Requires: the folio, fiken and fiken-kladd skills installed and configured (their env vars set). python3, and jq for convenience.

The hard rule: this never books and never pays

The whole point of this skill vs. ad-hoc automation is that the dangerous steps are off the automated path:

  • reconcile.py only plans. It makes no API calls and writes nothing — it reads two JSON files and prints a plan.
  • Writes create drafts (kladd) only, via fiken-kladd draft-purchase. Drafts are reviewable and reversible.
  • Running it twice is safe: pass --drafts and open drafts that already match are skipped.
  • Posting a draft to the ledger is the user's step in Fiken. Don't chain it into this workflow, even if fiken-bokforing is installed.
  • Completing a Folio event is likewise the user's step in Folio.
  • Money never moves — none of the skills has a payment command.

So a full run produces: a reviewed plan → Fiken drafts → (human) posts drafts → (human) marks Folio events complete.

⚠️ Folio's Fiken integration and this workflow don't mix. If the integration is on, completing a Folio event books it in Fiken by itself. Creating a Fiken draft for the same charge and completing the event books it twice. With the integration on, book card charges by completing them in Folio (see the folio skill) and use this skill only to find what's missing. Ask the user which setup they have before step 4.

Workflow

1. Set up classification rules (once)

cp ~/.claude/skills/reconcile/rules.example.json ~/.config/reconcile/rules.json
# edit: map charge-description keywords → Fiken cost account + vendor name.
# list physical-goods accounts under "goods_accounts" (import VAT = vatType NONE).

2. Pull the data (reads, safe)

FO=~/.claude/skills/folio/scripts/folio.sh
FI=~/.claude/skills/fiken/scripts/fiken.sh
FK=~/.claude/skills/fiken-kladd/scripts/fiken-kladd.sh

W=$(mktemp -d)   # private working dir — this is financial data, keep it out of shared /tmp files
bash "$FO" events 2026-05-01 2026-05-31 > "$W/events.json"
bash "$FI" purchases 2026-05-01 2026-05-31 > "$W/purchases.json"
bash "$FI" drafts > "$W/drafts.json"

3. Build the plan (offline, no writes)

R=~/.claude/skills/reconcile/scripts/reconcile.py
python3 "$R" --events "$W/events.json" --purchases "$W/purchases.json" --drafts "$W/drafts.json" \
  --rules ~/.config/reconcile/rules.json --card-account 1949

You get three buckets:

  • already_booked — a Fiken purchase already matches (date, amount); skipped (count-based dedup handles same-day, same-amount duplicates).
  • already_drafted — an open Fiken draft already matches; skipped.
  • proposed — no match; a draft is suggested with account + vatType.
  • needs_review — no vendor rule matched, or amount is zero/odd; left for you to classify by hand.

--card-account <code> is the Fiken account the card is paid from (e.g. a 19xx card account); used both to scope dedup and to fill the draft's payment line. Omit it to skip payment lines.

4. Review with the user, then create DRAFTS

Show the proposed table to the user. Only after they're happy, create the drafts (this is safe — drafts only):

python3 "$R" --events "$W/events.json" --purchases "$W/purchases.json" --drafts "$W/drafts.json" \
  --rules ~/.config/reconcile/rules.json --card-account 1949 --json > "$W/plan.json"

# create one draft per proposed entry:
jq -c '.[] | select(.status=="proposed") | .draft' "$W/plan.json" | while read -r d; do
  bash "$FK" draft-purchase "$d"
done

5. (Optional) attach receipts

If you have the receipt PDF (e.g. from email), attach it to the draft:

bash "$FK" attach-draft <draftId> ~/Downloads/receipt.pdf

6. Hand off to the user

Drafts now sit in Fiken. Give the user the list (with Fiken links, https://fiken.no/foretak/{slug}/handelsutkast/kjop/{uuid}) and tell them what's left:

  • post each draft in Fiken after checking it
  • complete the matching Folio events in Folio, or leave them, depending on whether their Folio–Fiken integration books them (see the warning above)

Don't post or complete anything from here.

VAT logic

reconcile.py picks vatType from the charge currency and target account:

  • NOK → HIGH (25 %); net = gross / 1.25.
  • Foreign + service account → HIGH_FOREIGN_SERVICE_DEDUCTIBLE (reverse charge); net = gross, no VAT line.
  • Foreign + goods account (in goods_accounts) → NONE (import VAT via customs); net = gross.

These are sensible defaults, not tax advice — check unusual charges, and verify vatType is valid for the account (Fiken rejects some combinations).

Full reference

Plan schema, matching rules, edge cases: see REFERENCE.md.


Part of fiken-folio-skills by Fredrik Skorge Salberg (Pifre AS). Builds on the fiken and folio skills.

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.