---
title: "Agent Skills"
description: "AI-assisted code review and evlog adoption using Agent Skills. Let AI review your logging patterns and guide migration to wide events."
canonical_url: "https://www.evlog.dev/reference/agent-skills"
---
# Agent Skills

> AI-assisted code review and evlog adoption using Agent Skills. Let AI review your logging patterns and guide migration to wide events.

evlog includes agent skills that help AI assistants review your logging patterns and guide evlog adoption. Pair them with the [evlog CLI](https://www.evlog.dev/cli/overview) when you want a scoreable coverage map. The skills teach the patterns; `evlog map` points at the dark entry points.

## What are Agent Skills?

[Agent Skills](https://agentskills.io/) is an open specification for packaging AI assistant capabilities. Skills provide:

- **Domain knowledge**: Best practices for wide events and structured errors
- **Code review**: Identify logging anti-patterns in your codebase
- **Guided adoption**: Step-by-step help migrating to evlog

## Available Skills

<table>
<thead>
  <tr>
    <th>
      Skill
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        skills/review-logging-patterns
      </code>
    </td>
    
    <td>
      Review logging patterns, suggest evlog adoption; optionally use <code>
        evlog map
      </code>
      
       for coverage
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        skills/build-audit-logs
      </code>
    </td>
    
    <td>
      Design, wire, and review tamper-aware audit trails: policy, <code>
        auditEnricher
      </code>
      
      , <code>
        auditOnly
      </code>
      
      , <code>
        signed
      </code>
      
      , denials, redaction, tests
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        skills/analyze-logs
      </code>
    </td>
    
    <td>
      Analyze application logs from <code>
        .evlog/logs/
      </code>
      
       to debug errors, investigate performance, and understand behavior
    </td>
  </tr>
</tbody>
</table>

## Installing the Skill

Compatible agents (Cursor, Claude Code, etc.) can discover and use skills automatically.

To install with the skills CLI:

```bash [Terminal]
npx skills add https://www.evlog.dev
```

[`evlog agents`](https://www.evlog.dev/cli/agents) runs that same command for you, and additionally writes a short block of evlog conventions into your project's `AGENTS.md`, the rules an agent should follow on every logging change, which the skills then back with the detail:

```bash [Terminal]
npx evlog agents
```

### Where the skills land

`evlog agents` installs globally by default, into `~/.agents/skills`: the shared directory that Codex and the other agents reading `.agents/skills` use. Claude Code gets a relative symlink to that copy in `~/.claude/skills`, so one set of files serves both. Pass `--local` to install into the project instead: `.agents/skills` and `.claude/skills` at the project root, with a `skills-lock.json` beside them.

evlog does not pass other agents. To add one, run the skills CLI yourself, for example `npx skills add https://www.evlog.dev --agent cursor`.

## What the Skill Does

### Code Review

The skill analyzes your codebase for:

- **Scattered logging**: Multiple `console.log` or `logger.info` calls in request handlers
- **Missing context**: Logs without user, request, or business context
- **Unhelpful errors**: `throw new Error()` without structured fields
- **Correlation gaps**: Missing request IDs or trace IDs

On Nuxt, Nitro, Next.js, TanStack Start, Hono, Express, and Fastify, ask the assistant to try [`evlog map`](https://www.evlog.dev/cli/map) first (`npx evlog map --no-write`): it scores every entry point and lists FIX FIRST. Agents that prefer structured output can use `npx evlog map --json --no-write`. The skill still works without the CLI; map is early and makes the review faster when available.

### Adoption Guidance

The skill helps you:

- Convert traditional logging to wide events
- Design effective wide event schemas
- Implement structured errors with `why`, `fix`, and `link`
- Set up evlog in Nuxt, Nitro, or standalone TypeScript

### Log Analysis

The `analyze-logs` skill teaches your AI assistant to read structured logs from `.evlog/logs/`:

- **Error debugging**: Find and explain errors, stack traces, and failure patterns
- **Performance investigation**: Identify slow requests by duration
- **Request tracing**: Follow a request across its lifecycle using `requestId`
- **Pattern detection**: Spot recurring issues or anomalies

### Example Prompts

Ask your AI assistant:

<prompt :actions="["copy","cursor","claude"]" description="Review my code for logging anti-patterns" icon="i-lucide-search-code">

Review this file for logging anti-patterns

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Raise my evlog map score" icon="i-lucide-radar">

Run `npx evlog map --no-write` in this project and read the report.

- Fix the entry points listed under FIX FIRST, in order
- For each one, run `npx evlog map <file> --no-write` first to see the suggested shape
- Keep the changes minimal: add `useLogger()`, `log.set()`, `log.audit()`, or `createError({ why, fix })` where the report says they are missing
- Re-run `npx evlog map --no-write` and confirm the score went up

Docs: [https://www.evlog.dev/cli/map](https://www.evlog.dev/cli/map)
Rules: [https://www.evlog.dev/cli/rules](https://www.evlog.dev/cli/rules)

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Convert console.log calls to a wide event" icon="i-lucide-layers">

Help me convert these console.log calls to a wide event

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Suggest context to add to my wide event" icon="i-lucide-sparkles">

What context should I add to this wide event?

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Design or review an audit trail with evlog" icon="i-lucide-shield-check">

Follow the **build-audit-logs** skill. Help me design, implement, or review an audit trail with evlog ([https://www.evlog.dev/use-cases/audit/overview](https://www.evlog.dev/use-cases/audit/overview)).

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Structure this error with evlog" icon="i-lucide-shield-alert">

How do I structure this error with evlog?

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Debug a failing endpoint from logs" icon="i-lucide-bug">

Why is the checkout endpoint failing?

</prompt>

<prompt :actions="["copy","cursor","claude"]" description="Find the slowest requests from today" icon="i-lucide-gauge">

Show me the slowest requests from today

</prompt>

## Skill Structure

```text
skills/
├── review-logging-patterns/
│   ├── SKILL.md              # Main skill instructions
│   └── references/
│       ├── wide-events.md    # Wide event patterns
│       ├── structured-errors.md # Error handling guide
│       └── code-review.md    # Review checklist
├── build-audit-logs/
│   ├── SKILL.md              # Audit policy, wiring, review checklist
│   └── references/
│       └── framework-wiring.md
└── analyze-logs/
    └── SKILL.md              # Log analysis from .evlog/logs/
```

## Reference Documents

The skill includes reference documents that provide:

### wide-events.md

- Wide event anatomy and best practices
- Context grouping patterns
- Output format examples

### structured-errors.md

- Error field definitions
- Status code guidelines
- Frontend integration patterns

### code-review.md

- Checklist for logging code review
- Common anti-patterns to identify
- Migration suggestions

## Next Steps

- [Quick Start](https://www.evlog.dev/start/quick-start) - Get started with evlog
- [Wide Events](https://www.evlog.dev/learn/wide-events) - Learn wide event design
- [Structured Errors](https://www.evlog.dev/learn/structured-errors) - Error handling patterns

---

- [Agent Skills Spec](https://agentskills.io)


## Sitemap

See the full [sitemap](https://www.evlog.dev/sitemap.md) for all pages.
