# Azure AI contentsafety ts

> Azure AI contentsafety ts is an open-source agent skill for cloud and infrastructure. Lets an agent scan text and images for harmful content with Azure AI Content Safety. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts
- **Repository:** https://github.com/microsoft/skills
- **GitHub stars:** 3,214
- **License:** MIT
- **Skill name:** azure-ai-contentsafety-ts
- **Collection:** https://github.com/microsoft/skills
- **Categories:** cloud and infrastructure, design and media, security
- **Listing updated:** 2026-11-18

## About

This skill gives the agent a working reference for the Azure AI Content Safety REST client in TypeScript. It covers creating the client with either an API key or Azure identity credentials, then sending text or images to the analyze endpoints and reading back severity scores for hate, sexual, violence and self-harm categories. Severity can be returned on a four-level or eight-level scale.

Beyond single analyses, the skill walks through managing custom blocklists: creating and deleting them, adding or listing terms, and checking text against them during analysis. It also includes a small moderation helper that turns category severities and blocklist hits into an allow or reject decision with a configurable threshold, plus a severity table suggesting how to act at each level.

The code is TypeScript and expects the @azure-rest/ai-content-safety, @azure/identity and @azure/core-auth packages, along with a Content Safety endpoint and key or a credential configured through environment variables. The skill ships as a single SKILL.md file with no bundled scripts.

## When your agent uses it

> Analyze text and images for harmful content using Azure AI Content Safety (@azure-rest/ai-content-safety). Use when moderating user-generated content, detecting hate speech, violence, sexual content, or self-harm, or managing custom blocklists.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts)
- [License: MIT](https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts)

## Features

- **Text harm analysis:** Scores submitted text across hate, sexual, violence and self-harm categories.
- **Image harm analysis:** Checks images sent as base64 content or from a blob storage URL.
- **Custom blocklist management:** Creates, updates, lists and deletes blocklists and their terms.
- **Blocklist matching:** Reports which custom blocklist terms appear in analyzed text.
- **Authentication setup:** Shows API key and Azure identity credential configuration for the client.
- **Moderation decision helper:** Provides a function that converts severity and blocklist results into allow or block.

## Good for

- Screen user comments for hate speech or violent language before publishing
- Check uploaded images for sexual or violent content
- Maintain a custom list of banned terms and test messages against it
- Build a moderation step that flags self-harm mentions for human review

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/azure-ai-contentsafety-ts` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/azure-ai-contentsafety-ts &&
cp -R "$tmp/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts" ~/.claude/skills/azure-ai-contentsafety-ts &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/azure-ai-contentsafety-ts` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/azure-ai-contentsafety-ts` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/azure-ai-contentsafety-ts &&
cp -R "$tmp/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts" ~/.agents/skills/azure-ai-contentsafety-ts &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/azure-ai-contentsafety-ts` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/azure-ai-contentsafety-ts` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/azure-ai-contentsafety-ts &&
cp -R "$tmp/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts" ~/.cursor/skills/azure-ai-contentsafety-ts &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/azure-ai-contentsafety-ts` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/microsoft/skills.git --path .github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts
```

Or copy the folder to `~/.gemini/skills/azure-ai-contentsafety-ts` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/azure-ai-contentsafety-ts`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/azure-ai-contentsafety-ts &&
cp -R "$tmp/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts" ~/.copilot/skills/azure-ai-contentsafety-ts &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/azure-ai-contentsafety-ts` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/microsoft/skills.git
```

Then copy `skills/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts` into your agent's skills folder as `azure-ai-contentsafety-ts`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It expects the @azure-rest/ai-content-safety, @azure/identity and @azure/core-auth npm packages, a Content Safety endpoint, and either an API key or Azure credentials set through environment variables.

### Does it include scripts or tools that run on their own?

No. The skill is a single SKILL.md file with instructions and code examples, and it bundles no scripts.

### Which harm categories does it cover?

Hate, Sexual, Violence and SelfHarm, with severity output as either four levels (0, 2, 4, 6) or eight levels (0 to 7).

### How do I install Azure AI contentsafety ts in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/azure-ai-contentsafety-ts to use it in all your projects, or to .claude/skills/azure-ai-contentsafety-ts in one project.

### Does Azure AI contentsafety ts run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Azure AI contentsafety ts?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Azure AI contentsafety ts?

The closest alternatives to Azure AI contentsafety ts are Azure AI contentsafety py, Azure AI contentsafety java, Azure AI contentunderstanding py, Azure AI textanalytics py and Azure AI document intelligence ts.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Azure AI contentsafety py](https://ai-powered.com/skills/azure-ai-contentsafety-py): Azure AI contentsafety py is an open-source agent skill for cloud and infrastructure.
- [Azure AI contentsafety java](https://ai-powered.com/skills/azure-ai-contentsafety-java): Azure AI contentsafety java is an open-source agent skill for cloud and infrastructure.
- [Azure AI contentunderstanding py](https://ai-powered.com/skills/azure-ai-contentunderstanding-py): Azure AI contentunderstanding py is an open-source agent skill for design and media.
- [Azure AI textanalytics py](https://ai-powered.com/skills/azure-ai-textanalytics-py): Azure AI textanalytics py is an open-source agent skill for cloud and infrastructure.
- [Azure AI document intelligence ts](https://ai-powered.com/skills/azure-ai-document-intelligence-ts): Azure AI document intelligence ts is an open-source agent skill for cloud and infrastructure.
- [Azure AI openai dotnet](https://ai-powered.com/skills/azure-ai-openai-dotnet): Azure AI openai dotnet is an open-source agent skill for design and media.
- [Azure AI](https://ai-powered.com/skills/azure-ai): Azure AI is an open-source agent skill for cloud and infrastructure.
- [Azure AI vision imageanalysis py](https://ai-powered.com/skills/azure-ai-vision-imageanalysis-py): Azure AI vision imageanalysis py is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/azure-ai-contentsafety-ts
