agentleFS
OpenLinkSoftwareOpenLinkSoftware/ai-agent-skills/mpp-stripe-client/SKILL.md

mpp-stripe-client

Skill42 starsChanged 50 days agoMITView on GitHub

Machine Payment Protocol (MPP) client using Stripe. Prompts for a target MPP-protected URL, then handles the 402 challenge flow automatically — creating a Stripe Shared Payment Token (SPT) and retrying to retrieve the paid resource.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user for:

    line 44
  2. Distinctive:

    If no URL is provided, ask for it.

    line 49
  3. Very specific:

    Do not use npm run cli — it reads .env which overrides inline variables with localhost defaults.

    line 60
  4. Distinctive:

    Create a Stripe test payment method

    line 65
  5. Distinctive:

    Create a Stripe Shared Payment Token (SPT) scoped to the challenge amount

    line 66
  6. Very specific:

    If the server doesn't return 402, report the actual status and body.

    line 80
  7. Distinctive:

    If Stripe calls fail, report the Stripe error message.

    line 81
  8. Distinctive:

    If the MPP challenge parsing fails, report the raw challenge for diagnosis.

    line 82

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

MPP Stripe Client Skill

When to Use

  • "Pay for this resource at ..."
  • "Access this MPP-protected URL ..."
  • "Use Stripe to pay for ..."
  • "Run MPP client against ..."
  • Any request referencing a URL that returns 402 Payment Required with an MPP challenge.

Prerequisites

The project must be installed at ~/Documents/Management/Development/mpp-stripe-client/:

cd ~/Documents/Management/Development/mpp-stripe-client
npm install

A Stripe test secret key (sk_test_...) is required. Set it as an environment variable:

export STRIPE_SECRET_KEY=sk_test_...

Or the skill will ask for it.

Workflow

⛔ PRE-BUILD CHECK: Before producing output, re-read the relevant workflow section above and re-read any checklists or verification gates defined in this skill. Confirm each checklist item before writing output. Build to pass — do not retro-fit. Apply the CLAUDE.md Anti-Drift Protocol: re-read spec section before build, gate-first validation, section-by-section delivery.

Step 1 — Collect target URL and Stripe key

Ask the user for:

  1. Target URL — the MPP-protected resource to access
  2. Stripe secret key — if STRIPE_SECRET_KEY is not already in the environment

If no URL is provided, ask for it. Do not assume defaults.

Step 2 — Run the MPP client

With the target URL and Stripe key confirmed, execute the client. The client runs from the installed project directory and accepts the target URL as SERVER_URL:

cd ~/Documents/Management/Development/mpp-stripe-client \
  && SERVER_URL="<target-url>" STRIPE_SECRET_KEY="<key>" npx tsx cli.ts

Do not use npm run cli — it reads .env which overrides inline variables with localhost defaults. Always invoke npx tsx cli.ts directly with inline SERVER_URL and STRIPE_SECRET_KEY.

The client will:

  1. GET <target-url> — receive 402 Payment Required with challenge
  2. Create a Stripe test payment method
  3. Create a Stripe Shared Payment Token (SPT) scoped to the challenge amount
  4. GET <target-url> with Authorization: Payment <credential>
  5. Receive 200 with the paid resource and receipt

Step 3 — Present the result

Show the user:

  • The HTTP status
  • The response body (the paid resource)
  • The receipt header value (Authentication-Info)

Error handling

  • If the server doesn't return 402, report the actual status and body.
  • If Stripe calls fail, report the Stripe error message.
  • If the MPP challenge parsing fails, report the raw challenge for diagnosis.

Configuration

VariableRequiredDefault
STRIPE_SECRET_KEYYesPrompted if missing
SERVER_URLYesPrompted if missing
STRIPE_PAYMENT_METHODNoCreates test card pm_...
MPPX_STRIPE_SPT_URLNoStripe test endpoint

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.