Agent skill

evlog Adapter Creator

by evloghq in evloghq/evlog

Walks through adding a new built-in evlog drain adapter for an observability platform: source, build config, exports, tests, docs and PR scope.

MITAuto-check passedDevelopment

Install evlog Adapter Creator

skills CLI
$ npx skills add evloghq/evlog --skill create-evlog-adapter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evloghq/evlog create-evlog-adapter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evloghq/evlog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-adapter .claude/skills/create-evlog-adapter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-evlog-adapter
GitHub stars
1.9k
Token cost
~2.9k tokens
SKILL.md length
1,279 words
Files
4 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Walks through adding a new built-in evlog drain adapter for an observability platform: source, build config, exports, tests, docs and PR scope.

  • Works in 10 steps: Adapter Source: built on defineHttpDrain → Build Config → Package Exports → …
  • Adding a drain adapter for a new observability platform to evlog
  • SKILL.md covers PR Title, Touchpoints Checklist, Naming Conventions and Step 1: Adapter Source: built…, plus 10 more sections
  • Calls pnpm

What it does

Every evlog adapter follows one architecture and is built on the public toolkit primitives in evlog/toolkit, so community adapters share the shape of built-in ones. The skill supplies a numbered touchpoints checklist: the adapter source built on defineHttpDrain, a tsdown build entry, package.json exports and typesVersions, unit tests with a fetch helper, an e2e test gated on environment variables, a regenerated API-surface snapshot, documentation pages and a changeset.

It also covers registering the adapter name as a PR scope in the semantic pull-request workflow and PR template, adding the adapter to the review-logging-patterns skill, and recording upstream alignment details such as the ingest docs and the client version read. PR titles use feat with the adapter name as scope; because the semantic check reads scopes from the base branch, a brand-new scope needs a small preceding PR or an unscoped title. Reference files hold adapter and test templates.

When your agent uses it

  • Adding a drain adapter for a new observability platform to evlog
  • Writing unit and e2e tests for an evlog adapter
  • Registering a new PR scope and documentation page for an adapter
  • Checking that an adapter lines up with the upstream client it targets

Example prompts

  • “Add an evlog drain adapter for Honeycomb with tests, docs and a changeset.”
  • “Which files do I have to touch to add a SigNoz adapter to evlog?”
  • “Write the PR title for the new Elasticsearch adapter and handle the scope timing issue.”

Requirements

  • A checkout of the evlog repository
  • pnpm to build and run the tests

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Adapter Source: built on defineHttpDrain
  2. Build Config
  3. Package Exports
  4. Unit Tests
  5. E2E Test + Sandbox
  6. Adapter Documentation Page
  7. Update Adapters Overview Page
  8. Update the Public Skill
  9. Changeset
  10. PR Scopes

What it can do on your machine

Read from SKILL.md and the folder at commit 59a105f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

evlog Adapter Creator loads about 2.9k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 1,279 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from evloghq/evlog at commit 59a105f, republished under its MIT licence (© evloghq). 1,279 words, ~2,897 tokens.

Download SKILL.mdSave it as .claude/skills/create-evlog-adapter/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
create-evlog-adapter
description
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.
metadata.internal
true

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

#FileAction
1packages/evlog/src/adapters/{name}.tsCreate adapter source (built on defineHttpDrain from ../shared/drain)
2packages/evlog/tsdown.config.tsAdd build entry
3packages/evlog/package.jsonAdd exports + typesVersions entries
4packages/evlog/test/adapters/{name}.test.tsCreate unit tests (use test/helpers/fetch.ts)
5packages/evlog/test/e2e/{name}.e2e.tsCreate e2e test gated on env vars; extend the docker sandbox if self-hostable
6packages/evlog/test/toolkit/__snapshots__/api-surface.test.ts.snapRegenerated by running the tests after a build (pnpm run build then pnpm test)
7apps/docs/content/4.integrate/adapters/{category}/{NN}.{name}.mdCreate adapter doc page in the right category
8apps/docs/content/4.integrate/adapters/01.overview.mdAdd adapter to overview (frontmatter link + card)
9skills/review-logging-patterns/SKILL.mdAdd adapter row in the Drain Adapters table + frontmatter description
10.changeset/{name}-adapter.mdCreate changeset (minor) describing the adapter
11.github/workflows/semantic-pull-request.yml + .github/pull_request_template.mdRegister {name} as a PR scope in both files
12.agents/skills/create-adapter/references/upstream-alignment.mdAdd the adapter's row: ingest docs URL, official client repo and package, the file that builds the request, 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:

