[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C3XYSG19YCT6DRC9KM6N7C":3,"skill-same:01M7C3XYSG19YCT6DRC9KM6N7C":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":13,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7C3XYSG19YCT6DRC9KM6N7C","stripe-link-cli",null,"Agent payments via Stripe Link — cards, SPT, approvals.","fengwhang\u002Fmercury","fengwhang","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F325040254?v=4","01M7C3K54Y41KVGPHEMKEP9X70","01M7C3K55NTZ4B36YP2JY1NMJ0",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fhermes\u002Foptional-skills\u002Fpayments\u002Fstripe-link-cli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stripe-link-cli\ndescription: Agent payments via Stripe Link — cards, SPT, approvals.\nversion: 0.1.0\nauthor: Teknium (teknium1), Hermes Agent\nlicense: MIT\nplatforms: [linux, macos]\nmetadata:\n  mercury:\n    tags: [Payments, Stripe, Link, Checkout, MPP]\n    related_skills: [mpp-agent, stripe-projects]\n---\n\n# Stripe Link CLI Skill\n\nWraps [@stripe\u002Flink-cli](https:\u002F\u002Fgithub.com\u002Fstripe\u002Flink-cli) so Hermes can complete purchases on the user's behalf using one-time-use virtual cards or Shared Payment Tokens (SPT). Every spend is gated by an in-app approval in the Link mobile\u002Fweb app — Hermes cannot self-approve.\n\nUS-only at the moment (Link account requirement). Windows is not supported by the upstream CLI — this skill is gated `[linux, macos]`.\n\n## When to Use\n\nTrigger phrases:\n\n- \"buy X\", \"pay for X\", \"make a purchase\", \"complete checkout\"\n- \"get me a card\", \"I need a payment method\"\n- \"log in to Link\", \"connect my Link wallet\"\n- HTTP 402 response from a merchant API with `www-authenticate: ... method=\"stripe\"`\n\nIf the user wants a paid API call (HTTP 402, no checkout form), the `card` path is wrong — use SPT via this same skill, or hand off to the `mpp-agent` skill.\n\n## Prerequisites\n\n- Node.js 20+ available on `PATH` (`node --version`)\n- US-based (Link account requirement)\n\nThe Link account, payment method, and spend-approval app do NOT need to be set up before Hermes attempts to pay — the CLI walks the user through them on first run:\n\n- A Link account at https:\u002F\u002Fapp.link.com — created\u002Flinked during first `link-cli` auth\n- At least one payment method — added during first run at https:\u002F\u002Fapp.link.com\u002Fwallet\n- The Link mobile\u002Fweb app — opened to approve the first spend request when it's made\n\nNo env vars required — auth state is stored locally by the CLI under its own config directory.\n\n## Install\n\nInstall once, globally:\n\n```\nnpm install -g @stripe\u002Flink-cli\n```\n\nOr invoke ad-hoc via `npx @stripe\u002Flink-cli`. The skill below uses the installed `link-cli` form.\n\n## How to Run\n\nAll commands run through the `terminal` tool. The CLI auto-detects non-TTY callers and emits compact `toon` output by default — fine for the model. Pass `--format json` if a step needs structured fields.\n\nDiscover commands: `link-cli --llms-full`.\nGet a command's schema before invoking: `link-cli \u003Ccommand> --schema`.\n\n## Procedure\n\n### 1. Check \u002F establish auth\n\n```\nlink-cli auth status\n```\n\nIf not authenticated, log in with a clear client name (this label shows in the user's Link app):\n\n```\nlink-cli auth login --client-name \"Hermes\" --interval 5 --timeout 300\n```\n\nThe `--interval`\u002F`--timeout` form polls inline so the agent doesn't need to manage a `_next` step. Print the verification URL + phrase to the user and wait for the CLI to return.\n\n**Do not proceed past this step until `auth status` confirms login.**\n\n### 2. Evaluate the merchant before creating a spend request\n\nDecide the credential type:\n\n| Merchant surface | `--credential-type` |\n|---|---|\n| Standard web checkout form \u002F Stripe Elements | `card` (default) |\n| Returns HTTP 402 with `method=\"stripe\"` in `www-authenticate` | `shared_payment_token` |\n| Returns HTTP 402 without `method=\"stripe\"` | unsupported — stop |\n\nFor 402 responses, do NOT decode the challenge manually. Pass the raw header:\n\n```\nlink-cli mpp decode --challenge '\u003Cfull WWW-Authenticate header>'\n```\n\nThis validates the challenge and extracts the network ID + decoded request body.\n\n### 3. List payment methods + shipping\n\n```\nlink-cli payment-methods list\nlink-cli shipping-address list\n```\n\nUse the first entry unless the user specifies otherwise. The `id` from `payment-methods list` is the `--payment-method-id` in the next step.\n\n### 4. Create the spend request\n\nConfirm the final total with the user before issuing this command. Amounts are in cents.\n\n```\nlink-cli spend-request create \\\n  --payment-method-id \u003Cpm_id> \\\n  --merchant-name \"\u003Cname>\" \\\n  --merchant-url \"\u003Curl>\" \\\n  --context \"\u003Cone sentence: what is being purchased and why>\" \\\n  --amount \u003Ccents> \\\n  --line-item \"name:\u003Citem>,unit_amount:\u003Ccents>,quantity:1\" \\\n  --total \"type:total,display_text:Total,amount:\u003Ccents>\" \\\n  --request-approval\n```\n\nFor MPP merchants add `--credential-type shared_payment_token`.\n\n`--request-approval` pings the user's Link app and polls until they approve or deny. The CLI exits non-zero on deny \u002F timeout.\n\n### 5. Retrieve the credential — SECURELY\n\n**Do not print card details to stdout.** Use `--output-file` so the PAN never enters the agent's transcript or logs:\n\n```\nlink-cli spend-request retrieve \u003Clsrq_id> \\\n  --include card \\\n  --output-file \u002Ftmp\u002Flink-card.json \\\n  --format json\n```\n\nThe file is written with `0600` perms; stdout shows only redacted fields (brand, last4, expiry) plus a `card_output_file` path.\n\n### 6. Use the credential\n\n- For web checkout: hand the file path to the user, OR pass it to a browser-driving tool that fills the form directly from disk. Never `read_file` or `cat` the card file into the agent's reasoning context.\n- For MPP merchants:\n\n  ```\n  link-cli mpp pay \u003Cmerchant-url> \\\n    --spend-request-id \u003Clsrq_id> \\\n    --method POST \\\n    --data '\u003Cjson body>'\n  ```\n\n### 7. Clean up\n\nDelete the card file as soon as the purchase is done:\n\n```\nrm -f \u002Ftmp\u002Flink-card.json\n```\n\n## Optional: run as an MCP server instead\n\n`@stripe\u002Flink-cli --mcp` exposes the same commands as MCP tools over stdio. To register it with Hermes' native MCP:\n\n```\nmercury mcp add stripe-link --command \"npx\" --args \"@stripe\u002Flink-cli --mcp\"\n```\n\nThen `mercury mcp list` should show `stripe-link`. The same approval rules apply — MCP doesn't bypass the Link app approval step.\n\n## Pitfalls\n\n- **US-only.** Outside the US, `auth login` will fail. Tell the user, don't keep retrying.\n- **Card PAN must never enter agent context.** Use `--output-file` every time. If you've already retrieved without it, immediately `link-cli auth logout` is not enough — the card is one-time-use but rotate hygiene matters.\n- **`--request-approval` blocks until the user acts.** If the user is asleep, the CLI will hit its timeout. Set expectations.\n- **Multi-step `_next` commands.** Some commands return `_next.command` that must be executed to continue. When in doubt, prefer the inline-polling flags (`--interval`\u002F`--timeout`).\n- **Output format defaults to `toon`** in non-TTY mode. Fine for prose, but if a downstream step needs to parse a specific field, pass `--format json`.\n- **Don't default to `card`.** The merchant-evaluation step (Section 2) exists because picking the wrong credential type fails the purchase silently or leaks more data than needed.\n\n## Verification\n\n```\nlink-cli --version && link-cli auth status\n```\n\nExit code 0 means installed and logged in.\n","# Stripe Link CLI Skill\n\nWraps [@stripe\u002Flink-cli](https:\u002F\u002Fgithub.com\u002Fstripe\u002Flink-cli) so Hermes can complete purchases on the user's behalf using one-time-use virtual cards or Shared Payment Tokens (SPT). Every spend is gated by an in-app approval in the Link mobile\u002Fweb app — Hermes cannot self-approve.\n\nUS-only at the moment (Link account requirement). Windows is not supported by the upstream CLI — this skill is gated `[linux, macos]`.\n\n## When to Use\n\nTrigger phrases:\n\n- \"buy X\", \"pay for X\", \"make a purchase\", \"complete checkout\"\n- \"get me a card\", \"I need a payment method\"\n- \"log in to Link\", \"connect my Link wallet\"\n- HTTP 402 response from a merchant API with `www-authenticate: ... method=\"stripe\"`\n\nIf the user wants a paid API call (HTTP 402, no checkout form), the `card` path is wrong — use SPT via this same skill, or hand off to the `mpp-agent` skill.\n\n## Prerequisites\n\n- Node.js 20+ available on `PATH` (`node --version`)\n- US-based (Link account requirement)\n\nThe Link account, payment method, and spend-approval app do NOT need to be set up before Hermes attempts to pay — the CLI walks the user through them on first run:\n\n- A Link account at https:\u002F\u002Fapp.link.com — created\u002Flinked during first `link-cli` auth\n- At least one payment method — added during first run at https:\u002F\u002Fapp.link.com\u002Fwallet\n- The Link mobile\u002Fweb app — opened to approve the first spend request when it's made\n\nNo env vars required — auth state is stored locally by the CLI under its own config directory.\n\n## Install\n\nInstall once, globally:\n\n```\nnpm install -g @stripe\u002Flink-cli\n```\n\nOr invoke ad-hoc via `npx @stripe\u002Flink-cli`. The skill below uses the installed `link-cli` form.\n\n## How to Run\n\nAll commands run through the `terminal` tool. The CLI auto-detects non-TTY callers and emits compact `toon` output by default — fine for the model. Pass `--format json` if a step needs structured fields.\n\nDiscover commands: `link-cli --llms-full`.\nGet a command's schema before invoking: `link-cli \u003Ccommand> --schema`.\n\n## Procedure\n\n### 1. Check \u002F establish auth\n\n```\nlink-cli auth status\n```\n\nIf not authenticated, log in with a clear client name (this label shows in the user's Link app):\n\n```\nlink-cli auth login --client-name \"Hermes\" --interval 5 --timeout 300\n```\n\nThe `--interval`\u002F`--timeout` form polls inline so the agent doesn't need to manage a `_next` step. Print the verification URL + phrase to the user and wait for the CLI to return.\n\n**Do not proceed past this step until `auth status` confirms login.**\n\n### 2. Evaluate the merchant before creating a spend request\n\nDecide the credential type:\n\n| Merchant surface | `--credential-type` |\n|---|---|\n| Standard web checkout form \u002F Stripe Elements | `card` (default) |\n| Returns HTTP 402 with `method=\"stripe\"` in `www-authenticate` | `shared_payment_token` |\n| Returns HTTP 402 without `method=\"stripe\"` | unsupported — stop |\n\nFor 402 responses, do NOT decode the challenge manually. Pass the raw header:\n\n```\nlink-cli mpp decode --challenge '\u003Cfull WWW-Authenticate header>'\n```\n\nThis validates the challenge and extracts the network ID + decoded request body.\n\n### 3. List payment methods + shipping\n\n```\nlink-cli payment-methods list\nlink-cli shipping-address list\n```\n\nUse the first entry unless the user specifies otherwise. The `id` from `payment-methods list` is the `--payment-method-id` in the next step.\n\n### 4. Create the spend request\n\nConfirm the final total with the user before issuing this command. Amounts are in cents.\n\n```\nlink-cli spend-request create \\\n  --payment-method-id \u003Cpm_id> \\\n  --merchant-name \"\u003Cname>\" \\\n  --merchant-url \"\u003Curl>\" \\\n  --context \"\u003Cone sentence: what is being purchased and why>\" \\\n  --amount \u003Ccents> \\\n  --line-item \"name:\u003Citem>,unit_amount:\u003Ccents>,quantity:1\" \\\n  --total \"type:total,display_text:Total,amount:\u003Ccents>\" \\\n  --request-approval\n```\n\nFor MPP merchants add `--credential-type shared_payment_token`.\n\n`--request-approval` pings the user's Link app and polls until they approve or deny. The CLI exits non-zero on deny \u002F timeout.\n\n### 5. Retrieve the credential — SECURELY\n\n**Do not print card details to stdout.** Use `--output-file` so the PAN never enters the agent's transcript or logs:\n\n```\nlink-cli spend-request retrieve \u003Clsrq_id> \\\n  --include card \\\n  --output-file \u002Ftmp\u002Flink-card.json \\\n  --format json\n```\n\nThe file is written with `0600` perms; stdout shows only redacted fields (brand, last4, expiry) plus a `card_output_file` path.\n\n### 6. Use the credential\n\n- For web checkout: hand the file path to the user, OR pass it to a browser-driving tool that fills the form directly from disk. Never `read_file` or `cat` the card file into the agent's reasoning context.\n- For MPP merchants:\n\n  ```\n  link-cli mpp pay \u003Cmerchant-url> \\\n    --spend-request-id \u003Clsrq_id> \\\n    --method POST \\\n    --data '\u003Cjson body>'\n  ```\n\n### 7. Clean up\n\nDelete the card file as soon as the purchase is done:\n\n```\nrm -f \u002Ftmp\u002Flink-card.json\n```\n\n## Optional: run as an MCP server instead\n\n`@stripe\u002Flink-cli --mcp` exposes the same commands as MCP tools over stdio. To register it with Hermes' native MCP:\n\n```\nmercury mcp add stripe-link --command \"npx\" --args \"@stripe\u002Flink-cli --mcp\"\n```\n\nThen `mercury mcp list` should show `stripe-link`. The same approval rules apply — MCP doesn't bypass the Link app approval step.\n\n## Pitfalls\n\n- **US-only.** Outside the US, `auth login` will fail. Tell the user, don't keep retrying.\n- **Card PAN must never enter agent context.** Use `--output-file` every time. If you've already retrieved without it, immediately `link-cli auth logout` is not enough — the card is one-time-use but rotate hygiene matters.\n- **`--request-approval` blocks until the user acts.** If the user is asleep, the CLI will hit its timeout. Set expectations.\n- **Multi-step `_next` commands.** Some commands return `_next.command` that must be executed to continue. When in doubt, prefer the inline-polling flags (`--interval`\u002F`--timeout`).\n- **Output format defaults to `toon`** in non-TTY mode. Fine for prose, but if a downstream step needs to parse a specific field, pass `--format json`.\n- **Don't default to `card`.** The merchant-evaluation step (Section 2) exists because picking the wrong credential type fails the purchase silently or leaks more data than needed.\n\n## Verification\n\n```\nlink-cli --version && link-cli auth status\n```\n\nExit code 0 means installed and logged in.\n",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":36,"description":7},"Teknium (teknium1), Hermes Agent","0.1.0",{"mercury":26},{"tags":27,"related_skills":33},[28,29,30,31,32],"Payments","Stripe","Link","Checkout","MPP",[34,35],"mpp-agent","stripe-projects",[37,38],"linux","macos","main","94a12cab2ce32e2020d179b5d579d0cbcbd0f206","hermes\u002Foptional-skills\u002Fpayments\u002Fstripe-link-cli","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury","https:\u002F\u002Fgithub.com\u002Ffengwhang","2026-10-09 08:26:42",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add fengwhang\u002Fmercury --skill stripe-link-cli",{"tool":51,"command":52},"bunx","bunx skills add fengwhang\u002Fmercury --skill stripe-link-cli",{"tool":54,"command":55},"pnpm","pnpm dlx skills add fengwhang\u002Fmercury --skill stripe-link-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fhermes\u002Foptional-skills\u002Fpayments\u002Fstripe-link-cli\u002FSKILL.md",true,[],[60,67,74,81,87,94],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7C4BTY3ND38CN200ZCTH6NV","greet","A greeting skill for testing","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Fmarketplace\u002Ffixtures\u002Fvalid-marketplace\u002Fplugins\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7C4BSNZTPW8JR5NGCQXGSEZ","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7C4BRA7J8C06KSVW100F1W1","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7C4BNB04KQGCJ835JE8AR13","no-frontmatter","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7C4BM38TZFYT1AJ6SKHPZZ2","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M7C4BJDN7RFFCM28CGX15Q97","different-name","A skill with a name that doesn't match the directory.","https:\u002F\u002Fgithub.com\u002Ffengwhang\u002Fmercury\u002Fblob\u002Fmain\u002Fomp\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[]]