evlog skill

Three skills for TypeScript logging: review code and move to wide events, build an audit trail and analyze local logs

  • 1,907 ★ on the repository
  • Last commit
  • MIT
SkillOfficial

Extended access

Why this level

  • The skills edit handler code and add a dependency to the project, and `evlog init` writes configuration files
  • Commands via `npx` download the @evlog/cli package from the network when the project lacks it
  • Log analysis reads application files that may hold user and payment data
All reasons and checks

evloghq/evlog

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/evlog

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The skills edit handler code and add a dependency to the project, and `evlog init` writes configuration files
  • Commands via `npx` download the @evlog/cli package from the network when the project lacks it
  • Log analysis reads application files that may hold user and payment data

This is third-party code. Review the repository files before installing.

What it does

evlog is a TypeScript logging library with one wide event per operation holding all the context, and errors that carry why and fix fields. The repository's skills/ folder holds three skills for an agent working on application code. The `npx skills add https://www.evlog.dev` command puts them into the skills folder. The review-logging-patterns skill looks in TypeScript and JavaScript for scattered console.log calls, errors without context and missing request IDs. It then moves the code to evlog: it replaces scattered records with `useLogger()` and `log.set()`, and generic errors with `createError({ why, fix })`. It sets up log shipping and sampling for Nuxt, Nitro, Next.js, TanStack Start, Hono, Express, Fastify and other frameworks. On seven frameworks it can run `evlog init` (wire the library in) and `evlog map` (score which entry points of the app log nothing), asking permission each time. The build-audit-logs skill designs an audit trail on the action, actor, target and outcome scheme: `log.audit()` and `withAudit()` calls, access denials, context enrichment, HMAC or hash-chain signing of records and test assertions. The analyze-logs skill reads the local `.evlog/logs/*.jsonl` files written by the file drain and answers questions: what failed, which requests are slow, what happened to a given requestId. It uses the `evlog logs` commands or parses the files itself.

Who it is for. For TypeScript developers building a service on Nuxt, Next.js, Hono or Express who want the agent to tidy the logs, build an audit trail and debug failures from the logs.

Good fit when

  • Request handlers are full of console.log and errors arrive as 'Something went wrong', and you want to move the code to structured events
  • You need an audit trail for payments, administration or data export: who did what to which object and whether it was allowed
  • The service failed and the agent should find errors, slow requests and the full path of one request in the local logs
  • You want to add a logging coverage score to the project and hold it in CI with a threshold or a baseline
  • You need to ship logs to Axiom, Sentry, Datadog, OTLP, PostHog or another drain with sampling and enrichment

Not a fit when

  • The project is not written in TypeScript or JavaScript: the skills and the whole library target those languages
  • You need production error triage in a monitoring service that already runs: the catalog has Sentry for AI for that, while evlog reads only its own local files or your drain
  • You do not want to add the evlog dependency to the project: the skills teach code written for this library
  • There are no application logs on disk and no drain turned on: analyze-logs reads `.evlog/logs/` files and the memory drain, and without them it has nothing to do

Example request

Review the checkout handler and replace the scattered console.log calls with one event carrying context, and make the payment error self-explaining with why and fix

Limitations

The license is MIT. The skills are tied to the evlog library: they do not cover other loggers, and moving code to evlog adds the `npm install evlog` dependency to the project.

The skill offers to run `evlog init`, `evlog map` and `evlog agents` on Nuxt, Nitro, Next.js, TanStack Start, Hono, Express and Fastify. On other frameworks setup is manual. The author calls the command line early: scores and rules change between versions. If the project has no `@evlog/cli`, commands via `npx` download it without pinning a version, which is why the skill asks permission.

The quickest way to install the skills is `npx evlog agents`: by default into `~/.agents/skills` with a link for Claude Code, or into the project with `--local`. Other agents are added with a separate `npx skills add` run with the `--agent` flag.

analyze-logs has one subtlety: events hold whatever the application put there through `log.set()`, for example user or payment data. The files land in `.gitignore` automatically and live only on the machine where the app runs.

How to disable. Delete the review-logging-patterns, build-audit-logs and analyze-logs folders from `~/.agents/skills` and their links in `~/.claude/skills`, or from the project's `.agents/skills` and `.claude/skills`. If `npx evlog agents` added a rules block to AGENTS.md, remove it by hand. The library itself comes off with `npm uninstall evlog`, and the `.evlog/` folder can be deleted.

FAQ

What is a wide event and why does the agent need it?

It is one record per operation: the request, user, cart, error and duration sit in one JSON. The agent does not have to stitch a dozen lines together by time, and the why and fix fields in an error point to the cause and the correction straight away.

What does evlog map count?

It reads the project on disk with no traffic and finds all entry points of the app. It scores each by whether the handler logs events and errors and names the three places worth fixing first. The score can be held in CI: `--min-score` sets a threshold and `--baseline` blocks a regression against the saved result.

Which log drains can the skill set up?

The skill names Axiom, OTLP, HyperDX, Sazabi, PostHog, Sentry, Better Stack, Datadog, Loki, ClickHouse, NuxtHub and the memory drain. For development the default is the file drain, which writes to `.evlog/logs/`.