PlaceholderExample (Loki)Usage
{name}lokiFile names, import paths, env var suffix, PR scope
{Name}LokiPascalCase in function/interface names
{NAME}LOKISCREAMING_CASE in env var prefixes

Standard option naming (use these exact names):

ConceptStandard option name
Bearer-style API secretapiKey
Base URL of the ingest APIendpoint
Service identifierserviceName
Request timeout (ms)timeout
Retry attempts on transient failuresretries

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 memory.ts.
  • Encode parity. The standalone sendTo{Name} / sendBatchTo{Name} helpers must reuse the same private encode{Name}Request() and go through sendEncodedDrainRequest(request, { label, source, timeout, retries }), never a separate fetch path. test/adapters/encode-parity.test.ts pins this for a subset of adapters; add the new one to it (not every existing adapter is registered there yet, and that is a gap, not a license to skip).
  • No bespoke config resolution. Always go through resolveAdapterConfig. Deprecated aliases (token → apiKey) go through applyDeprecatedAlias.
  • Exported converters. If the service needs a specific event shape, export to{Name}Event() / build{Name}Payload() helpers so they're testable independently.
  • Edge-safe. Adapters run on Cloudflare Workers: no Buffer (use TextEncoder + btoa, see loki.ts), no Node-only APIs. fs.ts shows the isEdgeRuntime() guard pattern when a runtime genuinely can't be supported.

Step 2: Build Config

Add a build entry in packages/evlog/tsdown.config.ts alongside the existing adapters:

typescript
'adapters/{name}': 'src/adapters/{name}.ts',

Follow the existing ordering in that file.

Step 3: Package Exports

In packages/evlog/package.json, add two entries (after the last adapter, and check the current list rather than assuming):

In exports:

json
"./{name}": {
  "types": "./dist/adapters/{name}.d.mts",
  "import": "./dist/adapters/{name}.mjs"
}

In typesVersions["*"]:

json
"{name}": [
  "./dist/adapters/{name}.d.mts"
]

Any export added to package.json without a matching tsdown.config.ts entry (and vice versa) fails test/toolkit/api-surface.test.ts, which is touchpoint 6.

Show full SKILL.md (547 more words)Show less

Step 4: Unit Tests

Create packages/evlog/test/adapters/{name}.test.ts. Read references/test-template.md for the full annotated template, and packages/evlog/test/README.md for the repo-wide conventions.

Non-negotiables from the test README:

  • Use mockFetch() / getFetchCall / getFetchJson / getFetchHeaders from test/helpers/fetch.ts, never hand-roll vi.spyOn(globalThis, 'fetch') boilerplate.
  • Clean up any env vars the adapter reads in afterEach.
  • Test the exported pure helpers (to{Name}Event, build{Name}Payload, URL resolvers) directly, one describe per helper.

Required test categories:

  1. URL construction (default + custom endpoint, trailing-slash tolerance)
  2. Headers (auth, content-type, service-specific)
  3. Request body format (JSON structure matches service API)
  4. Skip behavior when apiKey (or required field) is missing
  5. Batch operations (multiple events in one request, empty batch skips fetch)
  6. Deprecated alias still works (when applicable)
  7. Add the adapter to test/adapters/encode-parity.test.ts

Step 5: E2E Test + Sandbox

Create packages/evlog/test/e2e/{name}.e2e.ts, gated on the adapter's env vars (skipped when absent). Run with pnpm test:e2e.

If the service is self-hostable, extend the local sandbox so the adapter can be exercised without cloud credentials:

  • packages/evlog/test/e2e/docker-compose.yml: add the service
  • packages/evlog/test/e2e/seed.mjs: fan the seeder out to the new backend
  • packages/evlog/test/e2e/README.md: document it
  • Root package.json sandbox:e2e script: add the local env var if needed

See the Loki and ClickHouse setups as references.

Step 6: Adapter Documentation Page

Read apps/docs/AGENTS.md before touching anything under apps/docs/ (steps 6 to 8).

Adapter docs live in three categories under apps/docs/content/4.integrate/adapters/:

CategoryDirectoryExamples
Cloud (SaaS only)cloud/Axiom, PostHog, Sentry, Better Stack, Datadog
Cloud or Self-Hostedhybrid/Loki, ClickHouse, OTLP, HyperDX
Self-Hosted (local only)self-hosted/FS, NuxtHub, Memory

Create {NN}.{name}.md in the right category with the next available number. Use the Loki page (hybrid/01.loki.md) as a reference for frontmatter, tone, and sections. Key sections: intro, quick setup, configuration (env vars table + priority), advanced usage, querying in the target service, troubleshooting, direct API usage, next steps.

Important: multi-framework examples. The Quick Start section must include a ::framework-tabs group with one fence per supported framework (Nuxt, Nitro, Next.js, SvelteKit, TanStack Start, React Router, Hono, Express, Fastify, Elysia, NestJS, oRPC, Cloudflare Workers, Standalone), the framework in the bracket label. Copy the Axiom page's group and swap the drain factory. Do not only show Nitro examples, and put nothing but fences inside the group.

Step 7: Update Adapters Overview Page

Edit apps/docs/content/4.integrate/adapters/01.overview.md in two places (follow the pattern of existing adapters):

  1. Frontmatter links array: add a link entry with icon and /integrate/adapters/{category}/{name} path, in category order
  2. ::card-group section: add a card block in the matching position

Step 8: Update the Public Skill

In skills/review-logging-patterns/SKILL.md (published on evlog.dev via /.well-known/skills/):

  1. Add a row to the Drain Adapters table: | {Name} | evlog/{name} | {NAME}_API_KEY, ... |
  2. Add the adapter name to the description: line in the YAML frontmatter

Step 9: Changeset

Create .changeset/{name}-adapter.md with a minor bump. Write it like a release note: what the adapter does, the deployment modes it covers, the key options, the env vars, and the direct-send helpers. See .changeset entries from the Loki/ClickHouse PRs for the expected depth.

Step 10: PR Scopes

Add {name} to the scopes list in .github/workflows/semantic-pull-request.yml and to the Scopes section of .github/pull_request_template.md, in alphabetical order. Remember the timing caveat from the PR Title section: this registration only takes effect for PRs whose base branch already contains it.

Verification

After a clean install, prepare generated workspace types from the repo root first, then run the package checks:

bash
pnpm run dev:prepare
cd packages/evlog
pnpm run lint
pnpm run typecheck
pnpm run build    # required before test — api-surface snapshot is gated on dist/
pnpm run test

© evloghq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .agents/skills/create-adapter of evloghq/evlog.

  • SKILL.md
  • references/adapter-template.md
  • references/test-template.md
  • references/upstream-alignment.md

Open the folder on GitHubat commit 59a105f

Compare with similar skills

evlog Adapter Creator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

evlog Adapter Creator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
evlog Adapter Creator this skillevloghq/evlog1.9k—~2.9kAutomated safety check: PassMIT
Linea Dependency MaintenanceConsensys-Incorporated/linea-attestation-registry1771 repos~3.7kAutomated safety check: WarnMIT
Effect TSpproenca/dot-skills214—~2kAutomated safety check: PassMIT
Link Workspace Packagesnomcopter/react-mosaic4.8k5 repos~760Automated safety check: PassCustom licence
Pnpm Engineteambit/bit18k—~1.9kAutomated safety check: PassCustom licence
Testing Changespnpm/pnpm37k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Linea Dependency Maintenance

    Consensys-Incorporated/linea-attestation-registry

    Safely plan and execute dependency maintenance for JavaScript/TypeScript (npm, pnpm) and GitHub Actions, including npm lockfiles, pnpm workspaces, catalogs, overrides, SHA-pinned action versions…

    177 GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: warnings
  • Effect TS

    pproenca/dot-skills

    Effect-TS library usage in TypeScript — Effect.gen generators, Schema.Struct/Schema.Class definitions, Layer/Context.Tag/Service patterns, Effect.pipe pipelines, Data.TaggedError/Data.Class error…

    214 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Link Workspace Packages

    nomcopter/react-mosaic

    Link workspace packages in monorepos (npm, yarn, pnpm, bun).

    4.8k GitHub starsUsed in 5 repos~760 tokens
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Run the tests that cover a change in the pnpm repository, in the Rust workspace (pnpm/, pnpr/) or the TypeScript CLI (pnpm11/), and recognize the cases where a scoped run passes without testing…

    37k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Dep Refs

    zai-org/ZCode

    A skill your agent uses when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who…

    7.5k GitHub stars~552 tokensUpdated 8 days ago
    DevelopmentAuto-check passed

