egypt-payment-guardian
Skill4 starsChanged 6 months agoMITView on GitHub
Use when building or reviewing Egypt payment flows, including Paymob, FawryPay, Geidea Egypt, EasyKash, Kashier, PaySky, valU, Souhoola, callbacks, webhooks, HMAC, redirects, refunds, pending payments, duplicate events, or payment secret boundaries.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/egypt-payment-guardian.mdcCursor rule
- .cursor/rules/mena-payment-guardian.mdcCursor rule
- mena-payment-guardianSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 16 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill for Egypt payment integrations where provider redirects, callbacks, signatures, currency handling, and duplicate events can …
- Distinctive: line 14
Always follow this order:
- Distinctive: line 19
Verify the provider authenticity signal: HMAC, signature, SecureHash, webhook signature, or documented server-side inquiry.
- Distinctive: line 23
Add tests or manual QA for duplicate events, invalid signatures, delayed callbacks, and stale state.
- Distinctive: line 27
Treat all money movement as high risk.
- Distinctive: line 28
Never fulfill from a browser redirect, hosted checkout result, SDK callback, or frontend-only status alone.
- Distinctive: line 29
Verify provider signatures, HMACs, or secure hashes exactly as documented.
- Distinctive: line 30
Keep merchant credentials, HMAC secrets, secret keys, and service role keys server-side only.
- Distinctive: line 38
Before implementing or reviewing payment code, identify:
- Very specific: line 63
Use references/provider-index.json to check source URLs, readiness, public/gated status, and last verification dates.
- Distinctive: line 67
Use the Egypt provider reference first as the public-safe checklist.
- Distinctive: line 69
Keep this skill Egypt-only.
- Distinctive: line 71
Do not vendor full provider docs, watcher snapshots, screenshots, merchant docs, credentials, signatures, test cards, or dashboard material …
- Very specific: line 84
Prefer server-confirmed activation.
- Distinctive: line 85
Use a payment transaction table plus a payment event table or equivalent durable records.
- Very specific: line 87
Never overwrite paid with pending, failed, or cancelled from an older or weaker signal.
- Distinctive: line 89
If official docs are unavailable or gated, state that and ask for merchant docs.
- Distinctive: line 95
When answering a payment implementation or review request, return:
- Distinctive: line 102
Test matrix including duplicate events, invalid signature, amount/currency mismatch, callback-before-redirect, and redirect-before-callback.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Egypt Payment Guardian
Mission
Use this skill for Egypt payment integrations where provider redirects, callbacks, signatures, currency handling, and duplicate events can break production. Treat the provider reference files as source-linked field notes, not a replacement for official docs.
Decision Path
Always follow this order:
- Identify the provider, integration path, environment, and payment method.
- Load the provider reference and any shared pattern that matches the risk.
- Confirm the server boundary and list secret env var names only.
- Verify the provider authenticity signal: HMAC, signature, SecureHash, webhook signature, or documented server-side inquiry.
- Compare local order reference, provider reference, amount, currency, and status fields.
- Store the provider event/reference idempotently before fulfillment.
- Fulfill only from verified server-side state.
- Add tests or manual QA for duplicate events, invalid signatures, delayed callbacks, and stale state.
Non-Negotiables
- Treat all money movement as high risk.
- Never fulfill from a browser redirect, hosted checkout result, SDK callback, or frontend-only status alone.
- Verify provider signatures, HMACs, or secure hashes exactly as documented.
- Keep merchant credentials, HMAC secrets, secret keys, and service role keys server-side only.
- Compare provider amount, currency, order reference, and transaction reference before creating paid state.
- Make callbacks, webhooks, retries, inquiry responses, and page refreshes idempotent.
- Store provider event/reference uniqueness before activating subscriptions, enrollments, bookings, credits, or invoices.
- Log safe identifiers only: order id, provider reference, status, timestamp. Never log tokens, card data, signatures, HMAC secrets, or raw credentials.
Required Audit
Before implementing or reviewing payment code, identify:
- Provider and integration path.
- Sandbox/test vs live environment.
- Amount unit and currency rules.
- Server endpoint receiving callbacks or webhooks.
- Signature/HMAC/SecureHash method and raw-body requirements.
- Unique payment, order, event, and provider reference fields.
- Status mapping for pending, paid, failed, cancelled, expired, refunded, voided, and duplicate.
- Ordering behavior when callback/webhook arrives before or after client redirect.
- What happens on duplicate callback, retry, refresh, refund, void, missing user, or missing order.
- Env var names by name only, never values.
Provider References
Load only the provider file needed for the task:
- Paymob:
references/providers/paymob.md - FawryPay:
references/providers/fawrypay.md - Geidea Egypt:
references/providers/geidea-egypt.md - EasyKash:
references/providers/easykash.md - Kashier:
references/providers/kashier.md - PaySky:
references/providers/paysky.md - valU and Souhoola through PSPs:
references/providers/egypt-bnpl-methods.md
Use references/provider-index.json to check source URLs, readiness, public/gated status, and last verification dates.
Latest Official Docs Access
- Use the Egypt provider reference first as the public-safe checklist.
- For endpoint-level fields, signatures, status values, amount/currency behavior, callback handling, or BNPL method details, check the matching Egypt provider's
source_urlsinreferences/provider-index.jsonand fetch official provider-controlled docs orllms.txtindexes when available. - Keep this skill Egypt-only. Do not import Tap Payments, MyFatoorah, Tabby, Tamara, HyperPay, or other MENA-only provider assumptions unless official public docs explicitly show Egypt support for the requested integration.
- For broader Arab/MENA provider work, switch to
mena-payment-guardianand its regional provider index. - Do not vendor full provider docs, watcher snapshots, screenshots, merchant docs, credentials, signatures, test cards, or dashboard material into the skill.
Shared Patterns
Load these when the implementation touches the matching risk:
- Fulfillment flow:
references/patterns/webhook-first-fulfillment.md - Idempotency and state transitions:
references/patterns/idempotency-state-transitions.md - Secret and server boundary:
references/patterns/server-secret-boundary.md - Private docs policy:
references/patterns/private-docs-policy.md
Implementation Bias
- Prefer server-confirmed activation. Redirect pages should show
processingunless server state is already paid. - Use a payment transaction table plus a payment event table or equivalent durable records.
- Enforce unique constraints on provider transaction/event references and merchant order references.
- Never overwrite
paidwithpending,failed, orcancelledfrom an older or weaker signal. - For Supabase, privileged payment writes belong in Edge Functions or server routes with service role isolated from browser code.
- If official docs are unavailable or gated, state that and ask for merchant docs. Do not invent endpoints, status names, headers, signatures, or test cards.
- For providers with full-depth coverage, use the provider file as a checklist and still link to the official docs for endpoint-level details.
- For providers with conservative coverage, stop before custom endpoint work unless official merchant docs are provided.
Required Output
When answering a payment implementation or review request, return:
- Current payment architecture.
- Provider contract and source confidence.
- Server boundary and secret handling.
- Idempotency strategy.
- Risk points and safe fix plan.
- Test matrix including duplicate events, invalid signature, amount/currency mismatch, callback-before-redirect, and redirect-before-callback.
- Remaining unknowns and deployment/rollback notes.
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.

