Build map

The gateway
and the plugin

The product tier above a website: a gateway that owns the database and every credential, plus a Claude plugin the client runs the business through.

The full walkthrough — the whole build, start to finish (22:45).youtube.com/watch?v=XYvLwnGpbcw

1 · Two repos, and the split is data vs judgment

Claude plugin · skills gateway Postgres

One key travels left to right. Nothing travels back except compact JSON the model turns into a sentence.

The gateway ownsThe skill owns
the schema, every credential, every writethe judgment: classify this document, read it, decide what it is
an MCP endpoint, a tool layer, auth, a credential vault, cron jobs, the dashboardsa routing agent, the skills themselves, and one key
Next.js on Vercel, Postgres behind it. Boring on purpose.Markdown. The client can open it and read what the thing does.

Skills are not thin

The mistake worth skipping: one of mine runs past four hundred lines, and almost none of it is instructions for calling tools. It is the rules for telling an invoice from a statement of account, and what to do when the document is neither.

2 · Inside the gateway

Watch 0:23youtube.com/shorts/kbYVZfEiOao
MCP endpoint tool layer auth credential vault cron dashboards

Next.js on Vercel, Postgres behind it. Nothing exotic, and that is deliberate — you want boring here. The MCP route itself is about twenty lines: it starts the handler, registers the tools, and stops. Thin by design, not by accident. Everything interesting lives one level down, in the tools.

3 · Every tool is the same five steps

Watch 1:05youtube.com/shorts/rMbqIVD4CEI
  1. Validate the key
  2. Check the caller is allowed to do this
  3. Do the work
  4. Write it down
  5. Return something the model can read back to a human

Same order, every time. When a tool does not fit that shape, it is usually two tools.

4 · Automate by transaction count, not dollar value

This is the design call most people get wrong.

The biggest supplierThe tiny stuff
About half the money — and about twenty invoices a month. Cash receipts, the odd delivery. Small money, and somebody touches it every single day.

Optimise for dollars and you build a beautiful importer for one supplier and leave the daily grind alone. That is why the daily entry screen is the most-used surface in the system — and why it is phone-first, not a desktop table with a mobile fallback. The person filling it in is standing up, holding paper, in the middle of a shift. If it needs a laptop, it does not get done.

Costs arrive by email, so the gateway watches the mailbox

mailbox queue pending / done

The queue matters more than it sounds. It is the difference between a system that forgets and a system that can tell you it forgot. Anything still sitting there shows on the dashboard — fourteen of them, oldest one nine days old. Nobody has to remember to check.

5 · Two schema decisions that saved weeks

6 · Standing one up is four commands

seed the schema issue a key create the owner invite the managers

7 · Inside the plugin — where the judgment lives

Watch 0:58youtube.com/shorts/cd7U_JuTtDg

The connection is five lines of JSON: a name and a URL. One setting the client fills in — the key, marked sensitive — rides along on every call. Inside, a routing agent reads the request and picks a skill.

The gateway owns the data. The skill owns the judgment. That is the split.

The poller is blind, so the skill has to see

The mailbox poller queues every attachment it finds. It has no idea what any of them are. An invoice and a statement of account look similar and mean completely different things — and it is not the database that tells them apart.

The tell is the shape, not the title. Item lines under one invoice number is an invoice, even if somebody typed Statement across the top.

A document ends up one of four ways

StateWhat it means
filedThe only success. Everything else is a decision, recorded.
not a money documentWith a reason. The mailbox is shared, so a price list or a receipt is routine, not an edge case.
failedWith a reason. A scan too dark to read is still an invoice — that is failed, not not-an-invoice.
deliberately pendingStatements wait for month end on purpose. That is the queue working, not a backlog.

Prose is not a state. Saying it in the summary is not the same as closing it. Leave one document open and it blocks the month close for every outlet, because nobody knows yet which one it belongs to. A helpful paragraph in the report changes nothing — the agent has to write the state down.

Incidents become rules in the skill file

The first live run filed a statement as an invoice. The damage went past untidy: reconciliation never re-checks what a document was filed as, so the junk row got reconciled anyway and invented a variance that did not exist. One bad row, and the owner spends an afternoon chasing a supplier about money that was never missing. That is what a skill is for.

No curl, no secrets in a skill file

If it needs something, it asks the gateway. Which also means the client can read the skills — they are markdown. An owner who wants to know what the thing does can open the file and find out. On the other build the skills drive a browser under the client's own login: no shared passwords, nothing scraped. They already pay for that data; the system just uses the seat they have, the way a staff member would. That one detail has closed more conversations than any feature.

8 · The credential model

Watch 1:00youtube.com/shorts/YJr9td-c_zw
gateway mints key plugin config every tool validates only the gateway writes

