Get the FREE Ultimate OpenClaw Setup Guide →

diagnose

npx machina-cli add skill codybrom/clairvoyance/diagnose --openclaw
Files (1)
SKILL.md
3.9 KB

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.

6. "Layers feel redundant / wrappers add nothing"

Pass-through methods, thin adapter classes or layers that exist only for "architecture."

abstraction-quality: Evaluate whether each layer provides a meaningful abstraction or just adds indirection.

7. "Comments are useless / missing / stale"

Comments restate code, are absent where needed or have drifted from the implementation.

comments-docs: Apply the four-category framework and contamination checks.

8. "Code was written under pressure"

Technical debt from tactical shortcuts. The concern is process, not a specific structural flaw.

strategic-mindset: Assess the tactical-vs-strategic balance. → Then code-evolution: Plan incremental improvement alongside current work.

Multiple Symptoms

When the description maps to more than one root symptom, prioritize in this order:

  1. Structural (symptoms 1–6): These address the shape of the code and have the highest design leverage.
  2. Process (symptom 8): This addresses how work is done. Important but downstream of structure.
  3. Surface (symptom 7): Comment/doc issues are often symptoms of deeper structural problems. Fixing structure first may resolve them.

Route to the highest-priority match first. Mention the secondary matches so the user can follow up.

Fallback

If the described symptom does not match any branch above, fall back to red-flags: a systematic scan will surface concrete signals to diagnose from.

Source

git clone https://github.com/codybrom/clairvoyance/blob/main/skills/diagnose/SKILL.mdView on GitHub

Overview

Diagnose routes a vague symptom to the most relevant Clairvoyance skill using a decision tree. It helps when someone describes a problem but doesn't know which skill to reach for, making routing precise. It's not for running a comprehensive review or a simple checklist scan.

How This Skill Works

When invoked with ARGUMENTS, Diagnose compares the described symptom against the decision tree and routes to the best matching Clairvoyance skill. If code paths are referenced, read them first to confirm the match before routing. The skill routes to other Clairvoyance skills and falls back to red-flags when nothing fits.

When to Use It

  • User describes a problem but can't name a specific skill
  • You need to map vague symptoms to the correct Clairvoyance skill quickly
  • Multiple potential root symptoms exist and you want priority routing
  • You want to avoid running a full design review or a checklist scan
  • Uncertain symptom descriptions that require decision-tree routing

Quick Start

  1. Step 1: Provide the symptom description as ARGUMENTS
  2. Step 2: Run diagnose to see the best-matching Clairvoyance skill
  3. Step 3: Follow the routed skill to address the issue

Best Practices

  • Present the symptom description clearly and completely in ARGUMENTS
  • Review central branches first to capture structural issues
  • Confirm the resolved skill path before routing to that skill
  • Avoid using diagnose for comprehensive reviews or checklists
  • Document any secondary matches for follow-up with the user

Example Use Cases

  • User says something feels wrong but I cant name it; diagnose routes to complexity-recognition for a three-symptom framework
  • User describes interface bloat like too many parameters; diagnose suggests information-hiding or deep-modules paths
  • User complains that changes require edits in many files; diagnose routes to code-evolution or module-boundaries
  • User cant name the design problem; diagnose routes to naming-obviousness and design-it-twice
  • Symptoms show widespread errors; diagnose points to error-design and then strategic-mindset

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers