dd-code-generation

Generates Datadog API client code and executes pup CLI commands for observability operations.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill dd-code-generation-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-code-generation
Source: https://github.com/lauhon/pi/tree/main/skills/dd-code-generation
Command: npx skills add https://github.com/lauhon/pi --skill dd-code-generation-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with Datadog requires either memorizing API endpoints and client library syntax or manually running one-off queries. This Skill bridges both needs by executing immediate Datadog operations via the pup CLI and generating ready-to-use integration code in five languages. ## Core Features & Use Cases - Immediate CLI Execution: Run pup commands to query metrics, search logs, list monitors, manage dashboards, SLOs, incidents, and 30+ other Datadog domains with JSON, YAML, or table output. - Multi-Language Code Generation: Produce complete, runnable examples using official Datadog API clients for TypeScript, Python, Java, Go, and Rust, including authentication setup and error handling. - Use Case: A developer needs to alert on error rates. First, they test the query with pup logs search --query="status:error" --from="1h", then ask for a Python script using datadog-api-client to embed the same query in their deployment pipeline. ## Quick Start Ask the assistant to query Datadog metrics for the last hour or generate a Python script that searches error logs using the Datadog API client.

Frequently Asked Questions about dd-code-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Datadog metrics from the command line?

Use the pup CLI with the metrics query command, for example: pup metrics query --query="avg:system.cpu.user{*}" --from="1h" --to="now". Authenticate first with pup auth login for OAuth2 or by setting DD_API_KEY and DD_APP_KEY environment variables.

How do I generate Python code for the Datadog API?

Ask for code in your target language and the Skill produces a complete example using the official datadog-api-client package, including authentication configuration, request body construction, and error handling. Install the client with pip install datadog-api-client and set DD_API_KEY and DD_APP_KEY.

Which programming languages are supported for Datadog API client code generation?

Code generation supports five languages: TypeScript via @datadog/datadog-api-client, Python via datadog-api-client, Java via com.datadoghq:datadog-api-client, Go via datadog-api-client-go, and Rust via datadog-api-client. Each example includes installation instructions.

When should I use pup CLI versus generating Datadog API code?

Use pup CLI for immediate results, one-off queries, exploration, and testing queries before coding. Generate code when integrating Datadog operations into an application, automating recurring tasks, or building custom tooling in a specific language.

What Datadog operations can the pup CLI perform?

The pup CLI covers 28 command groups across 33+ API domains with 200+ subcommands, including metrics, logs, traces, monitors, dashboards, SLOs, synthetics, security monitoring, incidents, on-call, service catalog, and user management. Run pup --help for the full reference.