gw_live_…  one key, switchable, per client

9 · Trust is a feature you build, then demo

Every client has the same worry underneath the questions: what if it does something stupid while I am asleep? The gate is the answer, and you sell it as a feature. The system does the boring ninety percent and stops at the part with consequences. Nothing that matters happens without a person saying yes.

The thirty-second demo that closes a nervous ownerWatch 0:54youtube.com/shorts/APqu72LhB-c

Log in as one of their managers, in front of them, on their own data. Let them watch the other outlets disappear. Telling them about row-level security does nothing. Watching their own numbers vanish does all of it.

10 · Two things I got wrong

Seven credentials on every callWatch 0:22youtube.com/shorts/ItuPZR_Rpiw

7 keys in the plugin 1 key you can switch off

The gateway had nowhere to keep them yet, so every call carried the client's whole keyring and the plugin had to be trusted with all of it. It worked, it shipped, and it was wrong. Same behaviour today — a fraction of the blast radius.

An error in the spec becomes an error in the code

A diagram in my own doc showed three things where there were only two. It built the third, confidently, and reported an empty column every month. When you build from a written spec with AI, a mistake in the spec ships fast, and without argument. I read my own diagrams like a stranger wrote them now.

Which changes what the hard part isWatch 1:02youtube.com/shorts/eZ-FnNcD7L0

Writing the code stopped being the bottleneck a while ago. Knowing whether it does what you think it does is the bottleneck now.

11 · How the client actually happened

Watch 0:48youtube.com/shorts/esmy20j1dOY

Nobody hands a stranger fifteen thousand dollars for a system they cannot picture yet. This one came through a free build: seven days, no invoice, no contract. Two agents — two skills in a plugin, one job each, done properly.

By the time we spoke about anything bigger, they had already watched something I built do real work in their business for a month. Deliver value so high, so early, that the upsell is not a pitch — it is the obvious next step.

Then the real objection: they wanted to stay on Google Sheets. Fair — it was free, familiar, and the whole team could already use it. Arguing about databases would have gone nowhere; nobody wins that with a list of reasons. So I built a preview instead, with their actual numbers and their actual outlets, backfilled with their real history. One screen showing what month end looks like when it is already done. That is what changed their mind. Not me talking.

12 · Scope by counting edges, not features

Watch 0:28youtube.com/shorts/KO9-18xCsN8

An edge is anywhere the system touches something that is not yours. Screens are predictable — you can build a screen on a Tuesday. Edges are where the surprises live, and they are the only thing that has ever blown a timeline.

Count theseNot these
a mailbox · a point-of-sale · a data provider they already pay for · their accounting software features · screens · nights you spent on it

An edge is not code. It is somebody else's login, somebody else's rate limit, and a format that changes without telling you.

The scoping call is one question, asked a dozen ways

“Where does this number come from today?” Keep asking until nobody says oh, and there’s also…. That sentence is the one that costs you a fortnight. Then write down what is out, on paper, before anybody signs. That list is the reason these projects finish — without it you do not have a project, you have a subscription to somebody's ideas.

13 · The price follows the edges

Watch 0:19youtube.com/shorts/ocH0pVUF2yg

Same architecture and the same two repos both times. The difference between a ten and a fifteen was how many systems it had to talk to — not hours spent. It is not a formula anybody can hand you, because your rate is not mine, but the shape holds: count the edges, and the number moves with that.

And the second build was much faster than the first. Same bones, a different business on top. That is the moment it stops being a favour you did once and starts being a product you sell.

14 · How to sell it

Watch 0:27youtube.com/shorts/AVykf9OT7eU

Start here

Build the gateway first. Own the data and the credentials before anything else. The plugin is the easy half, and it is the half that changes — the gateway is the part you will still be running in two years.

Not part of the build map

Who built it — and how to have one built for you.

Already running for

“We used to spend hours every week on content and reporting. Now it just happens — and the quality is better than what we were doing manually. It’s like having a full marketing team that never sleeps.”

— Director, NPC Office · Jakarta, Indonesia
  • Real Estate Investment — Four tools became one system
  • International logistics group — 5 companies, centrally managed
  • Private Jet Charter & Aircraft Management — Running with no one managing it
Read the case studies →fiveagents.io/case-studies

Or have it built for you

Done-for-you Claude AI agents surface and pre-screen the opportunities that fit your criteria, so you spend your time closing, not chasing. Live in days, not months.

“The right opportunities land in front of us automatically, already screened, and we just decide what to pursue.”

— Charles Lintakoon, Co-founder, Adana Capital
Get started →fiveagents.io/get-started
Petric Manurung · youtube.com/@petricbuilds Full 25-minute breakdown on the channel