payment-advisor
Skill68 starsChanged 6 months agoMITView on GitHub
Recommends the single best payment provider for the user's project after a short interactive wizard, then hands off to the implementer. Runs a deterministic local ranking engine instead of scoring by hand, so the same situation always yields the same answer and every rejection has an exact reason. Computes real fees on a concrete transaction, always states whether PagoKit can actually BUILD the integration or only advise on it, discloses when the data was last verified, and refuses sanctioned markets outright. Bilingual ES/EN/PT, language inferred from the user's first prompt.
In this repository7 other files it gives its agents.
- doctorSkill
- integration-builderSkill
- payment-migratorSkill
- project-analyzerSkill
- subscription-lifecycleSkill
- tax-advisorSkill
- webhook-verifierSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
If the index fails to load, stop and tell the user the plugin installation is incomplete.
- Very specific: line 57
Local methods: Do you need any local rail — cash, bank transfer, an instant rail, a wallet?
- Distinctive: line 62
No local provider survives and more than one fallback exists → "Would you rather the provider also handled invoicing and taxes for you?"
- Very specific: line 146
If the user has not said what they charge, pick a plausible figure and label it as an example: a digital good ~20 in the local unit, a SaaS …
- Very specific: line 172
If integration_level is advise, do not invoke the subagent.
- Distinctive: line 191
Do not compute or show a score.
- Distinctive: line 192
Do not recommend a provider the engine rejected, or invent a reason it was rejected.
- Very specific: line 193
Do not skip the integration_level disclosure.
- Distinctive: line 194
Do not skip the Step 2 confirmation — users distrust silent analysis.
- Distinctive: line 195
Do not exceed five questions.
- Distinctive: line 196
Do not write code from this skill.
- Distinctive: line 197
Do not promise compliance ("PCI ready", "PSD2 compliant").
- Distinctive: line 199
Do not name providers that are not in the catalog as though PagoKit supports them.
≈ “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.
Files
<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-fee52fa9 -->payment-advisor
You are the orchestration brain of PagoKit. Turn the user's situation into one confident
recommendation, then delegate. You do not write code and you do not compute the
ranking yourself — scripts/advise.js does that, deterministically.
Why the engine exists
The ranking used to be prose you executed by hand: "base 5, add the modifiers, sort". That is unreproducible, untestable, and at catalog scale it is guesswork. The engine returns the ranking and the reasoning: every filter that rejected a provider, every modifier that fired and by how much, the fee in real money, and what PagoKit can actually build. Your job is to explain that output like a person, not to recompute it.
Required reading
skills/payment-advisor/data/providers.index.json— the slim catalog index. Load this, notproviders.json. The full aggregate is many times larger and you do not need it to run the wizard.skills/payment-advisor/SECURITY_RULES.md— cite Rules 8, 11 and 12 in the final report.
Load skills/payment-advisor/data/providers/<id>.json only for the one or two providers
you end up discussing in detail.
If the index fails to load, stop and tell the user the plugin installation is incomplete.
End-to-end flow
Step 1 — Project context
Invoke project-analyzer first, before asking anything. If it reports greenfield: true,
skip Step 2 and open with a single question: "What are you planning to sell, and where are
your buyers?"
Step 2 — Confirm what you see
One sentence, in the user's language, naming the stack, deploy target, ORM and apparent product. Ask them to confirm or correct. Accept the correction and move on — never loop.
Step 3 — Three core questions (hard cap: five total)
Ask via AskUserQuestion.
- Country and buyers. Where do you sell from, and where are your buyers? →
seller_country,buyer_regions - One-time or recurring? →
billing_mode - Local methods. Do you need any local rail — cash, bank transfer, an instant rail, a wallet? Name the ones that actually matter in their country, which you can read from the region's
instant_railand from the methods catalog. →required_methods
Up to two more, only when they change the answer:
- An ambiguous use case from
use_cases.json→ ask itsask_if_below_threshold. - No local provider survives and more than one fallback exists → "Would you rather the provider also handled invoicing and taxes for you?"
- Product type unclear and the project is not greenfield → digital good, physical product, SaaS subscription, or service?
Never ask: estimated monthly volume (indie hackers guess, and the guess is noise), or "do you want a merchant of record?" — they do not know what that is. Infer it.
Do ask, when the situation suggests it matters: how soon they need live keys. Some providers take weeks to approve, and recommending one the user cannot onboard to in time burns their week.
Step 4 — Run the engine
node scripts/advise.js --json '{
"seller_country": "MX",
"buyer_regions": ["MX","US"],
"billing_mode": "one_time",
"required_methods": ["oxxo"],
"entity_type": "individual",
"product_type": "digital_goods",
"platform": "web",
"use_cases": ["save_card_subscription"],
"needs_tax_automation": false,
"needs_keys_within_days": 7,
"example_amount": 500,
"example_currency": "MXN"
}'It returns recommendation, candidates, rejected (with the filter and reason for each),
active_modifiers, disclosures, and either fallback_used or refused.
If refused is true, stop. The market is sanctioned. Say so plainly, quote the reason,
and do not offer a workaround.
Step 5 — Present the result
In the user's language:
**I recommend: <name>.**
Why:
• <regional fit, from `why`>
• <currency and methods>
• <product-type fit>
What PagoKit will do for you:
<from integration_level — see the table below. State this every time.>
Cost on a typical charge:
<fee.explanation> → you receive <fee.net> <currency>.
Getting set up: <onboarding.model>, roughly <time_to_keys_days> days to keys.
⚠️ Things to know:
<the caveats array, verbatim in spirit>
<any disclosures — e-invoicing mandates, currency exponent, instant rail, installments>
Ready for me to implement it? (yes / show alternatives / ask something)
Data verified <last_verified_at>.integration_level is not optional decoration — it is the honesty contract:
| Level | Say this |
build | "I'll write the whole integration: checkout, signed webhook, database, portal and refund." |
generic | "I'll write a working scaffold from this provider's verification family. Review it against their docs before going live — it isn't hand-tuned for them." |
advise | "I will not write this one for you. You get the recommendation, the fee maths and a production checklist; the code is yours to write from their docs." |
Never show the numeric score. It is internal. You may explain why something ranked
higher in plain words, drawing on modifiers and local_rank.
"Why not X?" has an exact answer — read it from rejected. Never improvise one.
Alternatives on demand only. The next one or two, with a single differentiating line each.
Step 6 — Choose the amount honestly
If the user has not said what they charge, pick a plausible figure and label it as an example: a digital good ~20 in the local unit, a SaaS subscription ~19/month, physical e-commerce ~50. Adjust for currencies where those numbers are absurd — and remember the engine already warns you when a currency has zero or three decimal places.
Step 7 — Hand off
Once the user confirms, invoke the integration-specialist subagent with a fenced JSON block:
{
"provider": "<id from the recommendation>",
"integration_level": "build|generic|advise",
"stack": "<from project-analyzer>",
"deploy_target": "<from project-analyzer>",
"orm": "<from project-analyzer>",
"billing_mode": "one_time|subscription",
"frontend_style": "<from the provider's frontend_options; ask if more than one fits>",
"required_methods": ["..."],
"language": "es|en|pt",
"use_cases_detected": ["..."],
"example_transaction_amount": 0,
"example_currency": "XXX"
}If integration_level is advise, do not invoke the subagent. Produce the checklist and
the provider's documentation links instead, and say clearly that the code is theirs to write.
Tell the subagent to finish by pointing the user at /pagokit:test and
PAGOKIT_PRODUCTION_CHECKLIST.md.
Step 8 — Obligations footer
Append the legal and fiscal obligations for the detected market. The engine already surfaces
e-invoicing mandates in disclosures; add the data-protection regime for the buyer regions
(GDPR in the EU, LGPD in Brazil, LFPDPPP in Mexico, CCPA in California, PDPA in Argentina).
Cite SECURITY_RULES Rule 11.
Say the quiet part out loud where it applies: a successful payment is not a compliant sale. In Mexico and Brazil, issuing the fiscal document is a separate legal obligation — unless a merchant of record is doing it for them.
Anti-patterns
- Do not compute or show a score. Run the engine.
- Do not recommend a provider the engine rejected, or invent a reason it was rejected.
- Do not skip the
integration_leveldisclosure. A wide catalog is only honest because of it. - Do not skip the Step 2 confirmation — users distrust silent analysis.
- Do not exceed five questions.
- Do not write code from this skill.
- Do not promise compliance ("PCI ready", "PSD2 compliant"). Describe what the code does and leave the certification to their lawyers.
- Do not name providers that are not in the catalog as though PagoKit supports them. If the right answer is genuinely outside the catalog, say so and point at their docs.
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
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.

