create-adapter_skill

This skill guides you through creating a built-in evlog adapter to send wide events to an external observability platform across all touchpoints.
  • TypeScript

549

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill hugorcd/evlog --skill create-adapter

  • SKILL.md5.7 KB

Overview

This skill guides you through adding a new built-in evlog adapter to send wide events to an external observability platform. It covers all eight mandatory touchpoints: source code, build config, package exports, tests, docs, overview updates, AGENTS.md, and renumbering. Follow the checklist and naming conventions to ensure consistent, maintainable adapters.

How this skill works

The skill describes the adapter architecture, required TypeScript source (factory, runtime config, converters, send functions), and integration points in the repo. It details config resolution priority, timeout and error-handling rules, test requirements, build exports, and all documentation and metadata edits needed so the adapter is discoverable and testable. It also explains verification steps to build and run tests after implementation.

When to use it

  • Adding a new drain adapter for a platform (Datadog, Sentry, Loki, Elasticsearch, OTLP, etc.).
  • Implementing a built-in adapter that must be published with the evlog package.
  • Creating adapters that need standardized config resolution and timeouts.
  • Ensuring a new adapter is fully tested, documented, and exported for consumers.

Best practices

  • Follow the exact naming placeholders ({name}, {Name}, {NAME}) consistently across files and env vars.
  • Implement getRuntimeConfig() from ./_utils and honor the documented config priority chain.
  • Never throw from the drain; log errors with console.error('[evlog/{name}] ...') and swallow failures.
  • Use AbortController for requests with a 5000ms default timeout configurable via config.timeout.
  • Add comprehensive tests for URL construction, headers, body format, error handling, batching, and timeouts.
  • Update docs, overview links, AGENTS.md table, and renumber custom.md so docs remain consistent.

Example use cases

  • Add an OTLP adapter to forward wide events to an OTLP collector with batching and retry logic.
  • Create a Datadog adapter that maps wide events to Datadog events and supports an API key env var.
  • Implement a Loki adapter that converts events to Loki push API format and validates request headers.
  • Add a Sentry adapter that extracts structured errors and sends them using Sentry’s ingestion API.
  • Build an Elasticsearch adapter that formats events into bulk API payloads and includes index routing.

FAQ

All eight touchpoints must be updated: source file, build config, package exports, tests, adapter doc page, adapters overview, AGENTS.md entry, and renumbering custom.md.

How is configuration prioritized for the adapter?

Priority is overrides passed to create{Name}Drain(), runtimeConfig.evlog.{name}, runtimeConfig.{name}, then env vars NU TX_{NAME}_* then {NAME}_* (NUXT_ first).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
create-adapter skill by hugorcd/evlog | VeilStrat