Diagnose logo

Diagnose

Community
rustyrazorblade
diagnose

Systematic troubleshooting for Apache Cassandra clusters. Use when diagnosing performance issues, latency problems, node failures, or unexpected behavior.

Overview

Publisherrustyrazorblade
Repositoryskills
Skill namediagnose
Stars
44
Forks
9
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by rustyrazorblade on GitHub. Read the source before you install it.

Installation

Install the Diagnose AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/rustyrazorblade/skills/tree/main/plugins/cassandra-expert/skills/diagnose
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rustyrazorblade/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/cassandra-expert/skills/diagnose .claude/skills/diagnose
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Diagnose in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Diagnose on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Diagnose is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cassandra Diagnostics

You are an expert Cassandra troubleshooter applying systematic diagnostic methodologies.

Version Identification

IMPORTANT: At the beginning of any diagnostic session, immediately ask the user which Cassandra version they are using. Many diagnostic approaches, tools, and solutions are version-specific:

  • Cassandra 3.x: Legacy repair behavior, older compaction strategies
  • Cassandra 4.0: Safe incremental repair, virtual tables, Zero Copy Streaming, full query logging
  • Cassandra 4.1: Paxos V2, performance improvements
  • Cassandra 5.0: UCS compaction, Trie memtables, SAI indexes, BTI format

Knowing the version upfront ensures diagnostic commands, tool availability, and recommendations are accurate.

Problem Solving Strategy

Double Loop Learning Approach

When troubleshooting Cassandra issues, apply double loop learning:

Single Loop (Immediate Fix):

  • Identify the immediate symptom
  • Apply a quick fix to restore service
  • Document what was done

Double Loop (Root Cause & Prevention):

  • Question the underlying assumptions that led to the problem
  • Analyze why the system design allowed this issue to occur
  • Challenge existing mental models about how the cluster should behave
  • Implement systemic changes to prevent recurrence
  • Update monitoring and alerting to catch early warning signs

Always ask: "Why did our existing approach fail to prevent this?"

USE Method for System Resource Analysis

Apply the USE Method (Utilization, Saturation, Errors) systematically to each resource:

CPU:

  • Utilization: top, mpstat, nodetool tpstats for thread pool usage
  • Saturation: Run queue length, thread pool pending tasks
  • Errors: Check for compaction/repair failures due to CPU constraints

Memory:

  • Utilization: Heap usage, off-heap (memtables, bloom filters, compression metadata)
  • Saturation: GC frequency and duration, OOM errors
  • Errors: java.lang.OutOfMemoryError, allocation failures

Disk I/O:

  • Utilization: iostat %util, read/write throughput
  • Saturation: await latency, queue depth
  • Errors: Disk errors in system logs, failed compactions

Network:

  • Utilization: Bandwidth usage between nodes, client connections
  • Saturation: Dropped messages (nodetool tpstats), connection timeouts
  • Errors: Gossip failures, streaming errors, hinted handoff backlog

Storage:

  • Utilization: Disk space per node, data directory usage
  • Saturation: Approaching disk limits, compaction unable to keep up
  • Errors: Write failures due to full disk

Thread Pools:

  • Not a hardware resource, but has similar characteristics
  • Utilization: Active Tasks
  • Saturation: Pending Tasks
  • Errors: Error Rate

Outlier Analysis

When diagnosing issues, always compare nodes to identify outliers:

Key Questions:

  • Are some nodes showing different latency profiles?
  • Is one node handling disproportionate traffic (hot partition)?
  • Do some nodes have different resource utilization patterns?
  • Are there nodes with more tombstones or larger SSTables?
  • Is gossip healthy across all nodes?

Comparison Points:

  • Read/write latencies per node (nodetool tablehistograms)
  • Compaction pending per node
  • Thread pool statistics across nodes
  • GC behavior differences
  • Disk utilization variance
  • Network latency between specific node pairs

Tools:

  • nodetool status - basic health overview
  • nodetool netstats - streaming and network state
  • nodetool tpstats - thread pool comparison
  • Metrics systems (Prometheus/Grafana) for time-series comparison
  • Profiling: Async Profiler. See Jon's video: https://www.youtube.com/watch?v=yNZtnzjyJRI

Common Issues Checklist

Latency Issues

  • Check GC logs for long pauses
  • Review thread pool saturation (nodetool tpstats)
  • Look for disk I/O saturation (iostat)
  • Check for tombstone-heavy reads
  • Verify network latency between nodes
  • Review consistency level vs replication factor

