Official agent skill

Azure AI Anomalydetector Java

by microsoft in microsoft/skills

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java.

OfficialMITAuto-check passedData & Analytics

Install Azure AI Anomalydetector Java

skills CLI
$ npx skills add microsoft/skills --skill azure-ai-anomalydetector-java -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/skills azure-ai-anomalydetector-java --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-java/skills/azure-ai-anomalydetector-java .claude/skills/azure-ai-anomalydetector-java && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
azure-ai-anomalydetector-java
GitHub stars
3.1k
Used in
6 other repos
Token cost
~2.3k tokens
SKILL.md length
188 words
Files
2 (incl. references)
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java.

  • Works in 5 steps: Minimum Data Points: Univariate requires… → Granularity Alignment: Match… → Sensitivity Tuning: Higher values (0-99)… → …
  • Implementing univariate/multivariate anomaly detection
  • SKILL.md covers Installation, Client Creation, Key Concepts and Core Patterns, plus 4 more sections
  • Reaches storage.blob.core.windows.net and learn.microsoft.com; needs AZURE_ANOMALY_DETECTOR_API_KEY and AZURE_TOKEN_CREDENTIALS

What it does

Azure AI Anomalydetector Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/examples.md`).

It sits in Data & Analytics, covering Anomaly detection and Forecasting and time series. It works with Microsoft Azure and Java. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.

When your agent uses it

  • Implementing univariate/multivariate anomaly detection
  • Time-series analysis
  • AI-powered monitoring

Example prompts

  • “/azure-ai-anomalydetector-java”

Requirements

  • A credential in AZURE_ANOMALY_DETECTOR_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Minimum Data Points: Univariate requires at least 12 points; more data improves accuracy
  2. Granularity Alignment: Match TimeGranularity to your actual data frequency
  3. Sensitivity Tuning: Higher values (0-99) detect more anomalies
  4. Multivariate Training: Use 200-1000 sliding window based on pattern complexity
  5. Error Handling: Always handle HttpResponseException for API errors

What it can do on your machine

Read from SKILL.md and the folder at commit 354361d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java, xml and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • storage.blob.core.windows.net
    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_ANOMALY_DETECTOR_API_KEY
    • AZURE_TOKEN_CREDENTIALS

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure AI Anomalydetector Java loads about 2.3k tokens when it runs, and up to ~8.4k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 188 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/skills at commit 354361d, republished under its MIT licence (© microsoft). 188 words, ~2,262 tokens.

Download SKILL.mdSave it as .claude/skills/azure-ai-anomalydetector-java/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
azure-ai-anomalydetector-java
description
Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
com.azure:azure-ai-anomalydetector

Azure AI Anomaly Detector SDK for Java

Build anomaly detection applications using the Azure AI Anomaly Detector SDK for Java.

Installation

xml
<dependency>
  <groupId>com.azure</groupId>
  <artifactId>azure-ai-anomalydetector</artifactId>
  <version>3.0.0-beta.6</version>
</dependency>

Client Creation

Sync and Async Clients
java
import com.azure.ai.anomalydetector.AnomalyDetectorClientBuilder;
import com.azure.ai.anomalydetector.MultivariateClient;
import com.azure.ai.anomalydetector.UnivariateClient;
import com.azure.core.credential.AzureKeyCredential;

String endpoint = System.getenv("AZURE_ANOMALY_DETECTOR_ENDPOINT");
String key = System.getenv("AZURE_ANOMALY_DETECTOR_API_KEY");

// Multivariate client for multiple correlated signals
MultivariateClient multivariateClient = new AnomalyDetectorClientBuilder()
    .credential(new AzureKeyCredential(key))
    .endpoint(endpoint)
    .buildMultivariateClient();

// Univariate client for single variable analysis
UnivariateClient univariateClient = new AnomalyDetectorClientBuilder()
    .credential(new AzureKeyCredential(key))
    .endpoint(endpoint)
    .buildUnivariateClient();
With DefaultAzureCredential
java
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;

TokenCredential credential = new DefaultAzureCredentialBuilder()
    .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
    .build();
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes
// TokenCredential credential = new ManagedIdentityCredentialBuilder().build();

MultivariateClient client = new AnomalyDetectorClientBuilder()
    .credential(credential)
    .endpoint(endpoint)
    .buildMultivariateClient();

Key Concepts

Univariate Anomaly Detection
  • Batch Detection: Analyze entire time series at once
  • Streaming Detection: Real-time detection on latest data point
  • Change Point Detection: Detect trend changes in time series
Multivariate Anomaly Detection
  • Detect anomalies across 300+ correlated signals
  • Uses Graph Attention Network for inter-correlations
  • Three-step process: Train → Inference → Results

Core Patterns

Univariate Batch Detection
java
import com.azure.ai.anomalydetector.models.*;
import java.time.OffsetDateTime;
import java.util.List;

List<TimeSeriesPoint> series = List.of(
    new TimeSeriesPoint(OffsetDateTime.parse("2023-01-01T00:00:00Z"), 1.0),
    new TimeSeriesPoint(OffsetDateTime.parse("2023-01-02T00:00:00Z"), 2.5),
    // ... more data points (minimum 12 points required)
);

UnivariateDetectionOptions options = new UnivariateDetectionOptions(series)
    .setGranularity(TimeGranularity.DAILY)
    .setSensitivity(95);

UnivariateEntireDetectionResult result = univariateClient.detectUnivariateEntireSeries(options);

// Check for anomalies
for (int i = 0; i < result.getIsAnomaly().size(); i++) {
    if (result.getIsAnomaly().get(i)) {
        System.out.printf("Anomaly detected at index %d with value %.2f%n",
            i, series.get(i).getValue());
    }
}
Univariate Last Point Detection (Streaming)
java
UnivariateLastDetectionResult lastResult = univariateClient.detectUnivariateLastPoint(options);

if (lastResult.isAnomaly()) {
    System.out.println("Latest point is an anomaly!");
    System.out.printf("Expected: %.2f, Upper: %.2f, Lower: %.2f%n",
        lastResult.getExpectedValue(),
        lastResult.getUpperMargin(),
        lastResult.getLowerMargin());
}
Change Point Detection
java
UnivariateChangePointDetectionOptions changeOptions = 
    new UnivariateChangePointDetectionOptions(series, TimeGranularity.DAILY);

UnivariateChangePointDetectionResult changeResult = 
    univariateClient.detectUnivariateChangePoint(changeOptions);

for (int i = 0; i < changeResult.getIsChangePoint().size(); i++) {
    if (changeResult.getIsChangePoint().get(i)) {
        System.out.printf("Change point at index %d with confidence %.2f%n",
            i, changeResult.getConfidenceScores().get(i));
    }
}
Multivariate Model Training
java
import com.azure.ai.anomalydetector.models.*;
import com.azure.core.util.polling.SyncPoller;

// Prepare training request with blob storage data
ModelInfo modelInfo = new ModelInfo()
    .setDataSource("https://storage.blob.core.windows.net/container/data.zip?sasToken")
    .setStartTime(OffsetDateTime.parse("2023-01-01T00:00:00Z"))
    .setEndTime(OffsetDateTime.parse("2023-06-01T00:00:00Z"))
    .setSlidingWindow(200)
    .setDisplayName("MyMultivariateModel");

// Train model (long-running operation)
AnomalyDetectionModel trainedModel = multivariateClient.trainMultivariateModel(modelInfo);

String modelId = trainedModel.getModelId();
System.out.println("Model ID: " + modelId);

// Check training status
AnomalyDetectionModel model = multivariateClient.getMultivariateModel(modelId);
System.out.println("Status: " + model.getModelInfo().getStatus());
Multivariate Batch Inference
java
MultivariateBatchDetectionOptions detectionOptions = new MultivariateBatchDetectionOptions()
    .setDataSource("https://storage.blob.core.windows.net/container/inference-data.zip?sasToken")
    .setStartTime(OffsetDateTime.parse("2023-07-01T00:00:00Z"))
    .setEndTime(OffsetDateTime.parse("2023-07-31T00:00:00Z"))
    .setTopContributorCount(10);

MultivariateDetectionResult detectionResult = 
    multivariateClient.detectMultivariateBatchAnomaly(modelId, detectionOptions);

String resultId = detectionResult.getResultId();

// Poll for results
MultivariateDetectionResult result = multivariateClient.getBatchDetectionResult(resultId);
for (AnomalyState state : result.getResults()) {
    if (state.getValue().isAnomaly()) {
        System.out.printf("Anomaly at %s, severity: %.2f%n",
            state.getTimestamp(),
            state.getValue().getSeverity());
    }
}
Multivariate Last Point Detection
java
MultivariateLastDetectionOptions lastOptions = new MultivariateLastDetectionOptions()
    .setVariables(List.of(
        new VariableValues("variable1", List.of("timestamp1"), List.of(1.0f)),
        new VariableValues("variable2", List.of("timestamp1"), List.of(2.5f))
    ))
    .setTopContributorCount(5);

MultivariateLastDetectionResult lastResult = 
    multivariateClient.detectMultivariateLastAnomaly(modelId, lastOptions);

if (lastResult.getValue().isAnomaly()) {
    System.out.println("Anomaly detected!");
    // Check contributing variables
    for (AnomalyContributor contributor : lastResult.getValue().getInterpretation()) {
        System.out.printf("Variable: %s, Contribution: %.2f%n",
            contributor.getVariable(),
            contributor.getContributionScore());
    }
}
Model Management
java
// List all models
PagedIterable<AnomalyDetectionModel> models = multivariateClient.listMultivariateModels();
for (AnomalyDetectionModel m : models) {
    System.out.printf("Model: %s, Status: %s%n",
        m.getModelId(),
        m.getModelInfo().getStatus());
}

// Delete a model
multivariateClient.deleteMultivariateModel(modelId);

Error Handling

java
import com.azure.core.exception.HttpResponseException;

try {
    univariateClient.detectUnivariateEntireSeries(options);
} catch (HttpResponseException e) {
    System.out.println("Status code: " + e.getResponse().getStatusCode());
    System.out.println("Error: " + e.getMessage());
}

Environment Variables

bash
AZURE_ANOMALY_DETECTOR_ENDPOINT=https://<resource>.cognitiveservices.azure.com/ # Required for all auth methods
AZURE_ANOMALY_DETECTOR_API_KEY=<your-api-key> # Only required for AzureKeyCredential auth
AZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production

Best Practices

  1. Minimum Data Points: Univariate requires at least 12 points; more data improves accuracy
  2. Granularity Alignment: Match TimeGranularity to your actual data frequency
  3. Sensitivity Tuning: Higher values (0-99) detect more anomalies
  4. Multivariate Training: Use 200-1000 sliding window based on pattern complexity
  5. Error Handling: Always handle HttpResponseException for API errors

Trigger Phrases

  • "anomaly detection Java"
  • "detect anomalies time series"
  • "multivariate anomaly Java"
  • "univariate anomaly detection"
  • "streaming anomaly detection"
  • "change point detection"
  • "Azure AI Anomaly Detector"

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/plugins/azure-sdk-java/skills/azure-ai-anomalydetector-java of microsoft/skills.

  • SKILL.md
  • references/examples.md

Open the folder on GitHubat commit 354361d

Used in 6 other repositories

We found 16 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in microsoft/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Azure AI Anomalydetector Java next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Azure AI Anomalydetector Java compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure AI Anomalydetector Java this skillmicrosoft/skills3.1k6 repos~2.3kAutomated safety check: PassMIT
Kqlmicrosoft/fabric-rti-mcp131—~6.2kAutomated safety check: PassMIT
Analyzing Cloud Storage Access Patternsmukul975/Anthropic-Cybersecurity-Skills34k—~599Automated safety check: PassApache-2.0
Azure Kustomicrosoft/GitHub-Copilot-for-Azure2551 repos~2.2kAutomated safety check: PassMIT
Apex Azure Kustojonathan-vella/apex217—~984Automated safety check: PassMIT
Dt Obs HostsDynatrace/dynatrace-for-ai161—~5.5kAutomated safety check: PassApache-2.0

Similar skills

  • Kql

    microsoft/fabric-rti-mcp

    Official

    KQL language expertise for writing correct, efficient Kusto queries using the Fabric RTI MCP tools.

    131 GitHub stars~6.2k tokensUpdated 6 days ago
    Data & AnalyticsAuto-check passed
  • Analyzing Cloud Storage Access Patterns

    mukul975/Anthropic-Cybersecurity-Skills

    Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and…

    34k GitHub stars~599 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Azure Kusto

    microsoft/GitHub-Copilot-for-Azure

    Official

    Query and analyze data in Azure Data Explorer (Kusto/ADX) using KQL for log analytics, telemetry, and time series analysis.

    255 GitHub starsUsed in 1 repo~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Apex Azure Kusto

    jonathan-vella/apex

    ANALYSIS SKILL — Query and analyze data in Azure Data Explorer (Kusto/ADX) using KQL.

    217 GitHub stars~984 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Dt Obs Hosts

    Dynatrace/dynatrace-for-ai

    Host and process metrics including CPU, memory, disk, network, containers, and process-level telemetry.

    161 GitHub stars~5.5k tokensUpdated 6 days ago
    DevOps & CloudAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub starsUsed in 6 repos~2.8k tokens
    Auto-check passed
  • Official

    Python guidance for the Azure AI Search SDK covering vector, hybrid and semantic search, index management and indexers, with Entra ID authentication preferred over keys.

    3.1k GitHub starsUsed in 6 repos~4.4k tokens
    Auto-check passed
  • Official

    Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.

    3.1k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Pydantic Models Py

    microsoft/skills

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    3.1k GitHub starsUsed in 6 repos~496 tokens
    Auto-check passed
  • Official

    Builds podcast-style audio narration from text with Azure OpenAI's GPT Realtime Mini over WebSocket, from a Python FastAPI backend to a React player.

    3.1k GitHub starsUsed in 1 repo~947 tokens
    Auto-check passed
  • Frontend UI Dark TS

    microsoft/skills

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    3.1k GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed

Questions about Azure AI Anomalydetector Java

What does Azure AI Anomalydetector Java do?

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Azure AI Anomalydetector Java is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java.

When should I use Azure AI Anomalydetector Java?

Azure AI Anomalydetector Java fits situations like: implementing univariate/multivariate anomaly detection; time-series analysis; AI-powered monitoring.

How do I install Azure AI Anomalydetector Java in Claude Code?

Run `npx skills add microsoft/skills --skill azure-ai-anomalydetector-java -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-ai-anomalydetector-java in microsoft/skills) into .claude/skills/azure-ai-anomalydetector-java in your project. Claude Code loads it when a task matches its description.

