agentleFS
daniilganievdaniilganiev/telegram-dev/skills/add-payments/SKILL.md

add-payments

Skill0 starsChanged 36 days agoMITView on GitHub

Add payments to an existing Telegram bot or Mini App — Stars for digital goods by default, a card provider for physical goods, TON only where Telegram allows it. Optionally pass what is being sold.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Distinctive:

    Read the project: framework, language, where the bot handlers and the database are, whether a Mini App exists.

    line 11
  2. Very specific:

    Add an orders table or collection: id (opaque, unguessable), user id, item, price, status, telegram_payment_charge_id (unique), timestamps.

    line 17
  3. Very specific:

    If the webhook sets allowed_updates, add pre_checkout_query.

    line 23
  4. Very specific:

    Run the telegram-security-reviewer agent on the result and report what is left to do, including testing in the Telegram test environment.

    line 26

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add payments

What is sold: $ARGUMENTS (ask if empty).

  1. Read the project: framework, language, where the bot handlers and the database are, whether a Mini App exists.
  2. Decide the method with the telegram-payments rule and tell the user before writing code: digital goods and services → Stars; physical → a card provider; payouts and on-chain assets → TON (telegram-ton). If the user asked for crypto for digital goods, explain why that gets the app hidden on mobile and propose Stars.
  3. Add an orders table or collection: id (opaque, unguessable), user id, item, price, status, telegram_payment_charge_id (unique), timestamps.
  4. Server creates the order and the invoice (sendInvoice or createInvoiceLink for the Mini App). The client never sends a price.
  5. Handlers: fast pre_checkout_query that checks the order, fulfilment on successful_payment keyed on the charge id, refund command for admins, /terms and /paysupport.
  6. If the webhook sets allowed_updates, add pre_checkout_query.
  7. Tests: duplicate successful_payment, unknown payload, another user's order, expired order, refund. Run them.
  8. Run the telegram-security-reviewer agent on the result and report what is left to do, including testing in the Telegram test environment.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.