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.
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a claude-codeWhat 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 functionbefore 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-code2Manually: put the files in place
~/.claude/skills/dt-js-runtime/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dt-js-runtime/
1Skills CLI (Vercel)
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a codex2Manually: put the files in place
.agents/skills/dt-js-runtime/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a cursor2Manually: put the files in place
.cursor/skills/dt-js-runtime/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Dynatrace/dynatrace-for-ai dt-js-runtime2Manually: put the files in place
.github/skills/dt-js-runtime/SKILL.md1Skills CLI (Vercel)
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -a gemini-cli2Platform CLI
gemini skills install https://github.com/Dynatrace/dynatrace-for-ai --path skills/dt-js-runtimeManually: put the files in place
.devin/skills/dt-js-runtime/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Dynatrace/dynatrace-for-ai --skill dt-js-runtime -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 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