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.
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a claude-codeWhat 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-nodeand 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-code2Manually: put the files in place
~/.claude/skills/otel-js/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/otel-js/
1Skills CLI (Vercel)
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a codex2Manually: put the files in place
.agents/skills/otel-js/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a cursor2Manually: put the files in place
.cursor/skills/otel-js/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ollygarden/opentelemetry-agent-skills otel-js2Manually: put the files in place
.github/skills/otel-js/SKILL.md1Skills CLI (Vercel)
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a gemini-cli2Platform CLI
gemini skills install https://github.com/ollygarden/opentelemetry-agent-skills --path skills/otel-jsManually: put the files in place
.devin/skills/otel-js/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-js -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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