Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

tl-openmeter-local-devtl openmeter 本地开发

Agent Skill

tl-openmeter-local-dev 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

264

周安装

11

GitHub Stars

公开资料未说明

下载量

88
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tl-openmeter-local-dev(tl openmeter 本地开发)
来源仓库:https://github.com/toddlevy/tl-agent-skills
仓库路径:skills/tl-openmeter-local-dev
安装命令:
npx skills add https://github.com/toddlevy/tl-agent-skills --skill tl-openmeter-local-dev
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/toddlevy/tl-agent-skills --skill tl-openmeter-local-dev

简介

tl-openmeter-local-dev 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从 GitHub 安装,支持主流 AI 宿主环境。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

OpenMeter Local Dev Setup

Run OpenMeter locally with full metering, billing, and webhook support. Covers the gotchas that differ between self-hosted (Docker) and Cloud (staging/production).

When to Use

  • "Set up OpenMeter locally"
  • "Configure ngrok for webhooks"
  • "Debug catalog sync errors"
  • "Why is my webhook 500ing?"
  • "Install the Stripe app in OpenMeter"
  • "What works locally vs staging?"
  • When user mentions OpenMeter + Docker, local dev, or webhook issues

Suite

This skill is part of the tl-openmeter suite:

SkillPurpose
tl-openmeter-apiREST API reference (endpoints, schemas, gotchas)
tl-openmeter-local-devThis skill: local dev setup and troubleshooting
tl-openmeter-api-mcp-serverMCP server for calling local OpenMeter from Cursor

Resources


Step 0: Discover the User's Situation

Before proceeding, use the AskQuestion tool to determine what applies:

Question 1: Environment

  • Local development (Docker) — proceed with this skill
  • Staging or Production — redirect to tl-openmeter-api and deployment docs

Question 2: Stripe billing needed?

  • Yes → Steps 1, 2, 3, 4, 5, 6 (full setup with ngrok)
  • No → Steps 1, 4, 5 only (metering and entitlements without billing)

Question 3: Ngrok status (only if Stripe = yes)

  • Already set up → skip ngrok install in Step 3
  • Need to set it up → full Step 3
  • Paid plan with static domain → note in Step 3 about skipping URL updates

Self-Hosted vs Cloud: Critical Differences

FeatureSelf-Hosted (Local)Cloud (Staging/Prod)
Event ingestionYesYes
Meters, features, plansYesYes
Customers, subscriptionsYesYes
Entitlement checksYesYes
Billing with Stripe AppYes (via apps.baseURL)Yes
Webhook channels via APINO ("not implemented")Yes (Svix-backed)
Webhook notificationsYes (YAML config only)Yes (API channels)
Svix signature verificationNo (plain HTTP)Yes

Key insight: Webhooks work locally via config.local.yaml static configuration. Cloud uses the POST /api/v1/notification/channels API (Svix). The catalog sync script handles this automatically.


Step 1: Start Docker Services

npm run docker:up

Verify OpenMeter is healthy:

curl http://localhost:8888/api/v1/meters

Portal UI: http://localhost:8889

Or run the verification script:

.\scripts\verify-setup.ps1

Step 2: Install Stripe App

See references/apps.md for full details on OpenMeter Apps.

npx tsx scripts/openmeter/openmeter-install-stripe-app.ts

This installs Stripe and creates a billing profile.

Requires: STRIPE_SECRET_KEY in .env

Verify: curl http://localhost:8888/api/v1/apps — should show Stripe (Sandbox may also be present and is irrelevant).


Step 3: Set Up Ngrok

Required for Stripe App callbacks and Stripe webhooks locally.

  1. Install: choco install ngrok (Windows) or brew install ngrok (macOS)
  2. Auth: ngrok config add-authtoken YOUR_TOKEN
  3. Start: .\scripts\start-ngrok.ps1 or ngrok http 3001
  4. Get URL: curl http://127.0.0.1:4040/api/tunnels

Then configure (or use the helper script):

npx tsx scripts/openmeter/set-openmeter-webhook-url.ts

Manual config requires updating three places — see references/REFERENCE.md for the full list.

After config changes: docker compose restart openmeter


Step 4: Run Catalog Sync

npx tsx scripts/openmeter/openmeter-catalog-sync.ts

Expected local output includes ⊘ Skipping webhook channel (not supported on self-hosted OpenMeter) — this is normal.

See references/REFERENCE.md for common errors and fixes.


Step 5: Start API Server

npm run dev

For ngrok HTTP forwarding, set API_HTTP_FOR_NGROK=true in .env.


Step 6: Configure Stripe Webhooks

In Stripe Dashboard:

  1. Add endpoint: https://YOUR-NGROK-URL/webhooks/stripe
  2. Events: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted
  3. Copy signing secret to .env as STRIPE_WEBHOOK_SECRET_DEV=whsec_...

Webhook Authentication

See references/webhooks.md for full details.

ModeEnvironmentMechanism
Svix signaturesCloud (staging/prod)SVIX_WEBHOOK_SECRET + Svix headers
x-webhook-secretSelf-hosted with secretOPENMETER_WEBHOOK_SECRET header check
Dev passthroughLocal (no secret set)Accepts all — self-hosted sends plain HTTP

Verification

Run the verification script to check all layers:

.\scripts\verify-setup.ps1

Or manually:

# OpenMeter running
curl http://localhost:8888/api/v1/meters

# Stripe App installed
curl http://localhost:8888/api/v1/apps

# Webhook endpoint responding
curl -X POST http://127.0.0.1:3001/webhooks/openmeter \
  -H "Content-Type: application/json" \
  -d '{"type":"entitlements.balance.threshold","payload":{"customerId":"test"}}'

Troubleshooting

SymptomFix
EADDRINUSE on 3001Kill existing process on that port
OpenMeter container won't startCheck Docker logs; usually Kafka/PG not ready
Catalog sync connection refusedOpenMeter not running — docker ps
Stripe App missing after cleanupnpx tsx scripts/openmeter/openmeter-install-stripe-app.ts
Ngrok URL changedUpdate .env, config.local.yaml, Stripe Dashboard; restart OpenMeter

See references/REFERENCE.md for the full troubleshooting matrix.


References

First-Party Documentation

Development Tools

Related Skills

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.93%
按下载量换算34

Claude

31.56%
按下载量换算28

Cursor

17.07%
按下载量换算15

Gemini CLI

10.42%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills