Agent skill

evlog Enricher Creator

by evloghq in evloghq/evlog

Guides adding a new built-in enricher to the evlog package, covering the source, tests, docs, README, a related skill and a changeset.

MITAuto-check passedDevelopment

Install evlog Enricher Creator

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

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

GitHub CLI
$ gh skill install evloghq/evlog create-evlog-enricher --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-enricher .claude/skills/create-evlog-enricher && 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-enricher
GitHub stars
1.9k
Token cost
~1.7k tokens
SKILL.md length
702 words
Files
2 (incl. references)
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Guides adding a new built-in enricher to the evlog package, covering the source, tests, docs, README, a related skill and a changeset.

  • Works in 6 steps: Enricher Source: built on defineEnricher → Tests → Update the Enrichers Docs Page → …
  • Adding a new enricher such as deployment metadata or tenant context to evlog
  • SKILL.md covers PR Title, Touchpoints Checklist, Naming Conventions and Step 1: Enricher Source: built…, plus 6 more sections
  • Calls pnpm

What it does

This skill walks the agent through adding a built-in enricher to evlog, which attaches derived context to wide events. Each enricher is a single defineEnricher call from evlog/toolkit, so community enrichers have the same shape as built-in ones. A checklist of seven touchpoints must all be done before the task counts as complete: the source file, a decision on the default composition, tests, the docs page, the review-logging-patterns skill, the package README and a minor changeset.

It also settles whether the enricher should join createDefaultEnrichers(), which should happen only if it is universally applicable and reads nothing but the request, since changing the default is a behavior change that the changeset must call out. Naming conventions give camelCase, PascalCase and display-name forms, the PR title uses a conventional-commit style with the core scope, and a template file in references/ provides an annotated enricher skeleton.

When your agent uses it

  • Adding a new enricher such as deployment metadata or tenant context to evlog
  • Writing tests for a new evlog enricher
  • Updating evlog docs and README for a new enricher
  • Deciding whether an enricher belongs in the default set

Example prompts

  • “Add an evlog enricher that records the deployment region.”
  • “Create a tenant context enricher for evlog and update every doc that lists the built-in enrichers.”
  • “Should the feature flag enricher be part of createDefaultEnrichers()?”

Requirements

  • A checkout of the evlog repository

Workflow steps

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

  1. Enricher Source: built on defineEnricher
  2. Tests
  3. Update the Enrichers Docs Page
  4. Update the Public Skill
  5. Update README
  6. Changeset

What it can do on your machine

Read from SKILL.md and the folder at commit 54dcc50. 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 Enricher Creator loads about 1.7k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 702 words of instructions outside code blocks.

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

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 54dcc50, republished under its MIT licence (© evloghq). 702 words, ~1,671 tokens.

Download SKILL.mdSave it as .claude/skills/create-evlog-enricher/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
create-evlog-enricher
description
Create a new built-in evlog enricher to add derived context to wide events. Use when adding a new enricher (e.g., for deployment metadata, tenant context, feature flags, etc.) to the evlog package. Covers source code, tests, and all documentation.
metadata.internal
true

Create evlog Enricher

Add a new built-in enricher to evlog. Every enricher is built on the public toolkit primitive defineEnricher from evlog/toolkit, so a community enricher has the same shape as a built-in one.

PR Title

feat(core): add the {name} enricher

Enrichers live in the core package surface (evlog/enrichers), so use the core scope unless a dedicated scope exists.

Touchpoints Checklist

#FileAction
1packages/evlog/src/enrichers/index.tsAdd enricher source (one defineEnricher call)
2Same file: createDefaultEnrichers()Decide whether the enricher belongs in the default composition (see below)
3packages/evlog/test/toolkit/enrichers.test.tsAdd tests (one describe block per enricher)
4apps/docs/content/5.use-cases/5.enrichers.mdAdd a section for the enricher + update the import list and, if applicable, the "All built-in enrichers" default composition text
5skills/review-logging-patterns/SKILL.mdAdd the enricher to the Built-in: line in the Enrichers section
6packages/evlog/README.mdAdd the enricher to the Built-in Enrichers section (root README.md is a symlink to it)
7.changeset/{name}-enricher.mdCreate changeset (minor)

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

Should it join createDefaultEnrichers()?

createDefaultEnrichers() composes user agent, geo, request size, and trace context via composeEnrichers (from ../shared/compose). Add the new enricher to the composition only if it is universally applicable and reads nothing but the request (headers/env). Anything requiring service-specific setup or extra cost stays opt-in. Changing the default composition is a behavior change for every existing createDefaultEnrichers() user: call it out explicitly in the changeset.

Naming Conventions

PlaceholderExample (UserAgent)Usage
{name}userAgentcamelCase for event field key
{Name}UserAgentPascalCase in function/interface names
{DISPLAY}User AgentHuman-readable display name

Step 1: Enricher Source: built on defineEnricher

Add the enricher to packages/evlog/src/enrichers/index.ts. Read references/enricher-template.md for the full annotated template.

The contract is defineEnricher<T>({ name, field, compute }, options?). You only ship one piece of logic:

  • compute(ctx): return the computed value (typed as T) or undefined to skip.

defineEnricher handles the rest:

  • merging via mergeEventField (respecting options.overwrite, default false)
  • error isolation (throws are caught and logged, never propagated)
  • skipping when compute returns undefined

Key rules:

  • Use the toolkit helpers: getHeader() for case-insensitive header lookup, normalizeNumber() for numeric strings. Both from ../shared/headers (re-exported by evlog/toolkit).
  • Single event field: each enricher writes one top-level field on ctx.event. If the enricher must additionally pin top-level fields (like createTraceContextEnricher does for event.traceId / event.parentSpanId), wrap the defineEnricher result in a closure, see that enricher for the pattern.
  • Factory pattern: create{Name}Enricher(options: EnricherOptions = {}) returns the result of defineEnricher(...), directly in the normal case, or through the thin closure wrapper when the enricher also pins top-level fields (see the single-event-field rule above).
  • No side effects: never throw, never log; rely on defineEnricher's built-in error handling if something goes wrong.
  • Export the Info type: {Name}Info describing the field shape, exported alongside the factory.
Show full SKILL.md (257 more words)Show less

Step 2: Tests

Add tests to packages/evlog/test/toolkit/enrichers.test.ts, following the existing structure (one describe block per enricher) and packages/evlog/test/README.md conventions.

Required test categories:

  1. Sets the field from its source: verify the enricher populates the event field correctly, reading whatever it actually reads (ctx.request, ctx.response, process.env, ctx.event, or headers)
  2. Skips when source data missing: verify no field is set when the required input is absent
  3. Preserves existing data: verify overwrite: false (default) doesn't replace user-provided fields
  4. Overwrites when requested: verify overwrite: true replaces existing fields
  5. Handles edge cases: empty strings and malformed values, plus case-insensitive lookup for a header-based enricher
  6. Default composition: if the enricher joined createDefaultEnrichers(), extend that composition's tests

Step 3: Update the Enrichers Docs Page

Edit apps/docs/content/5.use-cases/5.enrichers.md:

  1. Add the enricher to the import list at the top
  2. Add a ## {DISPLAY} section following the structure of the existing ones:
markdown
## {DISPLAY}

[One-sentence description of what the enricher does.]

**Sets:** `event.{name}`

\`\`\`typescript
const enrich = create{Name}Enricher()
\`\`\`

**Output shape:**

\`\`\`typescript
interface {Name}Info {
  // fields
}
\`\`\`

**Example output:**

\`\`\`json
{
  "{name}": {
    // example values
  }
}
\`\`\`
  1. If the enricher joined the default composition, update the "All built-in enrichers" section text listing what createDefaultEnrichers() composes.

Custom-enricher authoring docs live separately at apps/docs/content/6.extend/5.custom-enrichers.md, with no change needed there unless the toolkit contract itself changed.

Step 4: Update the Public Skill

In skills/review-logging-patterns/SKILL.md (published on evlog.dev), find the Enrichers section and add the new enricher to the Built-in: line.

Step 5: Update README

Add the enricher to the Built-in Enrichers section in packages/evlog/README.md (the root README.md is a symlink to it).

Step 6: Changeset

Create .changeset/{name}-enricher.md with a minor bump describing what the enricher sets and when to use it. Mention explicitly if the default composition changed.

Verification

bash
cd packages/evlog
pnpm run lint
pnpm run typecheck
pnpm run test
pnpm run build

© 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 1 other file (references) in .agents/skills/create-enricher of evloghq/evlog.

  • SKILL.md
  • references/enricher-template.md

Open the folder on GitHubat commit 54dcc50

Compare with similar skills

evlog Enricher 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 Enricher Creator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
evlog Enricher Creator this skillevloghq/evlog1.9k—~1.7kAutomated safety check: PassMIT
Effect TSpproenca/dot-skills215—~2kAutomated safety check: PassMIT
Add Packageremix-run/remix33k—~2kAutomated safety check: PassMIT
ScratchpadEffect-TS/effect-smol782—~459Automated safety check: PassMIT
Effect TSmattiacerutti/supernova186—~2.8kAutomated safety check: PassMIT
Enforce Rules For Typescriptmoeru-ai/airi50k—~3.4kAutomated safety check: PassMIT

Similar skills

  • 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…

    215 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Add Package

    remix-run/remix

    Create or align a package in the Remix monorepo to match existing package conventions.

    33k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Scratchpad

    Effect-TS/effect-smol

    Extract the JSDoc example nearest the active source selection or cursor into ./scratchpad as a TypeScript file.

    782 GitHub stars~459 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Effect TS

    mattiacerutti/supernova

    Write idiomatic Effect v4 TypeScript following official best practices from effect-solutions and the Effect source.

    186 GitHub stars~2.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Enforce AIRI's TypeScript and Vue source rules for imports, naming, comments, JSDoc, fallbacks, stateful and protocol code, and module design.

    50k GitHub stars~3.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Standard Jsdoc

    backpine/effect-worker-mono

    Write, insert, or update Effect public API JSDoc so it satisfies the standard-jsdoc oxlint rule.

    133 GitHub stars~1.3k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed

More from evloghq/evlog

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

    1.9k GitHub stars~2.9k tokensUpdated yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    Auto-check passed
  • evlog Content Pass

    evloghq/evlog

    Runs the daily review of evlog's written material: picks the worst-scoring files in one group, rewrites what holds up, and opens a single pull request that reports the changes.

    1.9k GitHub stars~4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about evlog Enricher Creator

What does evlog Enricher Creator do?

Guides adding a new built-in enricher to the evlog package, covering the source, tests, docs, README, a related skill and a changeset. This skill walks the agent through adding a built-in enricher to evlog, which attaches derived context to wide events. Each enricher is a single defineEnricher call from evlog/toolkit, so community enrichers have the same shape as built-in ones.

When should I use evlog Enricher Creator?

evlog Enricher Creator fits situations like: adding a new enricher such as deployment metadata or tenant context to evlog; writing tests for a new evlog enricher; updating evlog docs and README for a new enricher; deciding whether an enricher belongs in the default set.

How do I install evlog Enricher Creator in Claude Code?

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

How do I install evlog Enricher Creator in Codex?

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

Can I use evlog Enricher 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-enricher -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-enricher, .gemini/skills/create-evlog-enricher, .github/skills/create-evlog-enricher and .opencode/skills/create-evlog-enricher in your project.

What does evlog Enricher Creator need to run?

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

Does evlog Enricher 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 Enricher 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 Enricher Creator use?

evlog Enricher 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 Enricher Creator use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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 892 tokens, read only when the agent opens those files.

What are the alternatives to evlog Enricher Creator?

Skills that share tags, products or a category with evlog Enricher Creator: Effect TS (pproenca/dot-skills, 215 stars), Add Package (remix-run/remix, 33k stars), Scratchpad (Effect-TS/effect-smol, 782 stars) and Effect TS (mattiacerutti/supernova, 186 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains evlog Enricher Creator?

evloghq (a GitHub organization) maintains it in evloghq/evlog, which has 1,888 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 8, 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.