More from evloghq/evlog

All 22 skills in this repo
  • Guides adding a new built-in enricher to the evlog package, covering the source, tests, docs, README, a related skill and a changeset.

    1.9k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Evlog Log Analyzer

    evloghq/evlog

    Reads the structured wide-event logs that evlog writes to .evlog/logs/ so the agent can debug errors, find slow requests and explain what the app did.

    1.9k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Walks a contributor through adding a new HTTP framework integration to the evlog logging package: middleware source, build entry, exports, tests, example app and docs.

    1.9k GitHub stars~5k tokensUpdated today
    Auto-check: notes
  • Walks through adding a new rule or framework adapter to `evlog map` in @evlog/cli, from the rule source and registry to types, tests, docs and the published skill.

    1.9k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Rules for writing and reviewing evlog docs, blog posts, READMEs, skills and AGENTS.md files, with separate review and rewrite roles, a house voice and a catalog of AI-sounding tells.

    1.9k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Before After

    evloghq/evlog

    Produce a before/after visual comparison of an evlog surface (landing, docs, telemetry, playgrounds) and share it as public Blob URLs.

    1.9k GitHub stars~2.7k tokensUpdated today
    Auto-check passed

Questions about evlog Adapter Creator

What does evlog Adapter Creator do?

Walks through adding a new built-in evlog drain adapter for an observability platform: source, build config, exports, tests, docs and PR scope. Every evlog adapter follows one architecture and is built on the public toolkit primitives in evlog/toolkit, so community adapters share the shape of built-in ones.json exports and typesVersions, unit tests with a fetch helper, an e2e test gated on environment variables, a regenerated API-surface snapshot, documentation pages and a changeset.

When should I use evlog Adapter Creator?

evlog Adapter Creator fits situations like: adding a drain adapter for a new observability platform to evlog; writing unit and e2e tests for an evlog adapter; registering a new PR scope and documentation page for an adapter; checking that an adapter lines up with the upstream client it targets.

How do I install evlog Adapter Creator in Claude Code?

Run `npx skills add evloghq/evlog --skill create-evlog-adapter -a claude-code`. Or copy the skill folder (.agents/skills/create-adapter in evloghq/evlog) into .claude/skills/create-evlog-adapter in your project. Claude Code loads it when a task matches its description.

How do I install evlog Adapter Creator in Codex?

Run `npx skills add evloghq/evlog --skill create-evlog-adapter -a codex`. Or copy the skill folder (.agents/skills/create-adapter in evloghq/evlog) into .agents/skills/create-evlog-adapter in your project. Codex loads it when a task matches its description.

Can I use evlog Adapter Creator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evloghq/evlog --skill create-evlog-adapter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-evlog-adapter, .gemini/skills/create-evlog-adapter, .github/skills/create-evlog-adapter and .opencode/skills/create-evlog-adapter in your project.

What does evlog Adapter Creator need to run?

Going by SKILL.md and its folder, evlog Adapter Creator needs the command-line tools its instructions call (pnpm). Our summary lists: A checkout of the evlog repository; pnpm to build and run the tests.

Does evlog Adapter Creator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is evlog Adapter Creator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does evlog Adapter Creator use?

evlog Adapter Creator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does evlog Adapter Creator use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.5k tokens, read only when the agent opens those files.

What are the alternatives to evlog Adapter Creator?

Skills that share tags, products or a category with evlog Adapter Creator: Linea Dependency Maintenance (Consensys-Incorporated/linea-attestation-registry, 177 stars), Effect TS (pproenca/dot-skills, 214 stars), Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars) and Pnpm Engine (teambit/bit, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains evlog Adapter Creator?

evloghq (a GitHub organization) maintains it in evloghq/evlog, which has 1,885 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 6, 2026.

Source: evloghq/evlog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.