log-query

log-query is a skill for Claude Code, Codex from shanananana/deepticket. It costs 35 tokens per session (564 once invoked), scanned A, original, MIT.

A read-only log and metrics lookup guide for an ad-agent project. It covers campaign performance logs, budget-change records, time-window comparisons, and tracing errors by identifier.

In plain words
What is it for?
Use it to query campaign metrics, inspect budget changes, compare periods, search errors by trace ID, and connect findings to campaign configuration and allocation code.
Why use it?
It provides a repeatable way to investigate issues such as falling return on investment, unusual spending, or errors without modifying production logs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/generate_campaign_data.py --start 2026-07-24 --end 2026-08-01.

Good fit Use it to query campaign metrics, inspect budget changes, compare periods, search errors by trace ID, and connect findings to campaign configuration and allocation code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/shanananana/deepticket
agentmods
npx agentmods add skills/shanananana/deepticket/log-query

Made for: Claude Code, Codex.

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 log-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/shanananana/deepticket/log-query.svg)](https://agentmods.dev/skills/shanananana/deepticket/log-query)
Your own site
<a href="https://agentmods.dev/skills/shanananana/deepticket/log-query"><img src="https://agentmods.dev/badge/skills/shanananana/deepticket/log-query.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 564 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00035 $0.00564
Opus 5 $0.00017 $0.00282
Sonnet 5 $0.00007 $0.00113
Haiku 4.5 $0.00003 $0.00056

Measured 7d ago against content hash 275df12ae2b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

log-query 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 7d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/query_ad_roi.py, scripts/query_logs.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

deepticket/skills/log-query/SKILL.md · 58 lines

What it actually says

日志查询 Skill

对接只读日志/指标查询。生产环境请替换为你们真实 API。

ad_agent 项目(workspace/project/ad-agent)

data/campaign_metrics.logdata/budget_audit.log 已在本地预生成,分析时直接查询,不要运行 generate

仅当上述 log 文件不存在或为空时,才允许执行:

python scripts/generate_campaign_data.py --start 2026-07-24 --end 2026-08-01

正常分析流程(只读):

cd workspace/project/ad-agent
python scripts/query_campaign_metrics.py --start 2026-07-24 --end 2026-07-27
python scripts/query_campaign_metrics.py --start 2026-07-28 --end 2026-08-01
python scripts/query_campaign_metrics.py --album-id album_bad_001 --start 2026-07-24 --end 2026-08-01
cat data/budget_audit.log

日志文件:

文件 说明
data/campaign_metrics.log 日粒度 ROI/spend(JSONL)
data/budget_audit.log 预算变更审计(2026-07-28 起低 ROI 计划被放大)

输出含 --- key finding --- 时,结合 budget_audit.logconfig/campaigns.yamlbudget_allocator.py 做归因。

本地刷新 log(运维/演示用,不在 Agent 对话里跑):项目根目录 ./scripts/refresh_ad_agent_logs.sh

适用场景

  • 工单附带 logs 字段或指标问题(ROI 下降、消耗异常)
  • 按 traceId / 时间范围查 ERROR
  • 对比故障前后两个时间窗口

生产接入指引

  1. skills/log-query/scripts/ 添加查询脚本(或 MCP)
  2. 填写下方平台 API、索引名、字段规范
  3. Agent 应优先 只读查询,不要删除或修改日志

占位 API(请替换)

  • 平台:<YOUR_LOG_PLATFORM>
  • 查询入口:<YOUR_LOG_QUERY_ENDPOINT>
  • 鉴权:环境变量 LOG_QUERY_TOKEN(勿提交 Git)
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 58 lines · 35 tokens per session scan A 275df12ae2b4

Subscribe to this mod's changes

log-query is a skill published in the GitHub repository shanananana/deepticket (60 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 564 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

Incident Response Planner

Analyze an infrastructure incident alert and produce a structured response plan plus an executable on-call runbook. Use for incident, alert, on-call, and runbook requests.

AgentEra/Agently · 37 tokens

incident-commander

Autonomous incident detection, root-cause analysis, and self-healing for Linux/Docker production environments. Activate when the user mentions: server down, high CPU, memory leak, disk full, service crash, deployment failure, alert firing, on-call page, or any infrastructure emergency. Also activates on scheduled…

Lethe044/hermes-incident-commander · 92 tokens

dsh-k8s-diagnosis

Diagnose live Kubernetes failures (CrashLoopBackOff, OOMKilled, NodeNotReady, ImagePullBackOff, Network/CNI failures, HPA starvation, DNS failures, pending pods) with an evidence-first procedure: capture context, collect signals (events/status/logs), rank falsifiable hypotheses, verify one variable at a time, fix with…

guiyi-labs/kubemd · 130 tokens

design-incident-response

Use when creating or improving an incident response process for a production system or operational team.

jeffreytse/grimoire-core · 21 tokens

kube-medic

Kubernetes Cluster Triage & Diagnostics — instant AI-powered incident triage via kubectl.

cacheforge-ai/cacheforge-skills · 22 tokens

k8s-security-incident

A Kubernetes security-incident response guide. Kubernetes runs and manages containers, and a security incident is an event such as unauthorized access or harmful activity affecting that environment.

kudig-io/kudig-database · 16 tokens