/jev-style:jev-style-guardfrom jev-style
Installs a PreToolUse hook that checks every Bash, Write, Edit, Read, WebFetch and MCP tool call against a local decision model for destructive actions, data exfiltration, secrets access and out-of-project paths, answering allow/ask/deny. Use as a local safety net or approval gate for Claude Code.
Ships in jev-style. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before Claude Code runs a tool, the hook jev-style guard sends the call (tool name, full arguments,
cwd, project dir, plus paths and hosts extracted in code) to the local Jev-Style server and asks four
yes/no questions (destructive, exfiltration, outside_project, secrets) and one 0-4 risk score.
Thresholds turn answers into allow / ask / deny; regex hard_rules in code can only make a verdict
stricter. The strictest verdict wins.
Safety properties to tell the user: failures (server down, timeout, an HTTP error, a 200 without a usable value for every question, bad input, broken config) give ask, never a silent allow; the hook always exits 0; by default an "allow" prints nothing, so Claude Code's own permission rules still apply; nothing leaves the machine (the server must be loopback).
Measured on the 49 bundled hand-labelled tool calls with Jev-Style-0.8B-Decision-v3 (the default release)
and the default config; the 2B releases were not measured on this set: 77.6 % agreement with the labels;
no call labelled deny was allowed; 2 of 16 calls labelled ask were allowed. It is a second line of defence,
not a sandbox. Projects under /tmp or other system folders get
more "ask" verdicts (the model reads them as outside a normal project); under the home folder,
routine commands (ls, git status, npm test, pytest, reading files) are allowed.
command -v jev-style || echo "install first: jev-style-serve skill"
curl -s http://127.0.0.1:8765/healthz # the guard needs the server running
jev-style guard --check "git push --force origin main" # expect DENY (rule force-push-main)
jev-style guard --check "ls -la" # expect ALLOW
The guard needs the server running whenever Claude Code runs; offer to start it at login (see the
jev-style-serve skill, step 6). Otherwise every call gets "ask".
Ask the user which scope they want:
.claude/settings.json in the project (shared with the team) or
.claude/settings.local.json (just them).~/.claude/settings.json./plugin marketplace add lawrence3699/jev-style then /plugin install jev-style-guard@jev-style.
Skip step 3 in that case.Merge this into the chosen settings file. Read the file first and keep every existing key and hook;
if hooks.PreToolUse already exists, append to the list. Use the absolute path of jev-style
(command -v jev-style) because hooks do not always inherit the shell PATH.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Write|Edit|MultiEdit|NotebookEdit|Read|WebFetch|mcp__.*",
"hooks": [
{
"type": "command",
"command": "/ABSOLUTE/PATH/TO/jev-style guard || printf '%s\\n' '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"Jev-Style guard could not start; asking instead.\"}}'",
"timeout": 20
}
]
}
]
}
}
If writing the file fails with "Operation not permitted" (a locked settings file), do not try to unlock it; tell the user and offer the project-level file or the plugin instead.
For the first day, log verdicts without acting on them:
jev-style guard --init-config # writes ~/.config/jev-style/guard_config.json (never overwrites)
Then set "dry_run": true in ~/.config/jev-style/guard_config.json, or export JEV_STYLE_GUARD_DRY_RUN=1
in the environment Claude Code starts from. Verdicts go to ~/.local/state/jev-style-guard/guard.jsonl
(mode 600; arguments stored as a hash plus a redacted preview). Review it with the user, then set
dry_run back to false.
Restart Claude Code (hooks load at start). Ask it to run ls (should run normally) and
git push --force origin main in a scratch repo (should be denied with a "Jev-Style guard: rule
'force-push-main'" reason). /hooks in an interactive terminal session lists the installed hook.
thresholds.<question>.ask/deny, hard_rules, skip_tools).
Lower an ask threshold to be more cautious; raise it if the user gets too many prompts.jev-style guard-replay --url http://127.0.0.1:8765 -v
(bundled 49 examples) or --examples my_calls.jsonl with rows
{"id", "label": "allow|ask|deny", "hook_input": {"tool_name", "tool_input", "cwd", "project_dir", "home"}}
(set project_dir and home explicitly; otherwise they default to $CLAUDE_PROJECT_DIR / the cwd).JEV_STYLE_GUARD_DISABLE=1.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
safety-guard, approval-gate, tool-hook, local-llm, pre-tool-use
6 skills in this plugin
/jev-styleCall the local Jev-Style decision model (systemone-compatible API, default http://127.0.0.1:8765) to answer typed questions about text or JSON - yes/no probabilities (noul), one-of-N choices, ordered scores - for routing, classification, gating, triage, guardrails and scoring. Use when writing code that classifies, routes, scores or checks text with a small local model, when replacing an LLM call that only returns a label, or when the user mentions jev-style, /v1/systemone, noul, choice or score questions./jev-style-adoptFind LLM API calls in a codebase that only return a decision (a category, yes/no, or a 1-5 rating) and move them to the local Jev-Style decision model safely - scan, pick candidates with the user, rewrite each as a typed noul/choice/score question with a confidence cascade back to the LLM, run in shadow mode, measure agreement with jev-style eval, then switch. Use when the user wants to cut LLM cost or latency for classification, routing, moderation, gating or scoring calls, or asks which LLM calls a small local model could replace./jev-style-evalMeasure the Jev-Style local decision model on the user's own labelled examples before relying on it - accuracy, Brier, ECE, how many decisions can be automated at a 1/5/10 % error budget and at which confidence threshold, plus a refitted calibration temperature. Use when the user asks whether the local model is good enough for their task, wants thresholds for automating a classification/routing/gating step, or wants to compare it with the labels an existing LLM or human process produces./jev-style-mcpConnect the Jev-Style local decision model to an AI coding agent as an MCP server (tools decide, noul, choice, score, model_info) - Claude Code, Claude Desktop, Cursor, Codex CLI, Windsurf or any MCP client. Use when the user wants their agent to classify, route, gate or score text with a local model through MCP, or asks to add jev-style as an MCP server./jev-style-serveInstall and start the Jev-Style local decision server (systemone-compatible API + Playground at http://127.0.0.1:8765) on macOS, Linux or Windows/WSL, pick the right backend (MLX on Apple silicon, PyTorch CUDA/CPU elsewhere, llama.cpp GGUF optional), verify it answers, and optionally keep it running at login. Use when the user wants to run Jev-Style, set up a local decision model / systemone endpoint, or when another jev-style skill finds no server on :8765.npx claudepluginhub lawrence3699/jev-style --plugin jev-styleOther plugins' skills for the same job