debug-with-trail

debug-with-trail is a skill for Claude Code from Pratham-Mishra04/trail. It costs 52 tokens per session (9,631 once invoked), scanned D, original, MIT.

A troubleshooting workflow for investigating runtime problems in servers, background workers and test runs using captured standard output and error logs.

In plain words
What is it for?
Use it to diagnose server or worker failures and test errors by checking captured logs, reproducing the problem and cleaning up any added instrumentation.
Why use it?
It provides a repeatable way to inspect what a running process or failed test printed, optionally add focused logging, and remove that temporary logging afterward.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/.../39f6875e-...jsonl).

Part of the trail plugin — 1 skill, 1 MCP server shipped together

Good fit Use it to diagnose server or worker failures and test errors by checking captured logs, reproducing the problem and cleaning up any added instrumentation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Pratham-Mishra04/trail
Claude Code
/plugin install trail

Made for: Claude Code.

Or install trail, the plugin that ships this one along with the rest of its 1 skill, 1 MCP server.

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 debug-with-trail

README.md
[![agentmods](https://agentmods.dev/badge/skills/pratham-mishra04/trail/debug-with-trail/github.svg)](https://agentmods.dev/skills/pratham-mishra04/trail/debug-with-trail)
Your own site
<a href="https://agentmods.dev/skills/pratham-mishra04/trail/debug-with-trail"><img src="https://agentmods.dev/badge/skills/pratham-mishra04/trail/debug-with-trail/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug-with-trail

Your own site · 80×15
<a href="https://agentmods.dev/skills/pratham-mishra04/trail/debug-with-trail"><img src="https://agentmods.dev/badge/skills/pratham-mishra04/trail/debug-with-trail.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,631 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 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.00052 $0.09631
Opus 5.5 $0.00021 $0.03852
Sonnet 5.5 $0.00010 $0.01926
Haiku 4.5 $0.00005 $0.00963

Measured 3mo ago against content hash 13d9f645b80f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

debug-with-trail scanned grade D with 3 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 3mo 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

Before pinging the user for a curl/argv/enqueue command, spend a minute trying to construct it from the code. The user already told you what's failing — that usually points at a route, a handler, or a function whose call

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

> curl -fsSL https://raw.githubusercontent.com/Pratham-Mishra04/trail/main/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Repro command (curl / test invocation / enqueue):
integrations/claude-code/skills/debug-with-trail/SKILL.md · 539 lines

How it starts

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

Debug with trail

Use this workflow when investigating a runtime issue with the help of trail — a local CLI that captures process stdout/stderr into per-session JSONL files and exposes them via the MCP tools list_sessions and get_logs.

The workflow applies to two broad cases:

  1. Long-running processes — servers, daemons, workers, anything that stays up and emits logs continuously. The user reproduces the issue by sending a request / triggering the code path, and you query the captured stream.
  2. Test failures — a test (or a small subset) is failing and you need to figure out why. The "process" trail captures is the test invocation itself (trail run -- go test ./..., trail run -- npm test, trail run -- pytest path/to/test.py). The test runner's stdout/stderr (assertion failures, panics, framework output, plus any print/console.log/fmt.Println from the code under test) lands in a session you can query exactly the same way. Instrumentation goes into either the test file or the production code the test exercises; the marker-based cleanup rules are identical.

Most phases below are written with a server in mind because that's the more common case, but the test-debugging variant is called out wherever the flow differs (mainly around how the session is launched and how iteration works without a long-running daemon).

The workflow has six phases. Steps 1, 2, 4, 5, and 6 are mandatory. Step 3 is conditional — only do it when the existing logs don't already explain the issue. Cleanup (Phase 6) only happens after the fix is verified in Phase 5 — never clean up instrumentation while the user might still want to keep digging or while a fix is unverified.

Supporting files:

  • reference.md — auto-reloader / test-runner watcher tables, framework "ready" indicators, per-language instrumentation syntax. Load when the inline shortlists don't cover the user's stack.
  • examples.md — three end-to-end worked traces (existing-logs diagnosis, closed-loop variant, failing test). Read when you want a concrete picture of phase compression.

Read the full file on GitHub · 539 lines

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. 3mo ago First seen · 539 lines · 52 tokens per session scan D 13d9f645b80f

Subscribe to this mod's changes

debug-with-trail is a skill published in the GitHub repository Pratham-Mishra04/trail (8 stars, last pushed 5mo ago), licensed MIT. It adds 52 tokens to every session and 9,631 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 3 findings (sends data to an external url, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

debug-with-trail compared with skills from other repositories

debug-with-trail next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debug-with-trailPratham-Mishra04/trailSkill85mo agoMITD52Claude Code
Logging and Observability Guards977043/river-reviewSkill8todayMITA23Claude Code
compare-site-configurationsmicrosoft/power-platform-skillsSkill1.2ktodayMITA98Claude Code
memory-recallzilliztech/memsearchSkill3.0ktodayMITA38Claude Code, Codex
release-itwondelai/skillsSkill2.9k3d agoMITA131Claude Code, Codex
tidewave-integrationoliver-kriska/claude-elixir-phoenixSkill5803d agoMITA38Claude Code
debugsd0xdev/sd0x-harnessSkill1968d agoMITA67Claude Code