Skip to content
Back to skills

Check

ASecurity

Pre-production check of an app that uses African payment or messaging APIs: looks for keys in the code or sent to the browser (a free script, no AI), then checks that payments are confirmed server-side with the amount compared, that nothing is paid or delivered twice, and that webhooks are verified, against the Afro.tools specs of the providers used. Invoke with: /afrotools:check. Afro.tools Studio runs it before going live. Manual invocation only.

  • 32 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsrustgobashnodegitapidatabasesecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add afrotools/afrotools --skill check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/afrotools-check/badge)](https://www.skillsdirectory.com/skills/afrotools-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: check
description: >
  Pre-production check of an app that uses African payment or messaging APIs: looks for keys in the
  code or sent to the browser (a free script, no AI), then checks that payments are confirmed
  server-side with the amount compared, that nothing is paid or delivered twice, and that webhooks are
  verified, against the Afro.tools specs of the providers used. Invoke with: /afrotools:check.
  Afro.tools Studio runs it before going live. Manual invocation only.
disable-model-invocation: true
---

# /afrotools:check

The cheap check that always runs before going live. Speak to the user in their language, in plain
words; report each problem as what could go wrong for them, then what you change.

1. **Keys** (rule 3): run the free script on the project, no AI involved. Its source is
   [scripts/scan-secrets.md](scripts/scan-secrets.md) (a fenced code block, not a runnable file: the
   directory only accepts scripts from a Verified organization, which this plugin isn't yet). Write that
   block, unchanged, to `.afrotools/tools/scan-secrets.mjs` in the project (create `.afrotools/tools/`
   first if missing; overwrite the file if it already exists, so an older copy never runs), then:

   ```bash
   node .afrotools/tools/scan-secrets.mjs .
   ```

   Exit 0: nothing found. Exit 1: each line is `file:line: reason`. Exit 2: a file or folder could not
   be read (it is named on a `could not read` line, the rest was scanned and its findings are printed):
   say which, as not checked. If the output is a Node error such as `Cannot find module`, the script
   did not run: fix the path and run it again; it is not a finding.

   For each finding, never copy or move the key's value yourself. Replace the literal with
   `process.env.NAME` read on the server only, rename a variable a bundler sends to the browser, and
   stop tracking a committed `.env` (`git rm --cached`). Then tell the user the key must be treated as
   leaked: regenerate it at the provider and put the new one in `.env` themselves. Moving it is not
   enough while the old one is still valid and in the history.

2. **Payments, webhooks and messages** (rules 1, 2 and 4). For each provider the app uses (from
   `.afrotools/studio.md`, or the code), fetch its specs: `afrotools.get_spec()` for the payment, its
   status and its webhook. Then read the code that handles them and check, one line each, yes or no
   with the file and line:
   - a payment is marked paid only after a status call made by the server, or on a webhook alone when
     its spec says that is enough (its gotchas, or its example fulfils without a status call) and the
     server authenticates it as that example does; never on the return page;
   - the verified amount is compared with the order's total, never copied onto the order;
   - the idempotency key the spec declares is sent on every payment and payout;
   - handling the same webhook twice does not deliver or credit twice;
   - the webhook's signature is verified when the spec defines `webhook.signature`;
   - anything that sends an SMS, a WhatsApp message or a code without someone logged in is limited per
     phone number and per hour, counted on the server;
   - a list of customers or orders, or another person's data, is never served without a session; a
     customer's own order may be shown through an unguessable reference in its link, never a sequential
     id;
   - when the app has its own login, its attempts are limited per hour, per account or per caller's
     address, counted on the server; with Better Auth, its rate limiter is enabled and keeps its counts
     in the database (`rateLimit.storage: "database"`, not the in-memory default), a phone code is also
     counted per phone number, and the email sign-up route is closed to strangers (enabling email and
     password opens it, page or no page: only the owner's first account passes, then the owner creates
     the others);
   - every gotcha of these specs that applies to the code is handled.

   A spec's gotcha may make a rule hard (for example a provider whose webhook cannot be authenticated
   and whose status call fails in the sandbox): say so, and keep the payment pending rather than
   confirming it on a proof weaker than its spec trusts. A webhook its spec says is enough, once
   authenticated, is not a weaker proof.

3. **Report** in two groups: **blocking** (money or customer data at risk) and **can wait**. A way for
   a stranger to send messages without a limit or to read customer data, for a customer to pay twice, or for an order to be marked paid without a verified payment, is always
   blocking. If the user goes live without fixing a blocking point, add it to
   `.afrotools/accepted-risks.md` in the format given in `../review/SKILL.md`. Fix what
   you can with the user's agreement, then run the check again.

4. **Offer the deeper checks**, strongly advised, never forced: a code review and a security audit by a
   separate reviewer (`/afrotools:review`), saying what they catch and that they use tokens (the
   assistant's usage, included in their plan up to a limit or billed by use).

Files in this skill

  • SKILL.md5 KB
  • scripts/scan-secrets.md7.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.