agentleFS
ChrisGVEChrisGVE/localdata-mcp/skills/modeling/anomaly-detection/SKILL.md

anomaly-detection

Skill4 starsChanged 15 months agoApache-2.0View on GitHub

Detect outliers and anomalies in data using isolation forest or local outlier factor. Use when identifying unusual observations or suspicious patterns.

5 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. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    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 inspect data: Call execute_query to select the feature columns.

    line 16
  3. Very specific:

    Run anomaly detection: Call detect_anomalies with the database name, feature columns, and selected algorithm.

    line 22
  4. Very specific:

    Inspect the anomalies: Call execute_query to retrieve the flagged anomalous rows.

    line 24
  5. Very specific:

    Visualize in reduced dimensions: Call reduce_dimensions with PCA (2 components) on the same features.

    line 26
  6. Distinctive:

    Assess sensitivity: If the contamination rate strongly affects results, note this.

    line 28

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Anomaly Detection

Identify unusual observations in the data using appropriate outlier detection algorithms.

Steps

  1. Explore features. Call describe_database with the database name from $ARGUMENTS. Identify numeric columns suitable for anomaly detection. Call get_data_quality_report to check for missing values and understand baseline distributions.
  2. Extract and inspect data. Call execute_query to select the feature columns. Check the number of rows and features. Note the expected contamination rate if the user has a prior estimate; otherwise default to 5%.
  3. Select the algorithm. Choose based on data characteristics:
    • Isolation Forest: good general-purpose detector, works well up to ~50 features, fast on large datasets
    • Local Outlier Factor: better when anomalies are defined by local density differences (normal behavior varies across data regions)
  4. Run anomaly detection. Call detect_anomalies with the database name, feature columns, and selected algorithm. Review the results: number of anomalies flagged, anomaly scores distribution, and the score threshold used.
  5. Inspect the anomalies. Call execute_query to retrieve the flagged anomalous rows. Examine what makes them unusual: which feature values are extreme? Are there common patterns among the anomalies?
  6. Visualize in reduced dimensions. Call reduce_dimensions with PCA (2 components) on the same features. Map anomaly labels onto the 2D representation to see whether anomalies cluster together or are scattered.
  7. Assess sensitivity. If the contamination rate strongly affects results, note this. Report how the number of flagged anomalies changes with different thresholds.
  8. Present results. Provide:
    • Algorithm used and rationale
    • Number of anomalies detected (count and percentage)
    • Characterization of anomalies: common traits, most extreme cases
    • Anomaly score distribution for context
    • Recommendations: investigate flagged records, adjust detection parameters, or monitor for recurring anomaly patterns

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.