logging-for-remote-diagnosis

logging-for-remote-diagnosis is a skill for Claude Code from Fergius-Engineering/instincts. It costs 36 tokens per session (681 once invoked), scanned A, original, MIT.

A software-development practice for adding detailed logs to tools and services that run on machines you cannot directly inspect.

In plain words
What is it for?
Use it when building shipped products, command-line tools, servers, asynchronous work, or other remote processes that need troubleshooting information.
Why use it?
It helps diagnose failures from a user's log dump by showing which paths ran, what was skipped, and why.

Skill for Claude Code

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

Part of the instincts plugin — 20 skills, 2 hooks shipped together

Good fit Use it when building shipped products, command-line tools, servers, asynchronous work, or other remote processes that need troubleshooting information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fergius-engineering/instincts/logging-for-remote-diagnosis
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 Fergius-Engineering/instincts --skill logging-for-remote-diagnosis
Clone the repo
git clone --depth 1 https://github.com/Fergius-Engineering/instincts

Made for: Claude Code.

Or install instincts, the plugin that ships this one along with the rest of its 20 skills, 2 hooks.

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 logging-for-remote-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/fergius-engineering/instincts/logging-for-remote-diagnosis/github.svg)](https://agentmods.dev/skills/fergius-engineering/instincts/logging-for-remote-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/fergius-engineering/instincts/logging-for-remote-diagnosis"><img src="https://agentmods.dev/badge/skills/fergius-engineering/instincts/logging-for-remote-diagnosis/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 logging-for-remote-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/fergius-engineering/instincts/logging-for-remote-diagnosis"><img src="https://agentmods.dev/badge/skills/fergius-engineering/instincts/logging-for-remote-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 681 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.00036 $0.00681
Opus 5 $0.00018 $0.00341
Sonnet 5 $0.00007 $0.00136
Haiku 4.5 $0.00004 $0.00068

Measured 8d ago against content hash 1e2138ad8613, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

logging-for-remote-diagnosis 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 8d 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/logging-for-remote-diagnosis/SKILL.md · 40 lines

How it starts

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

The rule

Add the logs as you build the mechanic, not after. The test to hold yourself to: a user on another machine hits a bug, turns on verbose logging, and sends you one dump. From that dump alone, with no chance to add a log and ask them to try again, can you tell which path ran, what got skipped, and why? If not, the logging isn't done yet.

Fires when

While writing any branch, early return, skip, or async/deferred step in code that runs somewhere you can't attach a debugger. At build time, not at bug time.

How to apply

Log the entry of each path, every branch and skip with the deciding condition, key values and counts, and the chosen outcome. Use a greppable tag prefix (e.g. [Dispatch], [Sync]) so the dump is filterable.

Key values means ids, sizes, counts, and reasons — not payloads. Credentials and tokens never go in a log line, and personal data is payload too: log the user id, not the email. The dump you're designing for gets read on screens you don't control and forwarded around.

For async or deferred work, log at schedule time and at execution time. They're different moments and either can be the bug.

Before calling it done, reread each branch and ask: "from the verbose dump alone, could I tell this branch was taken and why?"

Absence is not proof

A missing log line does not prove the code didn't run. The log level may have been off. If you grep a dump and find zero hits for a tag, "verbose was disabled" is at least as likely as "the branch didn't execute" — say that out loud and rule it out first. When chasing a live bug, either confirm the user's verbose level is actually on, or temporarily log the key decision at a level that always shows.

Worked example

A file-sync tool skips some files and a user reports "it just ignored half my folder." With no instrumentation you're guessing. With it, their dump reads: [Sync] scanning 412 files, [Sync] skip report.tmp reason=matched-ignore-glob, [Sync] skip photo.HEIC reason=unsupported-ext, [Sync] uploaded 198. Now you know the skips were two real rules firing, not a bug, and exactly which rule hit which file. You answered a remote bug report correctly from one dump, without ever touching their machine.

Read the full file on GitHub · 40 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. 8d ago First seen · 40 lines · 36 tokens per session scan A 1e2138ad8613

Subscribe to this mod's changes

logging-for-remote-diagnosis is a skill published in the GitHub repository Fergius-Engineering/instincts (2 stars, last pushed 14d ago), licensed MIT. It adds 36 tokens to every session and 681 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-31.