How do I install Azure AI Anomalydetector Java in Codex?

Run `npx skills add microsoft/skills --skill azure-ai-anomalydetector-java -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-java/skills/azure-ai-anomalydetector-java in microsoft/skills) into .agents/skills/azure-ai-anomalydetector-java in your project. Codex loads it when a task matches its description.

Can I use Azure AI Anomalydetector Java in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/skills --skill azure-ai-anomalydetector-java -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-ai-anomalydetector-java, .gemini/skills/azure-ai-anomalydetector-java, .github/skills/azure-ai-anomalydetector-java and .opencode/skills/azure-ai-anomalydetector-java in your project.

What does Azure AI Anomalydetector Java need to run?

Going by SKILL.md and its folder, Azure AI Anomalydetector Java needs credentials named AZURE_ANOMALY_DETECTOR_API_KEY and AZURE_TOKEN_CREDENTIALS. Our summary lists: A credential in AZURE_ANOMALY_DETECTOR_API_KEY.

Does Azure AI Anomalydetector Java access the network?

SKILL.md names 2 domains. In commands or code: storage.blob.core.windows.net and learn.microsoft.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Azure AI Anomalydetector Java safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Azure AI Anomalydetector Java use?

Azure AI Anomalydetector Java is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure AI Anomalydetector Java use?

About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.1k tokens, read only when the agent opens those files.

What are the alternatives to Azure AI Anomalydetector Java?

Skills that share tags, products or a category with Azure AI Anomalydetector Java: Kql (microsoft/fabric-rti-mcp, 131 stars), Analyzing Cloud Storage Access Patterns (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Azure Kusto (microsoft/GitHub-Copilot-for-Azure, 255 stars) and Apex Azure Kusto (jonathan-vella/apex, 217 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure AI Anomalydetector Java?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,086 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.