agentleFS
pnppnp/sharepoint-skills/Skills/invoice-po-reconciliation/invoice-po-reconciliation/SKILL.md

invoice-po-reconciliation

Skill142 starsChanged 3 months agoMITView on GitHub

Reconciles one or more user-selected invoice files against matching purchase orders in the Purchase Order library. Compares totals, flags discrepancies, writes reconciliation status back to invoice metadata, and returns a formatted summary table. Trigger phrases: po reconciliation, invoice reconciliation, invoice to po reconciliation, reconcile invoice, reconcile po, match invoice to po, invoice po match, po match, check invoice against po.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no files are selected, ask the user to select the invoice file(s) they want to reconcile.

    line 25
  2. Very specific:

    Use cat_file or list_items (with field projection) to read the selected invoice file's metadata columns.

    line 30
  3. Distinctive:

    If the library has metadata columns populated, extract the values directly.

    line 35
  4. Very specific:

    If metadata columns are missing or empty, read the file content with cat_file and extract Invoice Number, Invoice Total, and PO Number from …

    line 37
  5. Distinctive:

    Search the Purchase Order library (also try "Purchase Orders" or "PO" if not found) for a record whose PO Number column matches the PO …

    line 40
  6. Very specific:

    Primary method: Use list_items with a filter on the PO Number column.

    line 42
  7. Very specific:

    Fallback method: If the library doesn't have a clear PO Number column or the filter returns no results, use find_items or semantic_search …

    line 43
  8. Distinctive:

    If no matching PO is found, report the invoice as Unable to Reconcile — No matching PO found and move to the next invoice.

    line 45
  9. Very specific:

    If PO Total is not available in metadata, read the PO file content with cat_file to extract the total.

    line 52
  10. Distinctive:

    If Invoice Total > PO Total → Non Compliant (overage = Invoice Total − PO Total)

    line 60
  11. Distinctive:

    If Invoice Total ≤ PO Total → Compliant (remaining budget = PO Total − Invoice Total)

    line 61
  12. Very specific:

    Use update_list_items_v2 to write the following columns on the invoice item.

    line 64
  13. Distinctive:

    After processing all invoices, return a single formatted Markdown table:

    line 72
  14. Distinctive:

    Use these status indicators:

    line 80
  15. Distinctive:

    Never fabricate invoice or PO data.

    line 101
  16. Very specific:

    If a column name doesn't match exactly (e.g., "Amount" vs "Invoice Total"), adapt by inspecting the list schema with get_list_schema first.

    line 102
  17. Distinctive:

    If the Purchase Order library can't be found on the site, ask the user which library contains the POs.

    line 103
  18. Distinctive:

    If write-back columns (Reconciliation Status, Reconciliation Details) don't exist on the invoice library, inform the user and offer to …

    line 104

≈ “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.

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

Invoice vs. Purchase Order Reconciliation

Purpose

Reconcile one or more user-selected invoice files against their corresponding purchase orders (POs). Determine compliance by comparing totals, write results back to invoice metadata, and return a clear summary.

Trigger Phrases

Activate this skill when the user says any of the following (or close variations):

  • "po reconciliation"
  • "invoice reconciliation"
  • "reconcile invoice"
  • "invoice to po reconciliation"
  • "reconcile po"
  • "match invoice to po"
  • "invoice po match"
  • "check invoice against po"
  • "po match"
  • "compare invoice to po"

Prerequisites

  • The user must have one or more invoice files selected in a document library.
  • If no files are selected, ask the user to select the invoice file(s) they want to reconcile.

Steps (repeat for each selected invoice)

Step 1 — Read Invoice Metadata

Use cat_file or list_items (with field projection) to read the selected invoice file's metadata columns. Look for:

  • Invoice Number
  • Invoice Total (or Amount, Total, Invoice Amount — adapt to actual column name)
  • PO Number (or Purchase Order Number, Referenced PO — adapt to actual column name)

If the library has metadata columns populated, extract the values directly.

If metadata columns are missing or empty, read the file content with cat_file and extract Invoice Number, Invoice Total, and PO Number from the document body.

Step 2 — Find the Matching Purchase Order

Search the Purchase Order library (also try "Purchase Orders" or "PO" if not found) for a record whose PO Number column matches the PO Number extracted from the invoice.

  • Primary method: Use list_items with a filter on the PO Number column.
  • Fallback method: If the library doesn't have a clear PO Number column or the filter returns no results, use find_items or semantic_search to locate the PO by PO number.

If no matching PO is found, report the invoice as Unable to Reconcile — No matching PO found and move to the next invoice.

Step 3 — Extract PO Details

From the matching PO record, extract:

  • PO Number
  • PO Total (or PO Amount, Total, Order Total — adapt to actual column name)

If PO Total is not available in metadata, read the PO file content with cat_file to extract the total.

Step 4 — Reconcile

Perform two checks:

  1. PO Number Match: Confirm the PO Number from the invoice exactly matches the PO Number on the PO record. Any mismatch (e.g., trailing characters, prefix differences) = Discrepancy.
  2. Total Comparison:
    • If Invoice Total > PO Total → Non Compliant (overage = Invoice Total − PO Total)
    • If Invoice Total ≤ PO Total → Compliant (remaining budget = PO Total − Invoice Total)

Step 5 — Write Back to Invoice Metadata

Use update_list_items_v2 to write the following columns on the invoice item. If the columns don't exist yet, note that to the user and skip the write-back.

ColumnValue
Reconciliation StatusCompliant or Non Compliant
Reconciliation DetailsPlain-English summary, e.g., "Invoice #1042 ($4,800.00) matched to PO #PO-1042 ($5,000.00). Invoice is within PO budget. Remaining: $200.00." or "Invoice #1043 ($6,200.00) exceeds PO #PO-1043 ($5,000.00) by $1,200.00."

Step 6 — Return Summary to User

After processing all invoices, return a single formatted Markdown table:

Invoice #Invoice TotalPO #PO TotalStatusDetails
1042$4,800.00PO-1042$5,000.00✅ CompliantRemaining budget: $200.00
1043$6,200.00PO-1043$5,000.00⚠️ Non CompliantOverage: $1,200.00
1044$3,500.00PO-9999—❌ No MatchNo matching PO found

Use these status indicators:

  • ✅ Invoice is Compliant — Invoice total is at or below PO total. Show remaining budget.
  • ⚠️ Discrepancy Found — Invoice total exceeds PO total. Show overage amount.
  • ❌ Unable to Reconcile — No matching PO found or PO number mismatch.

Example

User: "Reconcile this invoice against its PO" (User has selected: Invoice-1042.pdf)

Agent response after processing:

I read Invoice-1042.pdf and found Invoice #1042 for $4,800.00 referencing PO-1042. I located PO-1042 in the Purchase Order library with a total of $5,000.00.

Invoice #Invoice TotalPO #PO TotalStatusDetails
1042$4,800.00PO-1042$5,000.00✅ CompliantRemaining budget: $200.00

I updated the invoice metadata with Reconciliation Status = Compliant and the reconciliation details.

Constraints

  • Never fabricate invoice or PO data. All values must come from actual file content or metadata.
  • If a column name doesn't match exactly (e.g., "Amount" vs "Invoice Total"), adapt by inspecting the list schema with get_list_schema first.
  • If the Purchase Order library can't be found on the site, ask the user which library contains the POs.
  • If write-back columns (Reconciliation Status, Reconciliation Details) don't exist on the invoice library, inform the user and offer to create them.
  • Format all currency values with two decimal places and a dollar sign.
  • Process invoices in the order they were selected.

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.