How do I make the audit trail tamper-evident?

The `signed()` wrapper adds an HMAC signature or a hash chain to records. Audit records are always kept without sampling, and `auditOnly()` sends only them to a separate drain. For tests there is `mockAudit()`.

How does analyze-logs find what it needs?

It first tries the `evlog logs` command with filters: errors, slow, by requestId, stats per route with p50 and p95, a condition through `--where`. Without the command line it reads the `.jsonl` files by date, detects NDJSON or multi-line output and filters on the level, status, durationMs and requestId fields.

What does evlog agents write?

It runs the install of the same skills and adds a short rules block to the project's AGENTS.md: how the agent should write logging on every change. The skills give the detail, while the block restates the essentials on each request.

Discussion

No questions or reviews yet.

Skills

Node.js skills from a Fastify co-creator: Node and Fastify practices, TypeScript, OAuth, linting and documentation

SkillMinimal access2KRepository stars

Better Auth skills

Better Auth Skills

Official Better Auth skills: scaffold authentication in JS and TS projects and guide a secure setup

SkillExtended access227Repository stars
Official

24 skills inside the tRPC packages: server, adapters, client, Next.js, TanStack React Query and OpenAPI load into the agent by task via TanStack Intent

SkillMinimal access40.7KRepository stars

Go skills by samber

cc-skills-golang

Editors’ pick

Over forty Go skills: style, errors, concurrency, testing, security, performance and popular libraries

SkillExtended access3.7KRepository stars

The official Payload CMS skill shipped inside the package: collections, fields, hooks, access control, queries and database adapters

SkillMinimal access45.6KRepository stars

README in short

The library description in English: the problem of scattered logs, a wide-event example, setup through evlog.config.ts, connecting to Nuxt and other frameworks, an integrations table, a section on the evlog map command line and a section on skills with example prompts. The skills sit in skills/ with references on wide events, structured errors, the drain pipeline and code review. The evlog developers have separate skills in .agents/skills, and the documentation lives at evlog.dev.

README badge

Original SKILL.md

---
name: review-logging-patterns
description: Review code for logging patterns and suggest evlog adoption. Optionally use the evlog CLI, shipped with the evlog package (`evlog init` to wire evlog, `evlog agents` to write the conventions into AGENTS.md, `evlog map` to score entry-point coverage, `--baseline` to gate regressions in CI) on Nuxt, Nitro, Next.js, TanStack Start, Hono, Express, and Fastify. Guides setup on those plus SvelteKit, React Router, NestJS, Express, Fastify, Elysia, oRPC, Cloudflare Workers, AWS Lambda, Astro, and standalone TypeScript. Detects console.log spam, unstructured errors, and missing context. Covers wide events, structured errors, drain adapters (Axiom, OTLP, HyperDX, Sazabi, PostHog, Sentry, Better Stack, Datadog, Loki, ClickHouse, NuxtHub, Memory), sampling, enrichers, and AI SDK integration.
license: MIT
metadata:
  author: HugoRCD
  version: "0.9"
---

# Review logging patterns

Review and improve logging patterns in TypeScript/JavaScript codebases. Transform scattered console.logs into structured wide events and convert generic errors into self-documenting structured errors.

## When to Use

- Setting up evlog in a new or existing project (any supported framework)
- Reviewing code for logging best practices
- Converting console.log statements to structured logging
- Improving error handling with better context
- Configuring log draining, sampling, or enrichment

## Quick Reference

| Working on...           | Resource                                                           |
| ----------------------- | ------------------------------------------------------------------ |
| Setup (CLI)             | [`evlog init`](https://www.evlog.dev/cli/init): wire evlog into the project |
| Project conventions (CLI) | [`evlog agents`](https://www.evlog.dev/cli/agents): write the evlog block into the project's AGENTS.md |
| Coverage map (CLI)      | [`evlog map`](https://www.evlog.dev/cli/map): score dark entry points |
| CI gating (CLI)         | [`evlog map --min-score / --baseline`](https://www.evlog.dev/cli/ci): gate regressions |
| Wide events patterns    | [references/wide-events.md](references/wide-events.md)             |
| Error handling          | [references/structured-errors.md](references/structured-errors.md) |
| Code review checklist   | [references/code-review.md](references/code-review.md)             |
| Drain pipeline          | [references/drain-pipeline.md](references/drain-pipeline.md)       |
| Audit logs              | [build-audit-logs](../build-audit-logs/SKILL.md) skill + [docs](https://www.evlog.dev/use-cases/audit/overview) |

## Audit logs

For security-sensitive actions (auth, billing, admin, data export), use evlog's audit layer: a typed `audit` field on wide events, not a parallel logger. See the **`build-audit-logs`** skill for end-to-end setup (`log.audit`, `withAudit`, denials, `auditEnricher`, `auditOnly`, `signed`, `mockAudit`).

```typescript
log.audit({
  action: 'invoice.refund',
  actor: { type: 'user', id: user.id },
  target: { type: 'invoice', id: invoice.id },
  outcome: 'success',

Report a problem

Foxx AIevlog
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.