Skip to main content
skill CX Codex

dt-js-runtime — Claude Code skill: Dynatrace JS runtime

A skill that documents the Dynatrace server-side JS runtime: function contract, sandbox limits, available Web APIs and Node.js modules. Useful when writing code for the AppEngine sandbox.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a claude-code
Open on GitHub

What dt-js-runtime does

This skill hands your agent a reference for the Dynatrace server-side JS runtime, the AppEngine sandbox that executes JavaScript and TypeScript. Every entry point must export a default async function. ES module syntax is required, and TypeScript annotations, interfaces and generics are accepted. No other export shape works, so the agent gets the skeleton right the first time.

Four reference files load on demand: limits and restrictions (timeout, memory, I/O quotas, and the ban on eval, WebSocket, sockets and the filesystem), the list of available Web APIs and Node.js compat modules, fetch calls to internal /platform/... routes or external URLs with the credential vault and outbound allowlist, and the @dynatrace-sdk/* catalog. You pull only the file you need, which keeps context clean.

You can run code without deploying an app via dtctl exec function. It takes inline code or a file, and --payload passes parsed JSON straight in as the function argument rather than wrapping it in an event.payload field. Authentication setup and context switching live in the dynatrace-control skill. Watch the allowlist: a fetch to an external URL that is not on it will fail, so check the list before you debug the function itself.

What it helps with

  • write an entry point that matches the runtime contract
  • find out which Node.js modules and Web APIs the sandbox exposes
  • call an external URL with fetch and the credential vault
  • pick the right package from the @dynatrace-sdk/* catalog
  • run a function through dtctl exec function before deploying

Example prompts for the agent

  • Check my Dynatrace JS runtime function — is the export contract correct?
  • What are the timeout and memory limits in the Dynatrace JS runtime?
  • How do I call an external API from this sandbox with fetch and the credential vault?

How to install dt-js-runtime

1Skills CLI (Vercel)

npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a claude-code

2Manually: put the files in place

~/.claude/skills/dt-js-runtime/SKILL.md

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

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

Questions about dt-js-runtime

How do I install dt-js-runtime in Claude?

Run npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a claude-code. The skill file then lands at ~/.claude/skills/dt-js-runtime/SKILL.md.

What does dt-js-runtime do?

It documents the Dynatrace server-side JS runtime: the function contract, limits and restrictions, available Web APIs and Node.js modules, fetch with the credential vault, and the @dynatrace-sdk/* catalog.

How can I test code without deploying an app?

Use dtctl exec function — it accepts inline code or a file, and --payload passes JSON directly as the function argument. The dynatrace-control skill covers authentication and context switching.

Source text

SKILL.md · Apache-2.0
---
name: dt-js-runtime
description: Dynatrace server-side JS runtime — function contract, runtime limits, Web APIs, Node.js modules, fetch with credential vault, and the @dynatrace-sdk/* catalog.
license: Apache-2.0
---

# Dynatrace JavaScript Runtime

The Dynatrace JS runtime is a server-side AppEngine sandbox that executes JavaScript/TypeScript.

## Function contract

Every entry point must export a default async function:

```js
export default async function () {
  // ...
  return result;
}
```

ES module syntax required. TypeScript accepted (type annotations, interfaces, generics). No other export shape is supported.

## References

Start here, then load only the file you need.

| File | When to load |
|------|-------------|
| [references/limits-and-restrictions.md](references/limits-and-restrictions.md) | Timeout / memory / I/O quotas; what's forbidden (`eval`, WebSocket, sockets, filesystem) |
| [references/apis-and-modules.md](references/apis-and-modules.md) | Which Web APIs and Node.js compat modules are available (fetch, crypto, streams, buffer, …) |
| [references/fetch.md](references/fetch.md) | Calling internal `/platform/...` APIs or external URLs, credential vault, outbound allowlist |
| [references/sdk.md](references/sdk.md) | Any `@dynatrace-sdk/*` package — the index routes you to the right per-SDK file |

## Running a function with dtctl

Use `dtctl exec function` to run JS runtime code without deploying an app.

```dtctl
# Run inline code
dtctl exec function --code 'export default async function() { return "hello" }'

# Run from file
dtctl exec function -f script.js

# Pass JSON input — the parsed object is the function's argument
dtctl exec function -f script.js --payload '{"key":"value"}'
```

The function may accept an optional parameter. `--payload` is parsed and passed
as that argument directly — it is not wrapped in an `event.payload` field:

```js
export default async function(payload) {
  // with --payload '{"key":"value"}', payload is {"key": "value"}
  return payload.key;
}
```

Load the **`dynatrace-control`** skill for authentication setup, context switching, and the full `exec function` reference.

© Dynatrace · Apache-2.0 · Dynatrace/dynatrace-for-ai

Similar skills

All skills for Backend and APIs →

From the same set30

dt-obs-predictive-analytics A Dynatrace skill that forecasts metric values, tracks trends and flags anomalies across hosts and services. Useful for capacity planning and spotting what shifted. CX Codex +1 2,100installs dt-obs-gcp A skill that writes DQL queries against GCP resources in Dynatrace Smartscape: inventory, topology, access audits. Useful when you need to see what actually runs in GCP. CX Codex +1 2,000installs dt-obs-azure Teaches AI assistants to query Azure infrastructure via Dynatrace Smartscape and DQL. Useful for auditing security rules, tracking resources, and checking network topology. CX Codex +1 2,000installs dt-alerting A skill that walks the whole Dynatrace alerting lifecycle: picking an anomaly detector, storing events in Grail, grouping problems and routing notifications. CX Codex +1 1,800installs dt-obs-genai Generates Dynatrace DQL queries to monitor GenAI apps and agents. It helps track token consumption, p95 latencies, tool call errors, and blocked responses. CX Codex +1 1,400installs dt-sec-insights A skill that writes DQL queries against Dynatrace security data: vulnerabilities, runtime attacks, compliance posture and scan coverage. CX Codex +1 1,400installs dt-obs-log-semantic-mapping A skill that maps vendor audit log fields to the Dynatrace semantic dictionary and validates the result. CX Codex +1 1,400installs dt-platform-costs Analyzes actual Dynatrace DPS consumption and spend directly from dt.system.events via DQL. Helps teams track cost drivers and chargeback. CX Codex +1 1,400installs

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