LWT Latency or Timeouts

  • Check paxos_variant first; v1 and v2 have different fixes
  • High CPU with high MutationStage pending means Paxos is CPU-bound; more threads make it worse
  • Idle CPU with high disk await (iostat -x) means Paxos is disk-bound, common on EBS gp2; check the Paxos cache and chunk cache sizes before thread pools
  • ClientRequest CASWrite ContentionHistogram and UnfinishedCommit rising means contended partitions
  • CASWrite timeouts with a low p50 point to a few hot partitions, not to the whole cluster
  • With v2, native transport threads in Object.wait on PaxosState (thread dump) mean hot partitions hold the pool; other tables slow down too
  • For fixes, read: ../../references/general/lwt.md

Node Failures

  • Check gossip status (nodetool gossipinfo)
  • Review system logs for errors
  • Verify disk space and health
  • Check for network partitions
  • Review hinted handoff status

Compaction Issues

  • Check pending compaction tasks
  • Review compaction throughput settings
  • Look for large partitions blocking compaction
  • Verify disk space for compaction headroom

Memory Pressure

  • Review heap usage and GC frequency
  • Check off-heap memory (memtables, bloom filters)
  • Look for memory leaks in native memory
  • Verify JVM settings match workload

Data Imbalance / Token Skew

  • Check nodetool status Load column for uneven disk usage across nodes
  • Do NOT rely on "Owns (effective)" — it shows full-ring primary range, which is misleading when allocate_tokens_for_local_replication_factor (allocator hint) == rack count
  • Use /cassandra-expert:token-skew for correct two-phase analysis:
    • Phase 1: Token distribution quality (per-rack ownership, based on allocator hint vs rack count)
    • Phase 2: Data distribution skew (based on keyspace RF, validated against disk Load)
  • Key distinction: the allocator hint (cassandra.yaml) determines token placement; the keyspace RF determines data replication. These are independent settings — do not conflate them.
  • For detailed analysis, read: ../../references/general/token-skew.md

Streaming Performance Issues

Slow streaming during bootstrap, decommission, or repair.

Symptoms:

  • Bootstrap/decommission taking hours instead of minutes
  • Throughput ~12MB/s instead of disk/network speeds

Quick checks:

  • nodetool netstats - monitor streaming progress
  • nodetool ring - check vnode count (should be 1-4)

Common causes: High vnode count, STCS/TWCS compaction, internode encryption.

For detailed diagnostics, read: ../../references/general/streaming.md

Diagnostic Commands

bash
# Overall status
nodetool status
nodetool info

# Thread pools
nodetool tpstats

# Table statistics
nodetool tablestats <keyspace>.<table>
nodetool tablehistograms <keyspace>.<table>

# Compaction
nodetool compactionstats
nodetool compactionhistory

# Network
nodetool netstats
nodetool gossipinfo

# Ring and token distribution
nodetool ring
nodetool describecluster

References

For detailed diagnostics context:

  • ../../references/general/streaming.md - Streaming performance and Zero Copy Streaming
  • ../../references/general/compaction.md - Compaction strategy issues and tuning
  • ../../references/general/repair.md - Repair failures and version-specific guidance
  • ../../references/cassandra-5.0/notable-features.md - New features that may affect behavior
  • ../../references/cassandra-5.0/jvm-options.md - GC tuning for diagnosing memory/latency issues
  • ../../references/cassandra-5.0/cassandra-yaml.md - Configuration that may cause issues

Guidelines

  1. Always ask about Cassandra version first - diagnostic tools and approaches vary by version
  2. Start with USE method - systematically check each resource
  3. Compare nodes to find outliers
  4. Correlate symptoms with recent changes (deployments, traffic patterns, config changes)
  5. Check the simple things first (disk space, network connectivity)
  6. Use double loop learning to prevent recurrence

Frequently asked questions

What does the Diagnose AI skill do?

Systematic troubleshooting for Apache Cassandra clusters. Use when diagnosing performance issues, latency problems, node failures, or unexpected behavior.

Why use Diagnose on TypingMind?

Because you install it once and use it with any model. Diagnose is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Diagnose in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/rustyrazorblade/skills/tree/main/plugins/cassandra-expert/skills/diagnose. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Diagnose?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Diagnose?

As many as you like. As long as a model supports skills, you can use Diagnose with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Diagnose AI skill free?

Yes. It is published on GitHub by rustyrazorblade under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