Skip to main content
skill CX Codex

otel-js — Claude Code skill: OpenTelemetry for Node.js

Walks your agent through OpenTelemetry setup in a Node.js, JavaScript or TypeScript service. Handy when you are adding tracing or wiring up NodeSDK.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a claude-code
Open on GitHub

What otel-js does

The skill gives an agent a starting point for OpenTelemetry work in Node.js services. It ships one reference file, references/declarative-setup.md, covering SDK setup through declarative YAML: the OTEL_CONFIG_FILE variable, the @opentelemetry/configuration and @opentelemetry/sdk-node packages, import order under ESM and CJS, and the move to 2.0. Each reference stands on its own, so the agent pulls in only what the task needs.

A second section lists where the agent should look things up. Package versions come from npm view for @opentelemetry/configuration, @opentelemetry/sdk-node and @opentelemetry/auto-instrumentations-node. Release status, breaking changes, ESM and CJS preload behaviour, the auto-instrumentation entry point and the 2.x to 3.x migration guide are fetched from files in the opentelemetry-js repository by direct URL.

The skill points at three neighbours: otel-declarative-config for the YAML schema, otel-sdk-versions for picking an SDK version, otel-semantic-conventions for semantic conventions. Install it alongside them, or the agent will guess at part of the answer. Schema details live in the first of those, so without it you are back to reading the upstream docs yourself.

What it helps with

  • wire NodeSDK into a Node.js service
  • move OTel config to declarative YAML
  • sort out import order for ESM and CJS
  • pick versions of @opentelemetry/sdk-node and auto-instrumentations
  • migrate from 2.x to 3.x

Example prompts for the agent

  • Set up OpenTelemetry in this Node.js service with NodeSDK
  • Convert the OTel config to declarative YAML using OTEL_CONFIG_FILE
  • Check the OTel import order for ESM in this project

How to install otel-js

1Skills CLI (Vercel)

npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a claude-code

2Manually: put the files in place

~/.claude/skills/otel-js/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/otel-js/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about otel-js

How do I install otel-js in Claude Code?

Run npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a claude-code. The skill file then sits at ~/.claude/skills/otel-js/SKILL.md.

What does otel-js do?

It hands the agent a reference on OpenTelemetry in Node.js: SDK setup via declarative YAML, auto-instrumentations, and the ESM versus CJS import differences. The agent loads it when you add or review tracing in a service.

Do I need other skills next to otel-js?

It cross-references otel-declarative-config for the YAML schema, otel-sdk-versions for SDK version selection and otel-semantic-conventions for semantic conventions. Without the first one, config details are left to the agent's guesswork.

Source text

SKILL.md · Apache-2.0
---
name: otel-js
description: OpenTelemetry in Node.js / JavaScript / TypeScript — NodeSDK, declarative YAML configuration, auto-instrumentations, ESM vs CJS import patterns. Use when adding, reviewing, or configuring OpenTelemetry in a Node.js service. Triggers on "setup otel in node", "js telemetry", "node tracing setup", "NodeSDK", "auto instrumentation node", "TracerProvider node", or any Node.js-related OTel question.
---

# OpenTelemetry in Node.js

Entry point for OpenTelemetry mechanics in Node.js / JavaScript / TypeScript services.
Load a reference below based on the task; each reference is self-contained.

## References

| File | Use when |
|---|---|
| [`references/declarative-setup.md`](references/declarative-setup.md) | Configuring the SDK via declarative YAML: `OTEL_CONFIG_FILE`, `@opentelemetry/configuration`, `@opentelemetry/sdk-node`, ESM/CJS import order, v2.0 migration. |

## Sources of Truth

For YAML schema details, fetch the upstream sources listed in the `otel-declarative-config` skill.
For Node.js-specific facts:

| Fact | Fetch |
|---|---|
| Latest `@opentelemetry/configuration` | `npm view @opentelemetry/configuration version` |
| Latest `@opentelemetry/sdk-node` | `npm view @opentelemetry/sdk-node version` |
| Latest `@opentelemetry/auto-instrumentations-node` | `npm view @opentelemetry/auto-instrumentations-node version` |
| Released package status / breaking changes (`3.0.0` / `0.300.0`, verified 2026-10-21) | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/v3.0.0/experimental/packages/configuration/README.md` and `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/v3.0.0/experimental/packages/opentelemetry-sdk-node/README.md` |
| Experimental CHANGELOG through `0.300.0` | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/v3.0.0/experimental/CHANGELOG.md` |
| ESM / CJS preload mechanics at `3.0.0` | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/v3.0.0/doc/esm-support.md` |
| Auto-instrumentations register entry point at `0.80.0` | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js-contrib/auto-instrumentations-node-v0.80.0/packages/auto-instrumentations-node/README.md` |
| 2.x → 3.x migration (removed packages, Node.js floor) | `WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-js/v3.0.0/doc/3.x/migration-guide.md` |
| Node.js getting-started docs | `WebFetch https://opentelemetry.io/docs/languages/js/getting-started/nodejs/` |

## Cross-References

- Schema-level facts: `otel-declarative-config` skill (language-agnostic YAML schema sources).
- SDK version selection across languages: `otel-sdk-versions` skill.
- Semantic conventions lookup: `otel-semantic-conventions` skill.

© ollygarden · Apache-2.0 · ollygarden/opentelemetry-agent-skills

Similar skills

All skills for Backend and APIs →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor