diagnose

diagnose is a skill for Claude Code, Codex from codybrom/clairvoyance. It costs 57 tokens per session (822 once invoked), scanned A, original, MIT.

A decision process that routes a vague code complaint to a more specific design review. It uses symptoms such as changes spreading across files or interfaces feeling awkward to identify the likely problem.

In plain words
What is it for?
Use it to choose a suitable review for problems such as scattered knowledge, outdated abstractions, poor module boundaries, or interfaces with too many parameters.
Why use it?
It helps when you know that code feels wrong but do not know which type of review applies. The process narrows the investigation based on the symptom.

Skill for Claude CodeCodex

Part of the clairvoyance plugin — 16 skills, 1 agent shipped together

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.

agentmods
npx agentmods add skills/codybrom/clairvoyance/diagnose
Any agent
npx skills add codybrom/clairvoyance --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/codybrom/clairvoyance

Made for: Claude Code, Codex.

Or install clairvoyance, the plugin that ships this one along with the rest of its 16 skills, 1 agent.

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 diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/codybrom/clairvoyance/diagnose.svg)](https://agentmods.dev/skills/codybrom/clairvoyance/diagnose)
Your own site
<a href="https://agentmods.dev/skills/codybrom/clairvoyance/diagnose"><img src="https://agentmods.dev/badge/skills/codybrom/clairvoyance/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 822 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00057 $0.00822
Opus 5 $0.00028 $0.00411
Sonnet 5 $0.00011 $0.00164
Haiku 4.5 $0.00006 $0.00082

Measured 5d ago against content hash e4d3523e98c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

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 5d 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/diagnose/SKILL.md · 81 lines

How it starts

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

Diagnose

When invoked with $ARGUMENTS, match the described symptom against the decision tree below and route to the appropriate skill. If code paths are referenced, read them first to confirm the match before routing. This skill routes to other skills from Clairvoyance (https://clairvoyance.fyi). It works best when the full collection is installed.

Decision Tree

1. "Something feels wrong but I can't say what"

The symptom is a general sense of unease with no concrete complaint.

complexity-recognition: Apply the three-symptom framework to locate the source.

2. "Simple changes require edits in many files"

Change amplification. Branch by cause:

  • Shared knowledge is scattered across modules → information-hiding (look for leaked implementation details)
  • Old abstractions no longer fit the current shape of the system → code-evolution (check whether the design has kept pace with requirements)
  • Module boundaries cut across concerns instead of encapsulating them → module-boundaries (re-evaluate decomposition)

3. "This interface is awkward / too many parameters"

The interface exposes too much or forces callers to assemble details they shouldn't need.

  • Implementation burden leaks upward → pull-complexity-down (push details below the interface)
  • The abstraction mixes general infrastructure with special-case logic → general-vs-special (separate the two)
  • The module is shallow. Interface cost rivals implementation cost → deep-modules (deepen the module)

4. "I can't name this thing"

Naming difficulty signals a design problem, not a vocabulary problem.

naming-obviousness: If the name can't be made obvious, the entity's responsibility is likely unclear. → Then design-it-twice: Consider alternative decompositions that yield nameable pieces.

5. "Errors everywhere / too many exceptions"

Exception surfaces are large, catch blocks are boilerplate or error paths obscure the normal path.

error-design: Apply define-errors-out and exception aggregation.

Read the full file on GitHub · 81 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. 5d ago First seen · 81 lines · 57 tokens per session scan A e4d3523e98c5

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository codybrom/clairvoyance (12 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 822 once invoked, about $0.0003 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

agent-architecture-planner

Use when designing an autonomous agent, planning agent architecture, building a scheduled automation, or creating a Claude Code agent workflow. Triggers: 'design an agent', 'build an automation', 'agent architecture', 'automate this workflow', 'create a scheduled agent', 'shell script agent'.

majiayu000/claude-skill-registry · 64 tokens

remotion-upgrade

Upgrade Remotion, and related packages.

guanyang/open-agent-hub · 12 tokens

agent-curator

Deep curation of a single agent definition through structured human conversation. Coordinates knowledge research, persona refinement, tooling optimization, and instruction quality improvement. One agent at a time, with due care.

majiayu000/claude-skill-registry · 39 tokens

remotion-docs

Search and fetch Remotion documentation pages.

guanyang/open-agent-hub · 12 tokens

agent-builder

Build custom AI agents in Claude Code from a user's problem statement. This skill analyzes the user's use case, asks smart clarifying questions, researches the internet for similar agents (GitHub repos, blogs, Claude Code community patterns), and then architects and builds production-ready Claude Code agents …

majiayu000/claude-skill-registry · 199 tokens

agent-creator

Creates specialized AI agents with optimized system prompts using the official 4-phase SOP methodology from Desktop .claude-flow, combined with evidence-based prompting techniques and Claude Agent SDK implementation. Use this skill when creating production-ready agents for specific domains, workflows, or tasks…

majiayu000/claude-skill-registry · 66 tokens