create-evlog-framework-integration

hugorcd/evlog · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/hugorcd/evlog --skill create-evlog-framework-integration
0 commentsdiscussion
summary

Add a new framework integration to evlog. Every integration follows the same architecture built on the shared createMiddlewareLogger utility. This skill walks through all touchpoints. Every single touchpoint is mandatory -- do not skip any.

skill.md

Create evlog Framework Integration

Add a new framework integration to evlog. Every integration follows the same architecture built on the shared createMiddlewareLogger utility. This skill walks through all touchpoints. Every single touchpoint is mandatory -- do not skip any.

PR Title

Recommended format for the pull request title:

feat({framework}): add {Framework} middleware integration

Touchpoints Checklist

# File Action
1 packages/evlog/src/{framework}/index.ts Create integration source
2 packages/evlog/tsdown.config.ts Add build entry + external
3 packages/evlog/package.json Add exports + typesVersions + peer dep + keyword
4 packages/evlog/test/{framework}.test.ts Create tests
5 apps/docs/content/2.frameworks/{NN}.{framework}.md Create framework docs page
6 apps/docs/content/2.frameworks/00.overview.md Add card + table row
7 apps/docs/content/1.getting-started/2.installation.md Add card in "Choose Your Framework"
8 apps/docs/content/0.landing.md Add framework code snippet
9 apps/docs/app/components/features/FeatureFrameworks.vue Add framework tab
10 skills/review-logging-patterns/SKILL.md Add framework setup section + update frontmatter description
11 packages/evlog/README.md Add framework section + add row to Framework Support table
12 examples/{framework}/ Create example app with test UI
13 package.json (root) Add example:{framework} script
14 .changeset/{framework}-integration.md Create changeset (minor)
15 .github/workflows/semantic-pull-request.yml Add {framework} scope
16 .github/pull_request_template.md Add {framework} scope

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

Naming Conventions

Use these placeholders consistently:

Placeholder Example (Hono) Usage
{framework} hono Directory names, import paths, file names
{Framework} Hono PascalCase in type/interface names

Shared Utilities

All integrations share the same core utilities. Never reimplement logic that exists in shared/. These are also publicly available as evlog/toolkit for community-built integrations (see Custom Integration docs).

Utility Location Purpose
createMiddlewareLogger ../shared/middleware Full lifecycle: logger creation, route filtering, tail sampling, emit, enrich, drain
extractSafeHeaders ../shared/headers Convert Web API Headers → filtered Record<string, string> (Hono, Elysia, etc.)
extractSafeNodeHeaders ../shared/headers Convert Node.js IncomingHttpHeaders → filtered Record<string, string> (Express, Fastify, NestJS)
BaseEvlogOptions ../shared/middleware Base user-facing options type with drain, enrich, keep, include, exclude, routes
MiddlewareLoggerOptions ../shared/middleware Internal options type extending BaseEvlogOptions with method, path, requestId, headers
createLoggerStorage ../shared/storage Factory returning { storage, useLogger } for AsyncLocalStorage-backed useLogger()

Test Helpers

Utility Location Purpose
createPipelineSpies() test/helpers/framework Creates mock drain/enrich/keep callbacks
assertDrainCalledWith() test/helpers/framework Validates drain was called with expected event shape
assertEnrichBeforeDrain() test/helpers/framework Validates enrich runs before drain
assertSensitiveHeadersFiltered() test/helpers/framework Validates sensitive headers are excluded
assertWideEventShape() test/helpers/framework Validates standard wide event fields

Step 1: Integration Source

Create packages/evlog/src/{framework}/index.ts.

The integration file should be minimal — typically 50-80 lines of framework-specific glue. All pipeline logic (enrich, drain, keep, header filtering) is handled by createMiddlewareLogger.

Template Structure

import type { RequestLogger } from '../types'
import { createMiddlewareLogger, type BaseEvlogOptions } from '../shared/middleware'
import { extractSafeHeaders } from '../shared/headers'       // for Web API Headers (Hono, Elysia)
// OR
import { extractSafeNodeHeaders } from '../shared/headers'    // for Node.js headers (Express, Fastify)
import { createLoggerStorage } from '../shared/storage'

const { storage, useLogger } = createLoggerStorage(
  'middleware context. Make sure the evlog middleware is registered before your routes.',
)

export interface Evlog{Framework}Options extends BaseEvlogOptions {}

export { useLogger }

// Type augmentation for typed logger access (framework-specific)
// For Express: declare module 'express-serve-static-core' { interface Request { log: RequestLogger } }
// For Hono: export type EvlogVariables = { Variables: { log: RequestLogger } }

export function evlog(options: Evlog{Framework}Options = {}): FrameworkMiddleware {
  return async (frameworkContext, next) => {
    const { logger, finish, skipped } = createMiddlewareLogger({
      method: /* extract from framework context */,
      path: /* extract from framework context */,
      requestId: /* extract x-request-id or crypto.randomUUID() */,
      headers: extractSafeHeaders(/* framework request Headers object */),
      ...options,
    })

    if (skipped) {
      await next()
      return
    }

    // Store logger in framework-specific context
    // e.g., c.set('log', logger) for Hono
    // e.g., req.log = logger for Express

    // Wrap next() in AsyncLocalStorage.run() for useLogger() support
    // Express: storage.run(logger, () => next())
    // Hono: await storage.run(logger, () => next())
  }
}

Reference Implementations

  • Hono (~40 lines): packages/evlog/src/hono/index.ts — Web API Headers, c.set('log', logger), wraps next() in try/catch
  • Express (~80 lines): packages/evlog/src/express/index.ts — Node.js headers, req.log, res.on('finish'), AsyncLocalStorage for useLogger()
  • Elysia (~70 lines): packages/evlog/src/elysia/index.ts — Web API Headers, derive() plugin, onAfterHandle/onError, AsyncLocalStorage for useLogger()

