synthesis-message-guard

synthesis-message-guard is a skill for Claude Code, Codex from synthesisengineering/synthesis-skills. It costs 118 tokens per session (2,963 once invoked), scanned B, original, Apache-2.0.

A pre-send safety gate for messages and email drafts written by an agent. It checks the message text and email threading headers before a sending or drafting tool is allowed to run.

In plain words
What is it for?
Enforcing rules on agent-written correspondence, checking that a message is supported by a fresh grounding record, and catching invalid email reply headers.
Why use it?
It blocks correspondence that fails required style or grounding checks, including malformed reply headers that can detach a message from its conversation. The checks run in code rather than relying only on written instructions.

Skill for Claude CodeCodex

Written for Claude Code and Codex: PreToolUse hook event, but also agents/openai.yaml present. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Part of the synthesis-skills plugin — 63 skills, 4 hooks shipped together

Good fit Enforcing rules on agent-written correspondence, checking that a message is supported by a fresh grounding record, and catching invalid email reply headers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthesisengineering/synthesis-skills/synthesis-message-guard
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.

Any agent
npx skills add synthesisengineering/synthesis-skills --skill synthesis-message-guard
Clone the repo
git clone --depth 1 https://github.com/synthesisengineering/synthesis-skills

Made for: Claude Code, Codex.

Or install synthesis-skills, the plugin that ships this one along with the rest of its 63 skills, 4 hooks.

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 synthesis-message-guard

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/synthesisengineering/synthesis-skills/synthesis-message-guard"><img src="https://agentmods.dev/badge/skills/synthesisengineering/synthesis-skills/synthesis-message-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,963 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00118 $0.02963
Opus 5 $0.00059 $0.01482
Sonnet 5 $0.00024 $0.00593
Haiku 4.5 $0.00012 $0.00296

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

Security

Grade B, and why

synthesis-message-guard scanned grade B 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 6d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/message_guard.py, scripts/test_message_guard.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json` and Codex's `~/.codex/hooks.json`, each matching
skills/synthesis-message-guard/SKILL.md · 232 lines

How it starts

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

Message Guard

Version 1.3.0 (2026-09-01) adds patterns.example.json, the public, validator-backed starting point used by synthesis-onboarding init. The scaffolder preserves the user's local copy and can add interview-supplied wording boundaries without putting personal policy in this repository. A fail-closed message gate now ships the route to a valid config instead of requiring adopters to reconstruct one from prose.

Version 1.2.0 (2026-08-28) — adds check_header_hygiene: the gate now inspects the RFC threading headers (in_reply_to, references) in the tool input, not only the message text, and blocks a send whose Message-ID has been HTML-escaped (&lt;id@host&gt;) or left with an unbalanced angle bracket. Such a header matches no message, so the reply orphans in any strict RFC client — but Gmail's own thread_id threading masks it whenever the caller passes both, which is why the error survived review and recurred (2026-08-20, 2026-08-28). A malformed header is now structurally undeliverable rather than silently wrong.

Version 1.1.0 (2026-07-29)

Prose rules do not survive contact with a model under load. This skill is the enforcement layer for correspondence the way commit hooks are the enforcement layer for repositories: the rules live in code, run outside the model, and fail closed.

Why it exists

Two same-night incidents (2026-07-29), both by an agent that had the relevant rules loaded in context:

  1. A reply composed without reading the thread it was replying into. The thread's own quoted history contained the principal's earlier message taking the opposite strategic position, with a better argument. The reply was sent. Correcting it cost a follow-up email and real trust.
  2. A drafted message containing register patterns the principal's written voice rules explicitly ban (self-flagellation about a delayed reply; expressing trust in a colleague via the author's own limitation). The principal had warned about exactly this class before.

Read the full file on GitHub · 232 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago Changed · +70 lines d7ae8787dccb
  2. 10d ago First seen · 162 lines · 118 tokens per session scan B bae8bb37a4be

Subscribe to this mod's changes

synthesis-message-guard is a skill published in the GitHub repository synthesisengineering/synthesis-skills (18 stars, last pushed today), licensed Apache-2.0. It adds 118 tokens to every session and 2,963 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens