integration-builder
Skill68 starsChanged 6 months agoMITView on GitHub
Composes a complete payment integration by resolving capability fragments against the chosen provider's catalog entry, then emits a structured file plan for integration-specialist to execute. Selects fragments by verification family, notification model and checkout pattern rather than by provider name, so a provider new to the catalog composes correctly without new templates. Refuses to emit a signature verifier when the provider's scheme is not verified, emitting re-fetch and an explicit TODO instead.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NAVANEETHVVINOD/agent-orchestratortheir own version, first seen Oct 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- NAVANEETHVVINOD/agent-orchestrator★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- doctorSkill
- payment-advisorSkill
- 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
17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
If integration_level is advise, stop.
- Very specific: line 64
Read skills/payment-advisor/data/providers/<provider>.json — the full entry, not the index.
- Very specific: line 65
Read recipes/default.json (or the use-case overlay, when one applies).
- Very specific: line 66
Check the evidence gate: If webhook.evidence.confidence is not "high", you must not emit a signature verifier.
- Very specific: line 87
Refunds are not universal: If every method in required_methods has reversibility: "irreversible_no_refund", a refund endpoint is fiction.
- Very specific: line 92
Amounts follow the currency, not the provider: Read the exponent from currencies.json.
- Very specific: line 97
Weak crypto stays weak: If webhook.weak_crypto is set, implement the documented algorithm and emit the warning.
- Very specific: line 133
Use crypto.randomUUID() literally on the idempotency line.
- Distinctive: line 135
Never clobber. If a table or route already exists, namespace the new one and record the collision in the audit trail.
- Very specific: line 137
Every line that exists to satisfy a security rule carries // Rule N: <short reason>.
- Distinctive: line 144
Do not write files. Emit the plan.
- Distinctive: line 145
Do not emit a signature verifier when the evidence gate fails.
- Distinctive: line 146
Do not select a fragment by provider name when a family fragment exists — that is how 960 compiled files grow back.
- Very specific: line 148
Do not emit a webhook route for a provider whose notification_model is not webhook.
- Distinctive: line 149
Do not skip the customer portal for a subscription.
- Very specific: line 151
Do not log whole event payloads (Rule 6) — event.id, type and created only.
- Distinctive: line 152
Do not post card data to the merchant's own server (Rule 12).
≈ “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 -->integration-builder
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.
The idea that makes this scale
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.
Inputs
{
"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.
Algorithm
- Read
skills/payment-advisor/data/providers/<provider>.json— the full entry, not the index. - Read
recipes/default.json(or the use-case overlay, when one applies). - Check the evidence gate. If
webhook.evidence.confidenceis not"high", you must not emit a signature verifier. Emit the re-fetch path, event-id dedup, and a loudTODOcitingdocs_url. A verifier built on an unverified scheme is worse than no verifier: it looks correct and accepts forged events. - For each slot in the recipe, in order, evaluate
skip_ifand resolvefragments, substituting{provider},{stack},{orm},{verification_family},{notification_model},{checkout_pattern},{billing_slot}. - Layer provider-specific material on top of the family fragment where it exists.
- Emit the plan.
Conditions worth getting right
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.
The plan you emit
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"]
}Composition rules
- Webhook routes are always namespaced
/api/webhook/<provider>. Multi-provider coexistence is the default, not the exception —/pagokit:adddepends on it. - Pin the SDK version, and pin the API version where
api_versioning.pin_requiredis true. - Use
crypto.randomUUID()literally on the idempotency line. The validator matches that canonical string. - Never clobber. If a table or route already exists, namespace the new one and record the collision in the audit trail.
- Every line that exists to satisfy a security rule carries
// Rule N: <short reason>. Without the tag, the next person deletes it as noise. PAGOKIT_INTEGRATION.mdis mandatory./pagokit:doctorcannot audit an integration it cannot identify.
Anti-patterns
- Do not write files. Emit the plan.
- Do not emit a signature verifier when the evidence gate fails.
- Do not select a fragment by provider name when a family fragment exists — that is how 960 compiled files grow back.
- Do not emit a webhook route for a provider whose
notification_modelis notwebhook. - Do not skip the customer portal for a subscription; without it the user has no cancellation flow, which is a legal problem in several markets, not just a UX gap.
- Do not log whole event payloads (Rule 6) —
event.id, type and created only. - Do not post card data to the merchant's own server (Rule 12). Use the provider's element.
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.

