Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

create-evlog-adapter

БесплатноБез исполняемых скриптовНе проверен

Create a new built-in evlog adapter to send wide events to an external observability platform. Use when adding a new drain adapter (e.g., for Elasticsearch…

evloghqот evloghq★ 1 955 звёзд на GitHub

Об этом скилле

Create evlog Adapter

Add a new built-in adapter to evlog. Every adapter follows the same architecture and is built on the public toolkit primitives in evlog/toolkit, so a community adapter has the same shape as a built-in one.

PR Title

feat({name}): add the {Name} drain adapter

Recent examples: feat(loki): add the Grafana Loki drain adapter, feat(clickhouse): add the ClickHouse drain adapter. Use the adapter name as the conventional-commit scope, and register that scope (see touchpoint 11).

Scope timing caveat: the semantic PR check reads its scope list from the base branch, so a brand-new scope can't validate the very PR that introduces it. Either register the scope in a small preceding PR (the Loki/ClickHouse pattern), or use an unscoped title (feat: add the {Name} drain adapter) on the introducing PR.

Touchpoints Checklist

# File Action
1 packages/evlog/src/adapters/{name}.ts Create adapter source (built on defineHttpDrain from ../shared/drain)
2 packages/evlog/tsdown.config.ts Add build entry
3 packages/evlog/package.json Add exports + typesVersions entries
4 packages/evlog/test/adapters/{name}.test.ts Create unit tests (use test/helpers/fetch.ts)
5 packages/evlog/test/e2e/{name}.e2e.ts Create e2e test gated on env vars; extend the docker sandbox if self-hostable
6 packages/evlog/test/toolkit/__snapshots__/api-surface.test.ts.snap Regenerated by running the tests after a build (pnpm run build then pnpm test)
7 apps/docs/content/4.integrate/adapters/{category}/{NN}.{name}.md Create adapter doc page in the right category
8 apps/docs/content/4.integrate/adapters/01.overview.md Add adapter to overview (frontmatter link + card)
9 skills/review-logging-patterns/SKILL.md Add adapter row in the Drain Adapters table + frontmatter description
10 .changeset/{name}-adapter.md Create changeset (minor) describing the adapter
11 .github/workflows/semantic-pull-request.yml + .github/pull_request_template.md Register {name} as a PR scope in both files
12 .agents/skills/create-adapter/references/upstream-alignment.md Add the adapter's row: ingest docs URL, official client repo and package, the file that builds the request, the files where the client feeds the provider's other features such as issues, metrics or user profiles (none when the provider only stores what we send), Aligned to set to the client version you read while writing the adapter

Important: Do NOT consider the task complete until all 12 touchpoints have been addressed.

Naming Conventions

Use these placeholders consistently:

Placeholder Example (Loki) Usage
{name} loki File names, import paths, env var suffix, PR scope
{Name} Loki PascalCase in function/interface names
{NAME} LOKI SCREAMING_CASE in env var prefixes

Standard option naming (use these exact names):

Concept Standard option name
Bearer-style API secret apiKey
Base URL of the ingest API endpoint
Service identifier serviceName
Request timeout (ms) timeout
Retry attempts on transient failures retries

If a service historically used a different name (token, sourceToken, …) keep it as a deprecated alias via applyDeprecatedAlias. See Axiom and Better Stack for the pattern.

Step 1: Adapter Source: built on defineHttpDrain

Create packages/evlog/src/adapters/{name}.ts. Read references/adapter-template.md for the full annotated template. loki.ts and clickhouse.ts are the most recent reference implementations.

The contract is defineHttpDrain<TConfig>({ name, label, resolve, encode }). You only ship two pieces of logic:

  1. resolve(): produce a fully-resolved config or null to skip. Use resolveAdapterConfig for the standard precedence (overrides → runtimeConfig.evlog.{name} → runtimeConfig.{name} → env vars). List NUXT_{NAME}_* before {NAME}_* in ConfigField.env for silent Nuxt compat; show only {NAME}_* in user-facing messages via formatPublicEnvKeys.
  2. encode(events, config): a private encode{Name}Request(events, config): HttpDrainRequest returning { url, headers, body } for a batch. HTTP transport, identity headers, retries, timeout, and error logging are handled by defineHttpDrain (via httpPost).

Key rules:

  • Single factory. Export one create{Name}Drain(overrides?: Partial<{Name}Config>). No dual-API factories: if a service has multiple ingest modes (logs vs events), expose them via a mode option (see PostHog).
  • No HTTP code in the adapter. Never call fetch directly. If the service truly needs custom transport (binary envelopes, non-HTTP), use defineDrain from ../shared/drain instead, see fs.ts and `mem
Полный SKILL.md на GitHub

Установить create-evlog-adapter в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/adapter-template.mdreferences/test-template.mdreferences/upstream-alignment.md

FAQ

Что делает скилл create-evlog-adapter?

Create a new built-in evlog adapter to send wide events to an external observability platform. Use when adding a new drain adapter (e.g., for Elasticsearch, Honeycomb, SigNoz, etc.) to the evlog package. Covers source code, build config, package exports, tests, e2e, and all documentation.

Как установить скилл create-evlog-adapter?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл create-evlog-adapter запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить create-evlog-adapter с