agentleFS
ChrisGVEChrisGVE/localdata-mcp/skills/modeling/cluster-analysis/SKILL.md

cluster-analysis

Skill4 starsChanged 15 months agoApache-2.0View on GitHub

Discover natural groupings in data using clustering algorithms with evaluation and visualization. Use when segmenting data or finding patterns.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Explore features: Call describe_database with the database name from $ARGUMENTS.

    line 14
  2. Very specific:

    Extract and review data: Call execute_query to select the numeric feature columns.

    line 16
  3. Very specific:

    Run K-Means clustering: Call analyze_clusters with the database name, feature columns, and algorithm set to "kmeans".

    line 18
  4. Very specific:

    Try alternative k values: If the silhouette score is below 0.5, re-run analyze_clusters with k=2, k=4, and k=5.

    line 20
  5. Very specific:

    Run DBSCAN for comparison: Call analyze_clusters with algorithm set to "dbscan".

    line 22
  6. Very specific:

    Reduce dimensions for visualization: Call reduce_dimensions with the database name and feature columns, using PCA with 2 components.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cluster Analysis

Find natural groupings in data using multiple clustering approaches, evaluate quality, and interpret results.

Steps

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Evaluate and compare. Assess both approaches:
    • Silhouette scores (higher is better, above 0.5 is good)
    • Cluster balance (are clusters roughly even or heavily skewed?)
    • Number of noise points in DBSCAN
    • Which method produces more interpretable groupings
  7. 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.
  8. 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.
  9. Present results. Provide:
    • Recommended number of clusters and algorithm
    • Cluster profiles with feature summaries
    • Silhouette score and quality assessment
    • Observations about cluster separation and overlap
  10. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.