
Brand Voice
io.github.zoharbabinPublished by GitHub account zoharbabinv0.1.8Updated Oct 24, 2026
Enforce brand writing guidelines in Claude Code — PostToolUse hook + MCP server
Overview
Local MCP server and Claude Code hook that checks Markdown prose against a brand-guidelines file and flags or fixes violations.
- What you can do
- Analyze Markdown files or inline text against brand guidelines, returning violations and readability scores
- Apply safe word-level substitutions for forbidden or avoid terms, with an optional dry-run diff preview
- Report forbidden and avoid terms, sentence length, passive voice and readability grade, skipping code blocks, inline code and table rows
- Pair with a PostToolUse hook that blocks non-compliant writes so Claude corrects and retries, plus a CLI for CI checks
- When to use it
- Useful when Claude Code writes or edits Markdown and you want brand vocabulary, tone and readability rules enforced automatically instead of pasted into every prompt. Also fits teams that want the same checks in CI pipelines.
- Requirements
- Runs locally as a Node.js process (Node.js 18+), installed via npm or npx. Needs a brand-guidelines.md in the project, home directory or a parent directory. Vale is optional and only needed for the vale-sync command. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open Brand Voice in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
brand-voice
Brand writing enforcement for Claude Code — automatic, configurable, zero-friction.
[npm version] [npm downloads] [CI] [License: MIT] [Node.js 18+]
Every time Claude writes or edits a Markdown file, brand-voice checks it against your brand guidelines and signals Claude to fix violations before the file saves. No manual review. No rule reminders in every prompt.
Claude reads the violation list, corrects the file, and retries the write — automatically.
Why brand-voice?
Your brand guidelines live in a doc somewhere. Claude doesn't read them unless you paste them into every prompt. Even then, the rules drift over time.
brand-voice makes the rules structural:
- Works for any company — configure your own vocabulary, voice, and visual identity
- Auto-corrects, doesn't just report — the PostToolUse hook blocks bad writes and triggers a retry
- Covers the full stack — hook for Claude Code, MCP server for on-demand checks, CLI for CI pipelines
- Smart about code — ignores fenced blocks, indented code, inline code spans, and table cells
- Escape hatches —
.brand-voice-ignorefor whole files,<!-- brand-voice-disable-line -->for individual lines - Visual identity included — colors, fonts, logo URLs live in the same guidelines file
Install
Or run without installing:
Requires Node.js 18+.
Quick Start
Option A — Guided setup in Claude Code (recommended)
Run the setup skill inside any Claude Code session:
The skill does everything:
- Asks whether you have existing brand docs or want to answer four questions
- Optionally researches your brand automatically via web
- Writes
brand-guidelines.mdto your project - Injects a summary block into
CLAUDE.md - Registers the PostToolUse hook in
.claude/settings.json - Registers the MCP server in
.mcp.json
After setup, every .md and .mdx file Claude touches is checked automatically.
Option B — Manual setup
How It Works
Three components work together:
What gets checked
Code blocks, inline code, indented blocks, and table rows are never checked — only prose.
Never checked: physical line length or line breaks. The CLAUDE.md injection always includes a formatting rule telling Claude to write continuous paragraphs and let the renderer word-wrap, but the analyzer itself has no line-width rule and never will — sentence length is measured in words, not characters or lines, so hard-wrapped and unwrapped prose score identically.
PostToolUse hook exit codes
Exit 1 is never used (it aborts the session rather than triggering a retry).
brand-guidelines.md
One Markdown file holds your entire brand configuration. Keep it under 600 words so it fits cleanly in context.
See example/brand-guidelines.md for a complete working example.
Section aliases
## On-Brand Examples and ## Off-Brand Examples are accepted as aliases for ## On-Tone Examples / ## Off-Tone Examples. All other section names are case-insensitive exact matches.
Search path
The hook and CLI search for brand-guidelines.md in this order:
- Current working directory
~/.claude/brand-guidelines.md(user scope — enforces rules across all your projects)- Parent directories up to the git root
Suppressing Violations
Skip files or directories — .brand-voice-ignore
Create a .brand-voice-ignore file in your project root. Uses gitignore-style patterns:
Skip a single line — inline comment
Add this comment anywhere on a line to suppress all violations on that line. Useful for one-off exceptions where the violation is intentional.
MCP Server
analyze_readability
Check a file or inline text for violations and readability scores.
Inputs:
Returns: { filePath, passed, violations[], readabilityScores, visualIdentity }
apply_suggestions
Apply safe word-level substitutions for forbidden/avoid terms. Does not fix sentence length, passive voice, or grade — those need human judgment.
Inputs:
Returns: diff + change list (dry run) or confirmation + change list (live)
Tip: Run dryRun: true first to preview, then apply.
CI Integration
brand-voice works independently of Claude Code — add it to any pipeline.
Check all .md files:
Check only files changed in the current branch:
GitHub Actions inline annotations (PR diff comments):
Ratchet enforcement — block regressions without requiring a clean slate:
Example GitHub Actions workflow:
Exit 0 = clean or within baseline. Exit 1 = errors found or baseline exceeded.
CLI Reference
Programmatic API
See src/types.ts for full type definitions.
Distribution Patterns
Requirements
- Node.js 18+
brand-guidelines.md— created by/brand-voice-setupor written manually- Vale — optional; only required for
vale-sync
Contributing
Bug reports, feature requests, and pull requests are welcome. See CONTRIBUTING.md for setup instructions, key invariants to preserve, and code style guidance.
License
MIT — see LICENSE.
Source: README.md at commit 0aa31e3
Tools
0Version history
1- v0.1.8LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts