| name | exa-policy-guardrails |
| description | Implement content policy enforcement, domain filtering, and usage guardrails for Exa.
Use when setting up content safety rules, restricting search domains,
or enforcing query and budget policies for Exa integrations.
Trigger with phrases like "exa policy", "exa content filter",
"exa guardrails", "exa domain allowlist", "exa content moderation".
|
| allowed-tools | Read, Write, Edit, Bash(npx:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","exa","policy","content-moderation"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Exa Policy Guardrails
Overview
Policy enforcement for Exa neural search integrations. Exa searches the open web, so results may include unreliable sources, competitor content, or inappropriate material. This skill covers domain allowlists/blocklists (via Exa's includeDomains/excludeDomains), content moderation, query sanitization, freshness policies, and per-user budget enforcement.
Prerequisites
exa-js installed and configured
- Content policy requirements defined
- Redis for per-user quota tracking (optional)
Instructions
Step 1: Domain Filtering (Built-in Exa Feature)
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
const TRUSTED_SOURCES = {
medical: [
"pubmed.ncbi.nlm.nih.gov", "who.int", "cdc.gov",
"nejm.org", "nature.com", "thelancet.com",
],
technical: [
"github.com", "stackoverflow.com", "developer.mozilla.org",
"docs.python.org", "nodejs.org", "arxiv.org",
],
news: [
"reuters.com", "apnews.com", "bbc.com",
"techcrunch.com", "arstechnica.com",
],
};
const BLOCKED_DOMAINS = [
"competitor1.com", "competitor2.io",
, ,
];
() {
: = {
: ,
: ,
: { : },
: ,
};
(category !== && [category]) {
opts. = [category];
} {
opts. = ;
}
exa.(query, opts);
}