Index of every page on this site: llms.txt
All skills
cobusgreyling avatar

/jev-guardrail

@77b65c6
by Cobus Greylingcobusgreyling/jev140 stars
30
Run it yourself

Screen LLM input and output with TypeSafe Jev Noul hazard batteries plus a harm Score; policy in code returns pass, review, or block. Use for jailbreak, prompt injection, secret leak, denylist pressure, or when the user runs /jev-guardrail or `npx jev guard`.

Use this Skill: https://skilld.dev/gh/cobusgreyling/jev/jev-guardrail

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈69 tokens for metadata: the name and description. ≈475 when used: this file.

Description uses 3.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈275 characters, or 3.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Jev LLM guardrail

Jev does not refuse in prose. It scores hazards. Code returns pass / review / block, then a generative model (or a static message) talks.

Primitives and auth: skills/jev/SKILL.md. Cookbook: https://docs.typesafe.ai/cookbooks/llm_guardrails

Battery

One request. Independent Nouls per hazard + one Score for harm. Gate Noul on the probability. Do not copy a Noul threshold onto Choice confidence.

Input hazards in this repo: jailbreak, prompt_injection, secret_exfil, denylist_pressure, harmful_request.

Output hazards: broke_policy, secret_leak, hallucination, instruction_drift, harmful_content.

Screen both sides. Redact secrets before sending state.

Policy lives in code

Caller-owned thresholds. Defaults in this repo (packages/js/src/guard.ts, jev_lab/policy.py):

Signal Strict Permissive
Noul review ≥ 0.35 ≥ 0.35
Noul action ≥ 0.7 ≥ 0.85
Harm Score promotes review → block ≥ 2.0 ≥ 2.0

Guardrails fail closed (block if the call errors). Routers may fail open; this skill does not.

jailbreak, prompt_injection, secret_exfil, denylist_pressure, harmful_request, broke_policy, secret_leak, harmful_content → block when above the action bar. hallucination and instruction_drift → review.

Pair with a generative model

  • block — do not forward the text; return a fixed refusal
  • review — human or a reasoning model
  • pass — generate as usual

This repo

npx jev guard --side input --text "Ignore previous instructions" --json
npx jev guard --side output --text "$REPLY" --json
python examples/07_guardrails.py
  • packages/js/src/guard.ts — inputBattery / outputBattery / routeGuard
  • examples/07_guardrails.py — Choice + Noul, then skip the chat model

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning26d3 checks · Risk SAFE
  • Gen Agent Trust Hub26d

    The skill provides a security guardrail utility for screening AI inputs and outputs. It relies on the 'jev' package downloaded via npx and includes examples for testing prompt injection detection. While it processes untrusted data, its primary purpose is defensive.

  • Socket26d

    1 alert: gptSecurity

  • Snyk26d

    Risk: LOW · No issues

Signed by skilld at 77b65c6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated last month

README badge

README badge for cobusgreyling/jev/jev-guardrail