guardrail

guardrail is a command for coding agents from vyuh-labs/dxkit. It costs 0 tokens per session (2,835 once invoked), scanned A, original, MIT.

A command that compares a new scan with a saved baseline, which is a record of earlier findings.

In plain words
What is it for?
Use it in pre-commit hooks, pre-push hooks, or continuous integration to block new findings while accounting for renames and small line changes.
Why use it?
It shows whether code-quality problems are new, fixed, moved, or still present, and can stop changes that add regressions.

Command

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.

agentmods
npx agentmods add commands/vyuh-labs/dxkit/guardrail
Clone the repo
git clone --depth 1 https://github.com/vyuh-labs/dxkit

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 guardrail

README.md
[![agentmods](https://agentmods.dev/badge/commands/vyuh-labs/dxkit/guardrail.svg)](https://agentmods.dev/commands/vyuh-labs/dxkit/guardrail)
Your own site
<a href="https://agentmods.dev/commands/vyuh-labs/dxkit/guardrail"><img src="https://agentmods.dev/badge/commands/vyuh-labs/dxkit/guardrail.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02835
Opus 5 $0.00000 $0.01418
Sonnet 5 $0.00000 $0.00567
Haiku 4.5 $0.00000 $0.00283

Measured 4d ago against content hash 7aadb332fa27, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

guardrail scanned grade A with 0 findings 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 4d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/guardrail.md · 207 lines

How it starts

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

vyuh-dxkit guardrail

Run as: vyuh-dxkit <cmd> after npm install -g @vyuhlabs/dxkit, or npx @vyuhlabs/dxkit <cmd> for one-shot use.

Diff a current scan against a committed baseline and classify each finding as added / relocated / tooling_drift / config_drift / persisted / removed / fixed. Block on net-new regressions per the brownfield policy; exit non-zero so a pre-commit hook, pre-push hook, or CI workflow can stop the commit/push/merge.

The matcher is git-aware: it knows about file renames (-M), absorbs line drift via fuzzy ±2 windows, and falls back to content-hash matching when line locators aren't enough. Each match pair carries a confidence in [0, 1] and structured reason codes (exact-id, git-line-exact, git-line-fuzz, git-rename, ...).

Usage

vyuh-dxkit guardrail check [path] [--name <n>] [--baseline <path>]
                           [--changed-only] [--incremental] [--untrusted]
                           [--policy <path>] [--json | --markdown]
Option Effect
path Repo root to scan. Defaults to .
--name <n> Baseline name (.dxkit/baselines/<n>.json). Default main
--baseline <p> Explicit baseline file path (overrides --name)
--changed-only Drop new-side pairs whose anchor line falls outside the working-tree diff. Use in pre-commit hooks; skip in PR-gates
--incremental Scope the gather to the policy's blockable kinds; (ref-based) scope semgrep to changed files AND skip the dependency-vuln audit when no dependency manifest/lockfile changed (a net-new dep vuln requires one — sound in ref-based mode, where both sides audit against the same advisory snapshot). Same verdict, scales with PR size not repo size; falls back to a full scan on any doubt. Opt-in; default is a full scan
--untrusted Treat the scanned source as attacker-controlled (a hosted PR gate). Dependency audits never execute it: the Python pack drops pip-audit . project mode (its PEP 517 build backend can run code) and audits only a requirements file, else reports unavailable. npm-audit and osv-scanner scan are already read-only, so TS/Java/Go/Rust/Ruby are unaffected. Off by default; trusted local runs and the loop on your own repo keep full coverage
--policy <p> Explicit .dxkit/policy.json override. Auto-discovers <cwd>/.dxkit/policy.json when omitted
--json Emit { schema: 'dxkit.guardrail-check.v1', ... } JSON
--markdown Emit a markdown report (used by the PR-gate workflow to post a comment)
--verbose Print per-tool timing to stderr

Read the full file on GitHub · 207 lines

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. 4d ago First seen · 207 lines · 0 tokens per session scan A 7aadb332fa27

Subscribe to this mod's changes

guardrail is a command published in the GitHub repository vyuh-labs/dxkit (10 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,835 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.