/localdata-mcp:cluster-analysis <database-name>from localdata-mcp
Discovers natural groupings in data using K-Means and DBSCAN clustering with silhouette evaluation and PCA visualization. Useful for segmenting data or finding patterns.
Ships in localdata-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Find natural groupings in data using multiple clustering approaches, evaluate quality, and interpret results.
Explore features. Call describe_database with the database name from $ARGUMENTS. Identify numeric columns suitable for clustering. Note any categorical columns that could provide context for interpreting clusters later.
Extract and review data. Call execute_query to select the numeric feature columns. Check for nulls and extreme outliers in the sample. Note the number of observations and features.
Run K-Means clustering. Call analyze_clusters with the database name, feature columns, and algorithm set to "kmeans". Start with k=3 unless domain knowledge suggests otherwise. Review the silhouette score and cluster sizes.
Try alternative k values. If the silhouette score is below 0.5, re-run analyze_clusters with k=2, k=4, and k=5. Compare silhouette scores to find the optimal number of clusters.
Run DBSCAN for comparison. Call analyze_clusters with algorithm set to "dbscan". This density-based approach does not require specifying k and can find irregularly shaped clusters. Compare the number of clusters found and the noise point percentage.
Evaluate and compare. Assess both approaches:
Reduce dimensions for visualization. Call reduce_dimensions with the database name and feature columns, using PCA with 2 components. This provides a 2D representation of the clusters for interpretation.
Interpret clusters. For the best clustering result, describe each cluster by its feature averages. Give each cluster a descriptive label based on its defining characteristics. Note which features most differentiate the clusters.
Present results. Provide:
Recommend next steps. Suggest using cluster labels as a feature in /localdata-mcp:regression, running /localdata-mcp:analyze-correlations within each cluster, or applying the clustering to new data for segmentation.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
clustering, k-means, dbscan, pca, data-segmentation, unsupervised-learning
Generated from the plugin's indexed repository (chrisgve/localdata-mcp) — no native marketplace selected
npx claudepluginhub p/chrisgve-localdata-mcp18 skills in this plugin
/ab-testAnalyze an A/B test experiment and provide a clear ship/iterate/no-ship recommendation. Use when evaluating experiment results./analyze-correlationsRun correlation analysis on connected data, identify strong relationships, and suggest regression models. Use when exploring relationships between variables./anomaly-detectionDetect outliers and anomalies in data using isolation forest or local outlier factor. Use when identifying unusual observations or suspicious patterns./data-pipelineRun an end-to-end data analysis pipeline — connect, profile, analyze, and report. Use when performing a complete analysis workflow./data-qualityRun a thorough data quality assessment — completeness, consistency, validity, and uniqueness. Use when you need to understand data fitness before analysis./dimensionality-reductionReduce high-dimensional data to fewer components for visualization or feature engineering using PCA, t-SNE, or UMAP. Use when data has many features and needs simplification.Other plugins' skills for the same job