dd-errors
Skill0 starsChanged 3 months agoMITView on GitHub
Query Datadog logs for recent errors, error rates, or specific exceptions.
- Reads credentials
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- buildSkill
- cleanup-worktreeSkill
- db-querySkill
- db-searchSkill
- devops-wiki-updateSkill
- devops-workitem-createSkill
- devops-workitem-readSkill
- devops-workitem-updateSkill
- finalize-taskSkill
- find-codeSkill
- merge-mainSkill
- panel-review-fixSkill
- panel-reviewSkill
- prSkill
- rebase-mainSkill
- starttaskSkill
- testSkill
- ask-codexSkill
- ask-geminiSkill
- councilSkill
- dailySkill
- find-sessionSkill
- merged-prsSkill
- mm-notifySkill
- optimize-promptSkill
- qSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
If no arguments are provided, default to: API errors in the last 1 hour.
- Distinctive: line 76
If search terms were provided, append them to the query string.
- Distinctive: line 97
If no results: report "No errors found" clearly
- Very specific: line 98
If the response contains a page.after cursor, mention there are more results available
- Very specific: line 102
If DD_API_KEY or DD_APP_KEY are not set, report clearly: "Datadog API keys not configured.
- Distinctive: line 103
If the API returns an error, show the error message
- Distinctive: line 104
If curl fails (network issue), report the connection error
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Query Datadog Errors
Arguments: $ARGUMENTS
Argument parsing
Parse the arguments flexibly. They can appear in any order:
| Argument | Detection | Default |
| Service | Matches a known service alias (see table below) | api |
| Time range | Matches pattern like 1h, 30m, 24h, 7d | 1h |
| Search terms | Anything else — added to the Datadog query as-is | (none) |
Service aliases
| Alias | Datadog service name |
api | Contoso.Payments.API |
web | Contoso.Web.Presentation |
deposit | Contoso.Deposit.API |
Adjust this table to your own service names; the alias is just a short handle for the prompt.
If no arguments are provided, default to: API errors in the last 1 hour.
Examples
/dd-errors→ API errors, last 1h/dd-errors deposit 24h→ Contoso.Deposit.API errors, last 24h/dd-errors api 4h OperationCanceledException→ API errors matching that exception, last 4h/dd-errors 30m NullReferenceException→ API errors (default) with that search term, last 30m/dd-errors deposit 7d GetCustomerAccountInfo→ Contoso.Deposit.API, last 7 days, matching that method
API call
Build and execute a POST request to the Datadog EU Logs Search API.
Endpoint: https://api.datadoghq.eu/api/v2/logs/events/search
Authentication (via environment variables — use printenv not direct expansion):
DD-API-KEY: $(printenv DD_API_KEY)
DD-APPLICATION-KEY: $(printenv DD_APP_KEY)Required flags: -s -k (silent + skip SSL verification for corporate proxy)
Request body:
{
"filter": {
"query": "<build query below>",
"from": "now-<timerange>",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 25}
}Building the query
Always include:
service:<datadog service name>@Properties.EnvironmentName:Production-status:(info OR warn)(excludes info and warn — shows errors only)
If search terms were provided, append them to the query string.
Example query: -status:(info OR warn) @Properties.EnvironmentName:Production service:Contoso.Payments.API OperationCanceledException
Important: use a temp file for the JSON body
To avoid shell escaping issues, write the JSON body to a temp file and use -d @file:
# Write JSON to temp file, then curl with -d @fileOutput formatting
Parse the JSON response and present a clean summary:
- Header: Service name, time range, total matches found
- Error table (for each log entry):
- Timestamp (converted to local-friendly format)
- Status/level
- Message (first 120 chars, trimmed)
- Host (if available)
- If no results: report "No errors found" clearly
- If the response contains a
page.aftercursor, mention there are more results available
Error handling
- If
DD_API_KEYorDD_APP_KEYare not set, report clearly: "Datadog API keys not configured. Set DD_API_KEY and DD_APP_KEY environment variables." - If the API returns an error, show the error message
- If curl fails (network issue), report the connection error
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

