FAI Content Moderation Builder

FAI Content Moderation Builder is an agent for Claude Code from frootai/frootai. It costs 38 tokens per session (588 once invoked), scanned A, original, MIT.

A builder for adding content moderation to an AI application through Azure Content Safety. It checks text and images, applies harm categories and blocklists, and routes results to blocking, human review, or approval.

In plain words
What is it for?
Use it to add moderation before and after an AI model, connect checks through an API gateway, define custom rules, record audit events, and route results by severity.
Why use it?
It helps prevent harmful prompts and generated responses from bypassing safeguards. It also gives different harm categories their own thresholds instead of treating every case alike.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to add moderation before and after an AI model, connect checks through an API gateway, define custom rules, record audit events, and route results by severity.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/frootai/frootai/fai-play-10-builder.agent.lean
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/frootai/frootai

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for FAI Content Moderation Builder

README.md
[![agentmods](https://agentmods.dev/badge/agents/frootai/frootai/fai-play-10-builder.agent.lean/github.svg)](https://agentmods.dev/agents/frootai/frootai/fai-play-10-builder.agent.lean)
Your own site
<a href="https://agentmods.dev/agents/frootai/frootai/fai-play-10-builder.agent.lean"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-play-10-builder.agent.lean/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for FAI Content Moderation Builder

Your own site · 80×15
<a href="https://agentmods.dev/agents/frootai/frootai/fai-play-10-builder.agent.lean"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-play-10-builder.agent.lean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00588
Opus 5 $0.00019 $0.00294
Sonnet 5 $0.00008 $0.00118
Haiku 4.5 $0.00004 $0.00059

Measured 3d ago against content hash 01ce9f4dc823, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

FAI Content Moderation Builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/fai-play-10-builder.agent.lean.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FAI Content Moderation Builder

Content Moderation builder for Play 10. Implements Azure Content Safety API, 4-category severity scoring (hate/violence/sexual/self-harm), custom blocklists, APIM gateway integration, and severity-based routing pipeline.

Core Expertise

  • Azure Content Safety: Text/image analysis, severity levels (0-6), 4 harm categories, custom blocklists
  • APIM gateway: Content Safety as middleware policy, request/response inspection, audit logging
  • Custom categories: Industry-specific rules (financial advice, medical claims), brand safety
  • Severity routing: Block (≥4), human review (2-3), pass (0-1), configurable per category
  • Dual moderation: Pre-LLM input screening AND post-LLM output filtering — both required

What the Model Gets Wrong

Mistake Why Wrong Correct Approach
Only filters output, not input Prompt injection bypasses → harmful output generated Screen BOTH input (before LLM) AND output (after LLM)
Same severity threshold for all categories Self-harm needs zero tolerance, violence context-dependent Per-category: self-harm=0, hate=2, violence=3, sexual=2
Blocks without user feedback Users frustrated, no learning Return safe rejection: "I can't help with that. Try rephrasing."
Logs flagged content with full text PII exposure, harmful content in storage Log only: category, severity, action, correlationId — never raw text
No custom blocklists Generic model misses industry-specific terms Add domain blocklists: competitor names, restricted topics, slurs
Hard-codes thresholds Can't adjust without code change Config-driven: config/guardrails.json for all thresholds

Anti-Patterns

  • Output-only moderation: MUST screen both input AND output
  • Flat thresholds: Per-category severity levels based on harm potential
  • Logging flagged content: Only log metadata, never the harmful text itself
  • No bypass prevention: Ensure no API path skips Content Safety check

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 46 lines · 38 tokens per session scan A 01ce9f4dc823

Subscribe to this mod's changes

FAI Content Moderation Builder is an agent published in the GitHub repository frootai/frootai (7 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 588 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.

Related

Other agents, from other repositories