doctor

doctor is a skill for Claude Code from orwa-mahmoud/nightshift. It costs 25 tokens per session (1,919 once invoked), scanned A, original, MIT.

A read-only diagnostic for Nightshift, a workspace process that tracks coding work across current, planned, and unresolved tasks.

In plain words
What is it for?
Use it to investigate unclear recovery, workspace state, process leases, deadlines, watchman activity, and next actions.
Why use it?
It explains what Nightshift detected and what may be wrong without changing or repairing anything.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the nightshift plugin — 13 skills, 5 hooks shipped together

Good fit Use it to investigate unclear recovery, workspace state, process leases, deadlines, watchman activity, and next actions.

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 orwa-mahmoud/nightshift
Claude Code
/plugin install nightshift

Made for: Claude Code.

Or install nightshift, the plugin that ships this one along with the rest of its 13 skills, 5 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 doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/doctor/github.svg)](https://agentmods.dev/skills/orwa-mahmoud/nightshift/doctor)
Your own site
<a href="https://agentmods.dev/skills/orwa-mahmoud/nightshift/doctor"><img src="https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/doctor/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 doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/orwa-mahmoud/nightshift/doctor"><img src="https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,919 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.00025 $0.01919
Opus 5 $0.00013 $0.00959
Sonnet 5 $0.00005 $0.00384
Haiku 4.5 $0.00003 $0.00192

Measured yesterday against content hash 5a5e3537490f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

doctor 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 yesterday.

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.

plugins/nightshift/skills/doctor/SKILL.md · 134 lines

How it starts

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

Diagnose the host-opened project without changing anything. Doctor is deeper than status: it explains what Nightshift resolved and which failures that implies. It does not arm, stop, revive, rewrite, or delete.

The four state files and what each holds are in $NIGHTSHIFT_PLUGIN_ROOT/skills/nightshift/references/shift/state-map.md. Report these as different categories; do not merge or move them.

Resolve the installed plugin root to an absolute $NIGHTSHIFT_PLUGIN_ROOT${CLAUDE_PLUGIN_ROOT} on Claude Code, $PLUGIN_ROOT on Codex when set, otherwise the absolute path this skill was attached from (skills/doctor/SKILL.md). Run every command below through "$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" — native Windows: & "$NIGHTSHIFT_PLUGIN_ROOT\runtime\windows\ns.ps1" in the PowerShell tool, same verbs — which resolves the host and the workspace; ns help lists the verbs, and ns bind prints the six resolved facts (TASK_ROOT, NIGHTSHIFT_WORKSPACE, NS, NIGHTSHIFT_PLUGIN_ROOT, HOST, SOURCE); $NS below is that NS. Never a bare relative path: the working directory persists between calls.

1. Run the inspector

"$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" doctor

Print its report verbatim. Do not summarise away Facts, Warnings, or Actions, and do not re-derive anything it already resolved: the script uses the same workspace, work-mode, work-target, policy and ownership libraries as the hooks, and both implementations print the same lines.

The report answers, in its own words: where the workspace is and whether .nightshift-link is valid; the schema version and whether it is current, legacy, malformed, or newer than this plugin; work mode and work target; the punch-list and staged-work counts; markers, session, process lease and watchman liveness; the deadline and whether it disagrees with the shift policy; an interrupted provisioning transaction; every rules.json knob it needs and the three native question-tool entries; a resolved policy block naming every effective setting with its source (built-in, rules, defaults, one-shift or exact-plan) and expiry (shift, permanent or -); and a preflight fact naming which items need an elevation category the resolved policy does not grant.

Staged work is reported, never offered, while the punch list has open items. Doctor suggests promoting a draft or a parked Hunt order only when no - [ ] remains under ## Items and no shift is armed — the same precedence Start applies. With open work, say what is staged and say plainly that Start works the current list; do not read a count as an invitation to widen the approved scope, and never promote anything from this read-only skill.

The work mode fact is repository or artifact. When $NS/work-mode is missing and Setup would propose artifact, Doctor warns work mode is unset; Setup would propose artifact and offers persist the proposed artifact mode with Setup; Doctor does not write work-mode. When work-mode is unreadable it warns work mode is malformed; treating the site as unusable until Setup rewrites it, and when the target cannot be resolved it warns work target could not be resolved; treating workspace as the code root. When the record is missing the resolver takes the workspace or its single immediate child repository. Skip a symlink or reparse child; it is not a nested checkout.

In artifact mode the report also carries artifact receipts N for files under $NS/receipts/, and latest artifact receipt with the filename only of the most recently written receipt (no directory path). When receipts are enabled it reports completion record per-item receipt and, if ticked items have no model text, warns N ticked items have no receipt text; each item completes through its receipt file. Disabled receipts are a fact only: completion record none; the owner disabled receipts. When the path exists but is not a real directory, it warns artifact receipts path is not a usable directory and offers to replace it so receipts can land; it does not also warn empty ticks for that path. Copies from Archive live under the archive root, $NS/archive/<YYYY-MM-DD>/receipts/ by default and do not replace the live files Doctor counts. Missing or empty receipts create no dated receipts folder.

Read the full file on GitHub · 134 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. yesterday Changed · +2 lines 5a5e3537490f
  2. 3d ago Changed · -23 lines · -30 tokens per session 1280c0164d1d
  3. 4d ago Changed · +40 lines a13fc17858e2
  4. 7d ago Changed dc4af29fa3ad
  5. 11d ago First seen · 115 lines · 55 tokens per session scan A 43c06f2c8979

Subscribe to this mod's changes

doctor is a skill published in the GitHub repository orwa-mahmoud/nightshift (58 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,919 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-08-30.