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.
npx agentmods add skills/cukas/patrol/diagnosenpx skills add cukas/patrol --skill diagnosegit clone --depth 1 https://github.com/cukas/patrolWrote 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.
[](https://agentmods.dev/skills/cukas/patrol/diagnose)<a href="https://agentmods.dev/skills/cukas/patrol/diagnose"><img src="https://agentmods.dev/badge/skills/cukas/patrol/diagnose.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00729 |
| Opus 5 | $0.00019 | $0.00365 |
| Sonnet 5 | $0.00008 | $0.00146 |
| Haiku 4.5 | $0.00004 | $0.00073 |
Grade A, and why
diagnose 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Structured Root-Cause Investigation
You are in investigation mode. Do NOT edit any code until you complete the protocol below.
Protocol
Step 1: Understand the symptom
- What exactly is the user reporting?
- What is the expected behavior vs actual behavior?
- Can you reproduce it? Under what conditions?
Step 2: Trace the code path
- Read all files in the call chain from entry point to where the bug manifests
- For each file, note: what it does, what it passes to the next layer, where it could go wrong
- Do NOT skip files — read every file in the path
Step 3: Form a hypothesis
- Based on the code you've read, what is the most likely root cause?
- What evidence supports this hypothesis?
- What would disprove it?
- Rate your confidence: LOW / MEDIUM / HIGH
Step 4: Verify the hypothesis
- If confidence is LOW: read more files, check related tests, grep for similar patterns
- If confidence is MEDIUM: check edge cases and error handling in the suspected area
- If confidence is HIGH: proceed to Step 5
Step 5: Present analysis
Before writing ANY code, present to the user:
- Root cause: One sentence explaining what's broken and why
- Evidence: Which files/lines confirmed this
- Proposed fix: What you'll change and why
- Risk: What else could this fix affect?
Step 6: Implement and verify
- Apply the minimal fix
- Run build and tests
- Confirm the fix addresses the symptom
Example Investigation
Symptom: "The sidebar counter shows 0 items even after adding tasks."
Step 1 — Understand: Expected: counter increments when a task is added. Actual: always shows 0. Reproducible on every add.
Step 2 — Trace: Read TaskList.tsx (renders counter) → useTaskStore.ts (Zustand store) → addTask() action → Sidebar.tsx (subscribes to tasks.length).
Step 3 — Hypothesis: Sidebar.tsx subscribes to store.tasks but addTask() mutates the array in place instead of creating a new reference. Zustand's shallow comparison doesn't detect the change. Confidence: HIGH — the push() call on line 42 of useTaskStore.ts is the smoking gun.
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.
- 6d ago First seen · 67 lines · 39 tokens per session scan A 2367bf3ea849
diagnose is a skill published in the GitHub repository cukas/patrol (3 stars, last pushed 5mo ago), licensed MIT. It adds 39 tokens to every session and 729 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.
Other skills, from other repositories
slopmop
Trigger when you would normally reach for pytest, gh, mypy, black, or other raw repo tooling. Redirect to sm swab, sm scour, sm buff, sm sail, sm refit, or sm doctor so remediation follows the established rails. Also trigger when asked to "install" or "set up" slop-mop in a repo, or when you find a repo with sm…
ai-development-guide
Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.
recipe-diagnose
Investigate problem, verify findings, and derive solutions.
health-check
Runs plugin health checks (venv packages, skill registration, and album slug collisions). Use when the user asks to check plugin health, verify setup, or troubleshoot missing skills.
cloudflare-workers-observability
Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors.
cloudflare-workers-dev-experience
Cloudflare Workers local development with Wrangler, Miniflare, hot reload, debugging. Use for project setup, wrangler.jsonc configuration, or encountering local dev, HMR, binding simulation errors.