Automated summary
Purchases inbound Lightning Network liquidity for a node through the Amboss Magma GraphQL API and returns a Lightning invoice to pay.
Strengths
- Checks the pubkey format (66 hex characters) and the 500-cent minimum amount before calling the API
- Returns a normalized JSON result (invoice on success, code and message on failure) that is easy to parse
- Optional authentication: anonymous temporary account by default, or an Amboss API key supplied via MAGMA_API_KEY
- Enforces an explicit user confirmation of amount and node before any real money is spent
Limitations
- Relies on a third-party paid service (Amboss Magma) and its API availability
- Requires the user to already know their node pubkey or connection string
- Does not track whether the inbound channel actually opens after the invoice is paid
Use it when the user wants to buy an inbound channel to raise their Lightning node's receiving capacity.
Avoid it for outbound liquidity, managing existing channels, or when the user has no Lightning node.
Security analysis
CautionThe skill is transparent about its purpose and performs a legitimate network operation (creating a Magma liquidity order and returning an invoice). It does not exfiltrate secrets, obfuscate payloads, or run destructive commands, and it explicitly requires user confirmation before spending money. The main risk is operational: it executes an unpinned npm package pulled at runtime, forwards the node URI/optional API key to a remote endpoint, and the underlying script is not shown for review. That places it at 'caution' rather than 'safe'.
- •Runs an unpinned third-party package at execution time via `npx -y tsx`, which downloads and executes code from npm without a lockfile or version pin — supply-chain exposure
- •Script body (`scripts/buy_liquidity.ts`) is not included in the skill, so the actual API calls, payload contents, and error handling cannot be audited from the SKILL.md alone
- •Triggers real financial transactions (purchasing Lightning liquidity), though the skill does instruct confirming amount and node URI before running
- •Sends the user's node connection URI (and optionally an Amboss API key from env) to a remote GraphQL endpoint
- •`MAGMA_GRAPHQL_ENDPOINT` env override allows redirecting requests, including any API key passed via environment, to a different host — legitimate for testing but worth noting
Examples
Buy $10 of Lightning liquidity for my node 024ae5a5f0b01850983009489ca89c85...@12.34.56.78:9735My Lightning node can't receive payments because it has no inbound liquidity — use Magma to buy $25 of inbound capacity for pubkey 024ae5a5f0b01850983009489ca89c85...Purchase $50 of inbound liquidity from Amboss Magma for my node, open it as a private channel, and give me the invoice to payname: magma description: Buy inbound Lightning Network liquidity for a node via Amboss Magma. Use this skill when the user wants to purchase Lightning liquidity, open an inbound channel to their Lightning node, increase their node's receiving capacity, or mentions "Magma", "Amboss", "Lightning liquidity", or "buy inbound channel". The skill calls the Magma GraphQL API and returns a Lightning invoice to pay.
Magma Liquidity Skill
This skill purchases inbound Lightning Network liquidity for a node via Amboss Magma. The Magma API opens a channel to the user's node, giving them receiving capacity for Lightning payments.
When to use
Invoke this skill whenever the user wants to:
- Buy / purchase Lightning liquidity
- Open an inbound channel to their Lightning node
- Increase their node's receiving capacity
- Accept Lightning payments and lacks inbound liquidity
- Use Amboss Magma (the liquidity marketplace)
How to use
The skill exposes a single TypeScript script: scripts/buy_liquidity.ts. Run it from the skill directory via tsx (fetched on demand by npx — no npm install needed). Requires Node.js >= 18.
npx -y tsx scripts/buy_liquidity.ts \
--connection-uri <pubkey or pubkey@host:port> \
--usd-cents <amount in cents>
The script prints a JSON object to stdout. On success:
{
"success": true,
"lightning_invoice": "lnbc..."
}
On failure:
{
"success": false,
"error": { "code": "...", "message": "..." }
}
Required parameters
--connection-uri— the user's Lightning node connection string. Accepts two formats:- Just the pubkey: 66-character hex string (e.g.
024ae5a5f0b01850983009489ca89c85...) - Pubkey with socket:
pubkey@host:port(e.g.024ae5a5...@12.34.56.78:9735)
- Just the pubkey: 66-character hex string (e.g.
--usd-cents— dollar amount in cents, minimum500($5.00). Whole number only.
Optional parameters
--redirect-url <url>— post-payment redirect URL--private-channel— flag: open a private channel instead of a public one--rails-cluster-only— flag: source liquidity only from Rails cluster nodes
Authentication
Authentication is optional. The Magma API supports anonymous access — it auto-creates a temporary account.
If the user has an Amboss API key, set it as an environment variable before invoking the script:
export MAGMA_API_KEY=their_api_key_here
Keys can be generated at https://account.amboss.tech/settings/api-keys.
Instructions for Claude
- Collect required inputs from the user before running the script:
- The node connection URI (pubkey, or pubkey@host:port)
- The USD amount they want to spend (convert dollars to cents: $10 → 1000)
- Validate before calling:
- Pubkey must be exactly 66 hexadecimal characters
- Amount must be at least 500 cents ($5.00)
- If user gives an amount in dollars, multiply by 100 and pass as cents
- Run the script with the collected parameters.
- Parse the JSON output:
- On
success: true, present thelightning_invoiceto the user and tell them to pay it with any Lightning wallet. - On
success: false, surface the errormessage(do not surface stack traces or raw HTTP details).
- On
- Confirm before spending: The user is about to pay real money. Always confirm the amount and node URI back to the user before running the script.
Example user flow
User: Buy $10 of Lightning liquidity for my node 024ae5a5f0b01850983009489ca89c85...@12.34.56.78:9735
Claude: I'm about to purchase $10.00 (1000 cents) of inbound Lightning
liquidity for node 024ae5a5...@12.34.56.78:9735. Confirm to proceed?
User: yes
Claude: [runs npx -y tsx scripts/buy_liquidity.ts --connection-uri 024ae5a5...@12.34.56.78:9735 --usd-cents 1000]
Claude: Here is your Lightning invoice. Pay it with any Lightning wallet
to complete the purchase. The inbound channel will open once the
invoice is paid.
lnbc10m1p3j8z9xpp5...
Reference
- Magma marketplace: https://magma.amboss.tech/
- API documentation: https://docs.amboss.tech/tutorials/how_to_buy_liquidity_using_magma
- GraphQL endpoint (default):
https://magma.amboss.tech/graphql - Override endpoint with the
MAGMA_GRAPHQL_ENDPOINTenv var.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/buy-lightning-liquidity-via-magma-mrwakc1s/download' --output '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md.part' && mv '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md.part' '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && test -s '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/magma' && cp -R '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s' '.claude/skills/magma'Cursor
test -f '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && test -s '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/magma' && cp -R '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s' '.cursor/skills/magma'Codex
test -f '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && test -s '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/magma' && cp -R '.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s' '.agents/skills/magma'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s'openskills read 'buy-lightning-liquidity-via-magma-mrwakc1s'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/buy-lightning-liquidity-via-magma-mrwakc1s/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.