/pagokit:integration-builderfrom PagoKit — Payment Integration Agent
Composes payment integrations by resolving capability fragments against a provider's catalog entry, selecting by verification family, notification model, and checkout pattern. Emits a structured file plan for execution by integration-specialist.
Ships in PagoKit — Payment Integration Agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are the composition algorithm. You do not write to the user's project — you read
fragments and emit a plan. integration-specialist executes it.
Providers differ in a small number of ways, and those ways repeat. There are roughly fourteen webhook verification families across every payment provider in the world, five checkout patterns and five notification models. So a fragment is written once per family, not once per provider.
That is why this skill contains no provider names. You resolve fragments from the provider's catalog entry:
| Choose by | Field | Fragment |
|---|---|---|
| How the callback is authenticated | webhook.verification_family | fragments/webhook/<family>.md |
| How the merchant learns of the payment | notification_model | fragments/notify/<model>.md |
| How the payment is created | checkout_spec.pattern | fragments/checkout/<pattern>.md |
| One-off vs recurring vs mandate vs metered | billing_mode + recurring.rails | fragments/billing/<slot>.md |
| Framework plumbing | the detected stack | templates/_stack-adapters/<stack>.md |
| Persistence | the detected ORM | templates/_db-adapters/<orm>.md |
| Deployment | the detected target | templates/_deploy-targets/<target>.md |
Providers at integration_level: build also have hand-written material in
templates/<provider>/ and quirks in overrides/<provider>/notes.md. Provider-specific
material always wins over the family fragment — it exists precisely because the family
default is wrong for that provider.
{
"provider": "<catalog id>",
"integration_level": "build|generic|advise",
"stack": "...", "orm": "...", "deploy_target": "...",
"billing_mode": "one_time|subscription",
"frontend_style": "hosted|embedded|widget|...",
"required_methods": ["..."],
"use_cases_detected": ["..."],
"language": "es|en|pt",
"example_transaction_amount": 0,
"example_currency": "XXX"
}
If integration_level is advise, stop. Emit a research checklist and the provider's
documentation links, and state that PagoKit will not write this integration. Do not improvise
a scaffold from a scheme nobody verified.
skills/payment-advisor/data/providers/<provider>.json — the full entry, not the index.recipes/default.json (or the use-case overlay, when one applies).webhook.evidence.confidence is not "high", you must
not emit a signature verifier. Emit the re-fetch path, event-id dedup, and a loud TODO
citing docs_url. A verifier built on an unverified scheme is worse than no verifier: it
looks correct and accepts forged events.skip_if and resolve fragments,
substituting {provider}, {stack}, {orm}, {verification_family},
{notification_model}, {checkout_pattern}, {billing_slot}.notification_model is not always webhook. A return_url_commit provider never calls
you; it hands control back through the browser and expects a commit call. Emit the commit
slot and do not emit a webhook route. Omitting the commit means the transaction
auto-reverses — silent, and it looks like the payment simply failed.
payload_authoritative: false means the payload is a rumour. Emit the re-fetch before any
state change, whatever the signature says. When signature_covers_body is false, this is not
optional: fields outside the signed set are attacker-controlled.
Refunds are not universal. If every method in required_methods has
reversibility: "irreversible_no_refund", a refund endpoint is fiction. Emit the payout-based
alternative and say so in the audit trail. For mandate_indemnity rails, note that a
"successful" charge can be clawed back weeks later.
Amounts follow the currency, not the provider. Read the exponent from currencies.json.
JPY, KRW and CLP take integers; KWD, BHD and OMR take three decimals. A reflexive × 100
overcharges by 100× in the first group — and in the second it also breaks any provider that
hashes the amount at its ISO exponent, so the developer debugs the signature instead.
Weak crypto stays weak. If webhook.weak_crypto is set, implement the documented
algorithm and emit the warning. Silently "upgrading" MD5 to SHA-256 produces a verifier that
rejects every genuine event.
A fenced ```json block:
{
"provider": "...", "integration_level": "build|generic",
"verification_family": "...", "notification_model": "...",
"evidence_confidence": "high|medium|unverified",
"files_to_create": [
{
"path": "app/api/webhook/<provider>/route.ts",
"purpose": "Authenticate and dispatch provider notifications",
"fragments": ["fragments/webhook/_preamble.md", "fragments/webhook/<family>.md", "templates/_stack-adapters/<stack>.md"],
"must_include_rule_tags": ["// Rule 3: signature", "// Rule 5: raw body", "// Rule 9: replay"],
"events_routed": ["..."],
"operation": "create",
"skip_if": null
}
],
"commands_to_run": ["<pinned SDK install>", "<migration>"],
"frontend_style_chosen": "...",
"post_install_hint": "Run /pagokit:test — it sends a valid, a forged and a replayed event.",
"warnings": ["anything the developer must know that the code cannot express"]
}
/api/webhook/<provider>. Multi-provider coexistence
is the default, not the exception — /pagokit:add depends on it.api_versioning.pin_required is true.crypto.randomUUID() literally on the idempotency line. The validator matches that
canonical string.// Rule N: <short reason>.
Without the tag, the next person deletes it as noise.PAGOKIT_INTEGRATION.md is mandatory. /pagokit:doctor cannot audit an integration it
cannot identify.notification_model is not webhook.event.id, type and created only.fixtures/README.md (opens in a new tab)fixtures/lemonsqueezy-nextjs-app-router-subscription.md (opens in a new tab)fixtures/mercadopago-express-one-time.md (opens in a new tab)fixtures/mercadopago-nextjs-app-router-one-time.md (opens in a new tab)fixtures/stripe-express-subscription.md (opens in a new tab)fixtures/stripe-nextjs-app-router-one-time.md (opens in a new tab)fixtures/stripe-nextjs-app-router-subscription.md (opens in a new tab)fixtures/wompi-express-one-time.md (opens in a new tab)fixtures/wompi-nextjs-app-router-one-time.md (opens in a new tab)fragments/billing/metered_usage.md (opens in a new tab)fragments/billing/one_time.md (opens in a new tab)fragments/billing/subscription_card.md (opens in a new tab)fragments/billing/subscription_mandate.md (opens in a new tab)fragments/checkout/direct_charge.md (opens in a new tab)fragments/checkout/hosted_overlay.md (opens in a new tab)fragments/checkout/hosted_redirect.md (opens in a new tab)fragments/checkout/intent_client_secret.md (opens in a new tab)fragments/checkout/widget_token.md (opens in a new tab)fragments/compliance/einvoice.md (opens in a new tab)fragments/compliance/mandate_notice.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
- integration-specialist is implementing a chosen provider - The user asks to regenerate or change an existing integration (different billing mode, extra provider)
npx claudepluginhub hainrixz/agente-pagokit --plugin pagokit8 skills in this plugin
/doctorAudits an existing PagoKit integration in the current project against the generated per-provider checklist, so it covers every provider in the catalog rather than a hardcoded few. Checks .gitignore covers .env, that env vars are present and use test-key prefixes, that the webhook secret looks valid, that the webhook handler verifies signatures, that the minimum events for the integrated provider are routed, and that PAGOKIT_INTEGRATION.md exists. Used by /pagokit:doctor. Read-only — never writes files./payment-advisorRecommends 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./payment-migratorPlans and executes a migration from one payment provider to another without downtime. Establishes what cannot move (stored card tokens usually cannot), maps the two providers' event vocabularies, flags architectural differences such as a change of notification model or a move to a merchant of record, and sequences a coexistence period rather than an atomic switch. Powers /pagokit:migrate.Other plugins' skills for the same job