aperture
Skill1 starsChanged 12 days agoMITView on GitHub
Install and run Aperture, the L402 Lightning reverse proxy from Lightning Labs. Use when creating L402 paywalls, configuring paid API endpoints, hosting paid content for other agents, or testing L402 authentication flows.
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- abxn4r/archon-skillstheir own version, first seen Oct 4, 2026
- lukethecat/aperturetheir own version, first seen Aug 3, 2026
- alvarocortesdev/aperture-loop-skilltheir own version, first seen Jun 22, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- lukethecat/aperture★ 6same name
- alvarocortesdev/aperture-loop-skill★ 2same name
- abxn4r/archon-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository199 other files it gives its agents.
- activecampaignSkill
- adcp-advertisingSkill
- admapixSkill
- aegis-auditSkill
- afrexai-compliance-auditSkill
- afrexai-seo-content-engineSkill
- agent-browserSkill
- agentic-codingSkill
- agent-overflowSkill
- agent-skills-toolsSkill
- ai-ppt-generatorSkill
- airdrop-hunterSkill
- ai-web-automationSkill
- alicloud-ai-video-wan-r2vSkill
- alpha-finderSkill
- amap-trafficSkill
- amazon-product-apiSkill
- api-developmentSkill
- api-gatewaySkill
- asterSkill
- auto-replySkill
- auto-updaterSkill
- aviation-weatherSkill
- awwwards-designSkill
- base-8004Skill
- bioskillsSkill
- brainrepoSkill
- browserless-agentSkill
- browser-secureSkill
- btc15-autonomous-marketSkill
- buy-anythingSkill
- byteroverSkill
- cal-com-automationSkill
- capability-evolverSkill
- catalogSkill
- chargebeeSkill
- clawcostSkill
- clawdbot-documentation-expertSkill
- clawdbot-for-vcsSkill
- clawddocsSkill
- claw-syncSkill
- claw-trader-liteSkill
- clean-codeSkill
- cloudphoneSkill
- cls-certifySkill
- codebergSkill
- code-mentorSkill
- commit-analyzerSkill
- competitor-analysis-reportSkill
- content-ideas-generatorSkill
- content-ideasSkill
- contract-generatorSkill
- conventional-commitsSkill
- copywritingSkill
- crypto-payments-ecommerceSkill
- custom-smtp-senderSkill
- dashboard-manager2Skill
- data-analystSkill
- docker-sandboxSkill
- elite-longterm-memorySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Verify Go is installed
- Very specific: line 53
Verify aperture is on $PATH
- Very specific: line 273
If neither is set, Aperture generates self-signed certs in ~/.aperture/.
- Very specific: line 343
Verify lnd is running and wallet is unlocked.
- Very specific: line 347
Check that the request path matches a service's pathregexp and is not in authwhitelistpaths.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Aperture - L402 Lightning Reverse Proxy
Aperture is a reverse proxy that implements the L402 protocol, enabling payment-gated API access via the Lightning Network. It sits in front of your backend services and requires Lightning micropayments before granting access.
Source: github.com/lightninglabs/aperture
Quick Start
# 1. Install aperture
skills/aperture/scripts/install.sh
# 2. Generate config (connects to local lnd)
skills/aperture/scripts/setup.sh
# 3. Ensure invoice.macaroon exists (required for L402 invoice creation)
# If not present, bake one with the macaroon-bakery skill:
skills/macaroon-bakery/scripts/bake.sh --role invoice-only \
--save-to ~/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon
# 4. Start aperture
skills/aperture/scripts/start.sh
# 5. Test with lnget
lnget -k --no-pay https://localhost:8081/api/testHow Aperture Works
- Client requests a protected resource through Aperture
- Aperture responds with HTTP 402 +
WWW-Authenticate: L402header containing a macaroon and a Lightning invoice - Client pays the invoice and obtains the preimage
- Client retries with
Authorization: L402 <macaroon>:<preimage> - Aperture validates the token and proxies to the backend service
Installation
skills/aperture/scripts/install.shThis will:
- Verify Go is installed
- Run
go install github.com/lightninglabs/aperture/cmd/aperture@latest - Verify
apertureis on$PATH
To install manually:
go install github.com/lightninglabs/aperture/cmd/aperture@latestOr build from source:
git clone https://github.com/lightninglabs/aperture.git
cd aperture
make installSetup
skills/aperture/scripts/setup.shThis generates ~/.aperture/aperture.yaml from the config template with
sensible defaults. The setup script auto-detects the local lnd node paths.
Options:
# Custom network
setup.sh --network testnet
# Custom lnd paths
setup.sh --lnd-host localhost:10009 \
--lnd-tls ~/.lnd/tls.cert \
--lnd-macdir ~/.lnd/data/chain/bitcoin/mainnet
# Custom listen port
setup.sh --port 8081
# Disable TLS (development only)
setup.sh --insecure
# Disable auth (no payments required)
setup.sh --no-authRunning Aperture
Start
skills/aperture/scripts/start.shStarts aperture as a background process reading ~/.aperture/aperture.yaml.
Options:
start.sh --foreground # Run in foreground
start.sh --config /path/to # Custom config pathStop
skills/aperture/scripts/stop.shConfiguration
Config file: ~/.aperture/aperture.yaml
Invoice Macaroon Requirement
Aperture requires invoice.macaroon in the configured macdir to create
Lightning invoices for L402 challenges. This is not the same as
admin.macaroon. If the macaroon is missing, aperture will fail to start or
will return errors when clients request paid resources.
To bake an invoice macaroon with the macaroon-bakery skill:
skills/macaroon-bakery/scripts/bake.sh --role invoice-only \
--save-to ~/.lnd/data/chain/bitcoin/mainnet/invoice.macaroonThe setup.sh script will warn you if invoice.macaroon is not found at the
expected path.
Minimal Agent Configuration
This is the minimal config for an agent hosting paid endpoints with a local lnd node:
listenaddr: "localhost:8081"
insecure: true
debuglevel: "info"
dbbackend: "sqlite"
sqlite:
dbfile: "~/.aperture/aperture.db"
authenticator:
network: "mainnet"
lndhost: "localhost:10009"
tlspath: "~/.lnd/tls.cert"
macdir: "~/.lnd/data/chain/bitcoin/mainnet"
services:
- name: "my-api"
hostregexp: ".*"
pathregexp: "^/api/.*$"
address: "127.0.0.1:8080"
protocol: http
price: 100Service Configuration
Each service entry defines a backend to protect:
services:
- name: "service-name"
# Match requests by host (regex).
hostregexp: "^api.example.com$"
# Match requests by path (regex).
pathregexp: "^/paid/.*$"
# Backend address to proxy to.
address: "127.0.0.1:8080"
# Protocol: http or https.
protocol: http
# Static price in satoshis.
price: 100
# Macaroon capabilities granted at base tier.
capabilities: "read,write"
# Token expiry in seconds (31557600 = 1 year).
timeout: 31557600
# Paths exempt from payment.
authwhitelistpaths:
- "^/health$"
- "^/public/.*$"
# Per-endpoint rate limits (token bucket).
ratelimits:
- pathregexp: "^/api/query.*$"
requests: 10
per: 1s
burst: 20Authentication Backends
Direct LND Connection
authenticator:
network: "mainnet"
lndhost: "localhost:10009"
tlspath: "~/.lnd/tls.cert"
macdir: "~/.lnd/data/chain/bitcoin/mainnet"Lightning Node Connect (LNC)
authenticator:
network: "mainnet"
passphrase: "your-pairing-phrase"
mailboxaddress: "mailbox.terminal.lightning.today:443"Disable Authentication
authenticator:
disable: trueDatabase Backends
SQLite (recommended for agents):
dbbackend: "sqlite"
sqlite:
dbfile: "~/.aperture/aperture.db"PostgreSQL:
dbbackend: "postgres"
postgres:
host: "localhost"
port: 5432
user: "aperture"
password: "secret"
dbname: "aperture"TLS Configuration
# Auto Let's Encrypt certificate.
autocert: true
servername: "api.example.com"
# Or disable TLS (development/local only).
insecure: trueIf neither is set, Aperture generates self-signed certs in ~/.aperture/.
Dynamic Pricing
Connect to a gRPC price server instead of static prices:
services:
- name: "my-api"
dynamicprice:
enabled: true
grpcaddress: "127.0.0.1:10010"
insecure: false
tlscertpath: "/path/to/pricer/tls.cert"Hosting Paid Content for Agents
A common pattern is hosting information that other agents pay to access:
# 1. Start a simple HTTP backend with your content
mkdir -p /tmp/paid-content
echo '{"data": "valuable information"}' > /tmp/paid-content/info.json
cd /tmp/paid-content && python3 -m http.server 8080 &
# 2. Configure aperture to protect it
skills/aperture/scripts/setup.sh --insecure --port 8081
# 3. Start aperture
skills/aperture/scripts/start.sh
# 4. Other agents can now pay and fetch
lnget --max-cost 100 https://localhost:8081/api/info.jsonIntegration with lnget and lnd
With all three components running:
# Verify lnd is running
skills/lnd/scripts/lncli.sh getinfo
# Start aperture (uses same lnd for invoice generation)
skills/aperture/scripts/start.sh
# Fetch a paid resource
lnget --max-cost 1000 https://localhost:8081/api/data
# Check tokens
lnget tokens listFile Locations
| Path | Purpose |
~/.aperture/aperture.yaml | Configuration file |
~/.aperture/aperture.db | SQLite database |
~/.aperture/tls.cert | TLS certificate |
~/.aperture/tls.key | TLS private key |
~/.aperture/aperture.log | Log file |
Troubleshooting
Port already in use
Change listenaddr in config to a different port, or use setup.sh --port.
LND connection refused
Verify lnd is running and wallet is unlocked. Check lndhost, tlspath, and
macdir in the config point to the correct lnd instance.
No 402 challenge returned
Check that the request path matches a service's pathregexp and is not in
authwhitelistpaths. Verify authenticator.disable is not true.
Token validation fails
The client must present the exact macaroon from the challenge with the correct preimage. Verify the preimage matches the payment hash.
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
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.