Key Architecture Rules

  1. Use createMiddlewareLogger — never call createRequestLogger directly
  2. Use the right header extractorextractSafeHeaders for Web API Headers, extractSafeNodeHeaders for Node.js IncomingHttpHeaders
  3. Spread user options into createMiddlewareLoggerdrain, enrich, keep are handled automatically by finish()
  4. Store logger in the framework's idiomatic context (e.g., c.set() for Hono, req.log for Express, .derive() for Elysia)
  5. Export useLogger() — backed by AsyncLocalStorage so the logger is accessible from anywhere in the call stack
  6. Call finish() in both success and error paths — it handles emit + enrich + drain
  7. Re-throw errors after finish() so framework error handlers still work
  8. Export options interface with drain/enrich/keep for feature parity across all frameworks
  9. Export type helpers for typed context access (e.g., EvlogVariables for Hono)
  10. Framework SDK is a peer dependency — never bundle it
  11. Never duplicate pipeline logiccallEnrichAndDrain is internal to createMiddlewareLogger

Framework-Specific Patterns

Hono: Use MiddlewareHandler return type, c.set('log', logger), c.res.status for status, c.req.raw.headers for headers.

Express: Standard (req, res, next) middleware, res.on('finish') for response end, storage.run(logger, () => next()) for useLogger(). Type augmentation targets express-serve-static-core (NOT express). Error handler uses ErrorRequestHandler type.

Elysia: Return new Elysia({ name: 'evlog' }) plugin, use .derive({ as: 'global' }) to create logger and attach log to context, onAfterHandle for success path, onError for error path. Use storage.enterWith(logger) in derive for useLogger() support. Note: onAfterResponse is fire-and-forget and may not complete before app.handle() returns in tests — use onAfterHandle instead.

Fastify: Use fastify-plugin wrapper, fastify.decorateRequest('log', null), onRequest/onResponse hooks.

NestJS: NestInterceptor with intercept(), tap()/catchError() on observable, forRoot() dynamic module.

Step 2: Build Config

Add a build entry in packages/evlog/tsdown.config.ts:

'{framework}/index': 'src/{framework}/index.ts',

Place it after the existing framework entries (workers, next, hono, express).

Also add the framework SDK to the external array:

external: [
  // ... existing externals
  '{framework-package}',  // e.g., 'elysia', 'fastify', 'express'
],

Step 3: Package Exports

In packages/evlog/package.json, add four entries:

In exports (after the last framework entry):

"./{framework}": {
  "types": "./dist/{framework}/index.d.mts",
  "import": "./dist/{framework}/index.mjs"
}

In typesVersions["*"]:

"{framework}": [
  "./dist/{framework}/index.d.mts"
]

In peerDependencies (with version range):

"{framework-package}": "^{latest-major}.0.0"

In peerDependenciesMeta (mark as optional):

"{framework-package}": {
  "optional": true
}

In keywords — add the framework name to the keywords array.

Step 4: Tests

Create packages/evlog/test/{framework}.test.ts.

Import shared test helpers from ./helpers/framework:

import {
  assertDrainCalledWith,
  assertEnrichBeforeDrain,
  assertSensitiveHeadersFiltered,
  createPipelineSpies,
} from './helpers/framework'

Required test categories:

  1. Middleware creates logger — verify c.get('log') or req.log returns a RequestLogger
  2. Auto-emit on response — verify event includes status, method, path, duration
  3. Error handling — verify errors are captured and event has error level + error details
  4. Route filtering — verify skipped routes don't create a logger
  5. Request ID forwarding — verify x-request-id header is used when present
  6. Context accumulation — verify logger.set() data appears in emitted event
  7. Drain callback — use assertDrainCalledWith() helper
  8. Enrich callback — use assertEnrichBeforeDrain() helper
  9. Keep callback — verify tail sampling callback receives context and can force-keep logs
  10. Sensitive header filtering — use assertSensitiveHeadersFiltered() helper
  11. Drain/enrich error resilience — verify errors in drain/enrich do not break the request
  12. Skipped routes skip drain/enrich — verify drain/enrich are not called for excluded routes
  13. useLogger() returns same logger — verify useLogger() === req.log (or framework equivalent)
  14. useLogger() throws outside c
how to use create-evlog-framework-integration

How to use create-evlog-framework-integration on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add create-evlog-framework-integration
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/hugorcd/evlog --skill create-evlog-framework-integration

The skills CLI fetches create-evlog-framework-integration from GitHub repository hugorcd/evlog and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/create-evlog-framework-integration

Reload or restart Cursor to activate create-evlog-framework-integration. Access the skill through slash commands (e.g., /create-evlog-framework-integration) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.450 reviews
  • Ama Ramirez· Dec 28, 2024

    Registry listing for create-evlog-framework-integration matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dhruvi Jain· Dec 24, 2024

    Useful defaults in create-evlog-framework-integration — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Olivia Jain· Dec 24, 2024

    Useful defaults in create-evlog-framework-integration — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Fatima Sharma· Dec 20, 2024

    create-evlog-framework-integration is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Kofi Mensah· Dec 20, 2024

    create-evlog-framework-integration fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Kofi Huang· Nov 27, 2024

    We added create-evlog-framework-integration from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Michael Smith· Nov 19, 2024

    Keeps context tight: create-evlog-framework-integration is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Oshnikdeep· Nov 15, 2024

    create-evlog-framework-integration has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Kofi Kim· Nov 15, 2024

    create-evlog-framework-integration has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Yusuf Kim· Nov 11, 2024

    create-evlog-framework-integration reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 50

1 / 5