agentleFS
alanalvestechalanalvestech/hitank/skills/mercadopago/SKILL.md

mercadopago

Skill38 starsChanged 8 months agoMITView on GitHub

Manage MercadoPago payments, customers and account via API

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Very specific:

    If the output is OK, proceed to the Flow section.

    line 35
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 37
  3. Distinctive:

    If the script outputs an error, the token is invalid.

    line 55
  4. Very specific:

    If $ARGUMENTS looks like a numeric ID, show payment details.

    line 65
  5. Distinctive:

    Ask the user for the payment details (amount, description, payment method, payer email).

    line 83

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

/mercadopago

Connect to the MercadoPago API to manage payments, refunds, customers and payment methods. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb              # Bearer token + mp_request helper (required by all scripts)
├── check_setup.rb       # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb        # Save and validate an API token
├── payments.rb          # List/search payments (optional --status flag)
├── payment.rb           # Get payment details by ID
├── create_payment.rb    # Create a new payment (requires confirmation)
├── refund.rb            # Refund a payment (requires confirmation)
├── customers.rb         # List/search customers
├── customer.rb          # Get customer details by ID
├── payment_methods.rb   # List available payment methods
└── account_balance.rb   # Check account balance

Setup (check before using)

ruby ~/.claude/skills/mercadopago/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create an access token:

You need a MercadoPago Access Token. Go to the developer panel to get one:

https://www.mercadopago.com.br/developers/panel/app

Select your application (or create one), then go to Credentials and copy your Access Token (production or test, depending on your needs).

Paste the token here.

Step 2 — When the user pastes the token, save it:

ruby ~/.claude/skills/mercadopago/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a payment ID or search query.

Step 1: Identify intent

If $ARGUMENTS looks like a numeric ID, show payment details. Otherwise, list payments or ask the user what they want to do.

Step 2: Actions

List/search payments:

ruby ~/.claude/skills/mercadopago/scripts/payments.rb
ruby ~/.claude/skills/mercadopago/scripts/payments.rb --status approved
ruby ~/.claude/skills/mercadopago/scripts/payments.rb --status pending

Get payment details:

ruby ~/.claude/skills/mercadopago/scripts/payment.rb PAYMENT_ID

Create a payment (requires user confirmation):

Ask the user for the payment details (amount, description, payment method, payer email). Confirm before executing.

ruby ~/.claude/skills/mercadopago/scripts/create_payment.rb '{"transaction_amount":100.0,"description":"Product","payment_method_id":"pix","payer":{"email":"buyer@example.com"}}'

Refund a payment (requires user confirmation):

Show payment details first, then ask: "Do you want to refund this payment?" Only execute after a "yes".

ruby ~/.claude/skills/mercadopago/scripts/refund.rb PAYMENT_ID

List customers:

ruby ~/.claude/skills/mercadopago/scripts/customers.rb
ruby ~/.claude/skills/mercadopago/scripts/customers.rb --email user@example.com

Get customer details:

ruby ~/.claude/skills/mercadopago/scripts/customer.rb CUSTOMER_ID

List available payment methods:

ruby ~/.claude/skills/mercadopago/scripts/payment_methods.rb

Check account balance:

ruby ~/.claude/skills/mercadopago/scripts/account_balance.rb

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bearer token in Authorization header
  • Token file: ~/.config/mercadopago/token (outside the repo, never commit)
  • Creating payments and refunding require explicit user confirmation
  • Base URL: https://api.mercadopago.com

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.