dd-logs

dd-logs is a skill for Claude Code from DataDog/pup. It costs 17 tokens per session (1,474 once invoked), scanned A, original, Apache-2.0.

A Datadog log-management skill for searching, processing, archiving, and controlling the cost of application and infrastructure logs.

In plain words
What is it for?
Use it to search logs with text, tags, attributes, ranges, wildcards, and Boolean filters, including errors and slow requests.
Why use it?
It helps you find relevant events quickly and manage how logs are processed and stored without losing track of usage costs.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pup plugin — 12 skills, 2 agents shipped together

Good fit Use it to search logs with text, tags, attributes, ranges, wildcards, and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datadog/pup/dd-logs
About the project

DataDog/pup is a command-line client that gives AI agents access to Datadog's observability platform. It lets agents retrieve and manage information across Datadog products such as metrics, logs, monitors, RUM, and security data, with structured output for automation.

DataDog/pup · 1,001 stars · on GitHub · datadoghq.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add DataDog/pup --skill dd-logs
Clone the repo
git clone --depth 1 https://github.com/DataDog/pup

Made for: Claude Code.

Or install pup, the plugin that ships this one along with the rest of its 12 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dd-logs

README.md
[![agentmods](https://agentmods.dev/badge/skills/datadog/pup/dd-logs.svg)](https://agentmods.dev/skills/datadog/pup/dd-logs)
Your own site
<a href="https://agentmods.dev/skills/datadog/pup/dd-logs"><img src="https://agentmods.dev/badge/skills/datadog/pup/dd-logs.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01474
Opus 5 $0.00009 $0.00737
Sonnet 5 $0.00003 $0.00295
Haiku 4.5 $0.00002 $0.00147

Measured 3d ago against content hash 6f4233001e42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dd-logs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dd-logs/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Datadog Logs

Search, process, and archive logs with cost awareness.

Prerequisites

Datadog Pup (dd-pup/pup) should already be installed:

cargo install --git https://github.com/DataDog/pup

Quick Start

pup auth login

Search Logs

# Basic search
pup logs search --query="status:error" --from="1h"

# With filters
pup logs search --query="service:api status:error" --from="1h" --limit 100

# JSON output is the default
pup logs search --query="@http.status_code:>=500" --from="1h"

Search Syntax

Query Meaning
error Full-text search
status:error Tag equals
@http.status_code:500 Attribute equals
@http.status_code:>=400 Numeric range
service:api AND env:prod Boolean
@message:*timeout* Wildcard

Trace IDs in Log Results

Logs that show a linked trace in the Datadog UI may not include dd.trace_id / dd.span_id in API results. When a trace ID attribute is remapped for trace correlation (via JSON preprocessing or a Trace Remapper processor), the source attribute is removed and the value is stored as an internal attribute that the Logs Search API does not return. The UI's "trace" link reads that internal attribute, so UI and API results differ.

This is expected Datadog Log Management behavior, not a pup bug or an instrumentation problem. Do not retry queries or change instrumentation to "fix" it. Datadog is tracking making these values queryable (support reference FRLOGSS-4306).

Workarounds until then:

  • Emit the trace ID under a separate attribute that is not remapped (e.g. @custom.trace_id) and query that.
  • Pivot the other way: search spans by the log's service/time window via pup traces search, or use the trace link in the Datadog UI.

Pipelines

Process logs before indexing:

# List pipelines
pup obs-pipelines list

# Create pipeline (JSON)
pup obs-pipelines create --file pipeline.json

Common Processors

{
  "name": "API Logs",
  "filter": {"query": "service:api"},
  "processors": [
    {
      "type": "grok-parser",
      "name": "Parse nginx",
      "source": "message",
      "grok": {"match_rules": "%{IPORHOST:client_ip} %{DATA:method} %{DATA:path} %{NUMBER:status}"}
    },
    {
      "type": "status-remapper",
      "name": "Set severity",
      "sources": ["level", "severity"]
    },
    {
      "type": "attribute-remapper",
      "name": "Remap user_id",
      "sources": ["user_id"],
      "target": "usr.id"
    }
  ]
}

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 217 lines · 17 tokens per session scan A 6f4233001e42

Subscribe to this mod's changes

dd-logs is a skill published in the GitHub repository DataDog/pup (1,001 stars, last pushed 3d ago), licensed Apache-2.0. It adds 17 tokens to every session and 1,474 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories