selfhost-emem-guard

selfhost-emem-guard is a skill for Claude Code, Codex from Vortx-AI/emem. It costs 81 tokens per session (5,702 once invoked), scanned A, original, Apache-2.0.

A procedure for running your own emem-guard server, which checks whether factual claims in prompts have valid citations before allowing them to continue. It signs and logs each allow or deny decision.

In plain words
What is it for?
Setting up the server, checking it against conformance tests, connecting it to an agent or MCP, and configuring Claude Code or Claude Enterprise checkpoints.
Why use it?
It adds a review checkpoint for claims about the physical world and lets others verify the decision later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./target/release/emem-guard --data ./var/guard.

Good fit Setting up the server, checking it against conformance tests, connecting it to an agent or MCP, and configuring Claude Code or Claude Enterprise checkpoints.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Vortx-AI/emem
agentmods
npx agentmods add skills/vortx-ai/emem/emem-guard

Made for: Claude Code, Codex.

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 selfhost-emem-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/vortx-ai/emem/emem-guard/github.svg)](https://agentmods.dev/skills/vortx-ai/emem/emem-guard)
Your own site
<a href="https://agentmods.dev/skills/vortx-ai/emem/emem-guard"><img src="https://agentmods.dev/badge/skills/vortx-ai/emem/emem-guard/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 selfhost-emem-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/vortx-ai/emem/emem-guard"><img src="https://agentmods.dev/badge/skills/vortx-ai/emem/emem-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 563
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Data Exfiltration · line 130
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 433
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00081 $0.05702
Opus 5 $0.00041 $0.02851
Sonnet 5 $0.00016 $0.01140
Haiku 4.5 $0.00008 $0.00570

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

Security

Grade A, and why

selfhost-emem-guard scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Check: `curl -s localhost:8080/health | grep verifies_citations` says `true`.
crates/emem-guard/SKILL.md · 597 lines

How it starts

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

Self-host emem-guard

You are the operator. This procedure is written to be run by an agent with a shell, unattended, in one session. Every step is a command you can execute and a check you can evaluate. If a step cannot be run verbatim, that is a defect in this file: report it rather than improvising around it.

What you are building

Four diagrams, if the shape helps before the commands do: nine doors, one decision, one verdict, in order, the chassis your DLP runs on, three deployments.

A server that answers one question: should this prompt proceed, given the claims it makes about the physical world. It returns allow or deny, signs the verdict, and appends it to a log before answering, so the decision can be verified later by someone who does not trust you.

It is not a DLP scanner. It does not classify content. It checks whether the emem: citations in a transcript still verify, and optionally whether measurable claims about places carry a citation at all.

Before you start

You need:

  • Rust 1.91 or newer (rustc --version).
  • Nothing else to run it locally.

For the Anthropic Enterprise checkpoint specifically you also need a publicly reachable HTTPS URL on port 443 with a certificate that validates against the public CA trust store, because that platform refuses private, loopback and carrier-grade NAT ranges at connect time and does not follow redirects. The open routes have no such requirement: localhost is fine.

You do NOT need an emem account, an API key, or network access to emem.dev.

Step 1: build

git clone https://github.com/Vortx-AI/emem
cd emem
cargo build --release -p emem-guard

Check: the build exits 0. If it fails on ort-sys or a GPU crate, you have built the wrong package; -p emem-guard pulls no inference dependencies.

Read the full file on GitHub · 597 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. 10d ago First seen · 597 lines · 81 tokens per session scan A f67df094ef72

Subscribe to this mod's changes

selfhost-emem-guard is a skill published in the GitHub repository Vortx-AI/emem (56 stars, last pushed today), licensed Apache-2.0. It adds 81 tokens to every session and 5,702 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.