Skip to content
Machine Learning
Skill

/jev-style-guard

Install the Jev-Style guard, a Claude Code PreToolUse hook that has a local decision model check every Bash, Write, Edit, Read, WebFetch and MCP tool call for destructive actions, data exfiltration, secrets access and out-of-project paths, and answers allow / ask / deny. Use

From plugin
jev-style
1366 skills

Claude Code

$ npx -y skills add lawrence3699/jev-style --skill jev-style-guard --agent claude-code

SKILL.md

jev-style-guard.SKILL.md
name: jev-style-guard
description: Install the Jev-Style guard, a Claude Code PreToolUse hook that has a local decision model check every Bash, Write, Edit, Read, WebFetch and MCP tool call for destructive actions, data exfiltration, secrets access and out-of-project paths, and answers allow / ask / deny. Use when the user wants a local safety net or approval gate for Claude Code (or another agent with PreToolUse-style hooks), wants to block recursive deletes, force-pushes or key exfiltration, or wants to tune or measure such a guard.

Jev-Style guard for Claude Code

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.

1. Prerequisites

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".

2. Choose where to install

Ask the user which scope they want:

  • **One project**: `.claude/settings.json` in the project (shared with the team) or

`.claude/settings.local.json` (just them).

  • **Every project**: `~/.claude/settings.json`.
  • **As a plugin** (easy to toggle): in Claude Code run

`/plugin marketplace add lawrence3699/jev-style` then `/plugin install jev-style-guard@jev-style`. Skip step 3 in that case.

3. Add the hook

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.

4. Recommend a dry run first

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`.

5. Verify inside Claude Code

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.

6. Tune and measure

  • Thresholds and rules live in the config (`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.

  • Measure any change on labelled calls: `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).

  • Turn it off temporarily: `JEV_STYLE_GUARD_DISABLE=1`.
Read more
@lawrence3699
Ships withjev-style

JevStyle: local decision models for AI agents. Classify, route and score with a probability per option. systemone-compatible local server, MCP tools, Claude Code guard. Open weights, Apache-2.0.

Stars on GitHub

Momentum

stars in total
136
Star history of lawrence3699/jev-style on GitHub, a chart by star-history.com

Other skills on jev-style.

jev-style-adopt

jev-style-adopt

Find 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-eval

jev-style-eval

Measure the Jev-Style local decision model on the user's own labelled examples before relying on it - accuracy, Brier, ECE, how…

jev-style-mcp

jev-style-mcp

Connect the Jev-Style local decision model to an AI coding agent as an MCP server (tools decide, noul, choice, score, model_info)…

jev-style-serve

jev-style-serve

Install and start the Jev-Style local decision server (systemone-compatible API + Playground at http://127.0.0.1:8765) on macOS,…

jev-style

jev-style

Call the local Jev-Style decision model (systemone-compatible API, default http://127.0.0.1:8765) to answer typed questions about…

More skills from other plugins.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

mlflow4d29k
@mlflow@mlflowInstall Skill
hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills2w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast8d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai5d7.3k
@civitai@civitaiInstall Skill

Questions about jev-style-guard.

Which coding agents can use jev-style-guard?
jev-style-guard installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.