/jev-lint:jev-lintfrom jev-lint
Guides using jev-lint, a linter where ast-grep matchers select code and a model judges one sentence per match. Covers initialization, CI setup, rule writing, and cutoff calibration.
Ships in jev-lint. 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.
Read when SKILL.md points to them.
A linter whose rules are sentences. An ast-grep matcher decides which code is looked at; one sentence decides whether it is a problem; a model (Jev) answers the sentence for every match, batched per file. It finds what no parser can: a function whose body does something other than its name promises, a comment that became false, a test that would pass if the behaviour it names were broken.
| who does it | how it fails | |
|---|---|---|
rule: | ast-grep — exact, free, local | silently: a node it misses is never asked about |
ask: | the model, once per match | loudly: every answer is visible in jev-lint gaps |
Knowing which half you are working on is most of the job.
.sort() is lexicographic). Those belong to the existing tools.subject and state before
touching the wording.threshold:; baking it
into the question means every recalibration rewrites the question.TYPESAFE_API_KEY), never in
.jev-lint.yaml, which belongs in version control. apiKey: in the file
is a hard error.--record r.json).
jev-lint replay r.json re-scores it under new cutoffs with no API key,
so a cutoff stays auditable.| you want to | read |
|---|---|
| run it, add it to CI, tune output | this file, next section |
| initialize a project, suggest initial rules from its directory structure, create a focused config | references/initializing-project.md |
| use the rules that ship with it, pick some, adjust a cutoff | references/using-shipped-rules.md |
| write a rule in your own TypeScript, custom-grammar, Text, or Git repository | references/writing-project-rules.md, then references/cookbook.md |
know what every field means, score vs noul, the state arms | references/rule-fields.md |
| fit a cutoff, build a rule's evals, judge whether a rule works | references/calibration.md |
| judge commit messages against their diffs, or a change against the repository's own AGENTS.md | jev-lint commits, below |
| install it as a git hook, and know what blocks a commit | ../../docs/use-hooks.md |
export TYPESAFE_API_KEY=... # or TYPESAFEAI_API_KEY
npx -y jev-lint # confirm, then use config or select starter rules and check
npx -y jev-lint --yes # skip the startup confirmation, including without a terminal
npx -y jev-lint auto src test # select and check only these paths; no config created
npx -y jev-lint --dry-run # no config: metadata only, no requests
npx -y jev-lint check src --dry-run # plan and price. Makes NO request.
npx -y jev-lint check src # judge whole files
npx -y jev-lint run fn-name-promises src # one shipped rule; rust/<id> for one language
npx -y jev-lint run --file myrule.yml src # a rule file of your own, and nothing else
npx -y jev-lint review --base main # judge only what the diff touched
npx -y jev-lint commits --base main # judge each commit's message against its diff,
# and each change against AGENTS.md (CLAUDE.md fallback)
npx -y jev-lint commits --staged # the same, on what is about to be committed
npx -y jev-lint init # write .jev-lint.yaml: files, and every shipped rule on
npx -y jev-lint init --introspect # ask Jev and create a config with starter rules
npx -y jev-lint introspect --dry-run # metadata plan, no model requests
npx -y jev-lint introspect --write # ask Jev for starter rules and create a new config
npx -y jev-lint rules # what loaded, and every validation error
For initialization, follow initializing-project.md
to propose enabled, deferred and unsuitable rules with file evidence. introspect
uses Jev directly; it needs no separate coding-agent model. Plain init still
enables every shipped rule; init --introspect creates the recommended starter
without needing --write. Preserve existing settings and calibrated cutoffs;
use a separate proposal path when a config already exists.
Commandless startup and auto confirm once before any API request, defaulting
to No. Use --yes for an already authorized noninteractive run; npx -y
alone only approves npm's package download. A decline makes no requests or
record/cache writes. Dry runs and scope explanations do not prompt. Noninteractive auto without --yes exits 2; JSON cancellation
is cancelled, and missing confirmation is confirmation-required.
Commandless startup and auto preserve existing settings. Without a config,
they select rules from tracked filenames, print starter YAML, then check up to three sampled files.
Incomplete selection or no starter exits 3 before checking; no all-rule fallback
runs. No config is created. auto --dry-run without config only shows metadata;
its subsequent check sends source evidence through the normal runner. JSON has
introspection and check fields, and --record saves the usual lint record.
Use init --introspect to save recommendations instead.
For experimental alternatives, use --model openrouter:<id> with
OPENROUTER_API_KEY: liquid/d1.2-ultra, liquid/d1.2, baseten/mammoth-1,
or perplexity/pplx-decider-v1.3:free. Keep Jev as the default: existing
cutoffs are fitted for it. Native models have separate cache filenames;
compare fresh with --cache none and labelled cases before adopting one.
Detecting OPENROUTER_API_KEY prompts for consent before using OpenRouter, even with --yes or a TypeSafe key. For an authorized noninteractive run, explicitly select openrouter:typesafe/jev-1.14 via config, --model or JEV_LINT_MODEL. The free Decider trial uses the same model for selection and lint. Other OpenRouter checking models use Jev for selection. For routine use, prefer Jev with TYPESAFE_API_KEY.
Run check --dry-run first for a configured or explicit-rule check: it prints subject count, request count and the
price without spending anything. Then review, not check, for anything
routine — review mode keeps only matches whose subject overlaps a changed line,
which is where findings concentrate and costs a fraction of a cent.
jev-lint review --base "$GITHUB_BASE_REF" --format github # in CI
jev-lint init --pre-commit # hook: review --staged + commits --staged, on every commit
jev-lint init --pre-push # hook: commits @{upstream}..HEAD --fail-on error, before every push
jev-lint check src --retry 3 # decide on the mean of 3 passes
jev-lint check src --threshold typescript/fn-name-promises=0.8 # override one cutoff for one run
jev-lint check src -R my-rules.yml -R rules # rule sources, repeatable
Exit codes: 0 clean, 1 findings, 2 configuration error, 3 requests
failed. Any finding exits 1 unless --fail-on <severity> raises the bar;
--format github annotates warning unless the rule says severity: error, and no shipped rule does. The pre-commit hook init --pre-commit
writes uses --fail-on error, so no finding blocks a commit until a rule
has earned error; without a key in the environment it steps aside. It runs
two questions about what is staged -- review --staged for the file
rules, then commits --staged for subject: change rules, which is where
git/diff-follows-instructions judges the diff against the repository's own
AGENTS.md, or CLAUDE.md when absent. A failed request exits 3, and git fails a hook on any
non-zero exit, so the shipped bodies let 3 through deliberately: being unable
to commit while offline is how a hook gets deleted rather than fixed. Both
bodies are tracked at .jev-lint/hooks/<name>, reviewable like any other
file, with a shim in git's hooks directory that finds and runs them --
../../docs/use-hooks.md. --staged reviews what the commit will contain: no untracked files,
no unstaged edits, though a partially staged file is judged as it is on disk.
When paths are configured or given, review scans only the changed files
under them, never the whole tree.
Settings: .jev-lint.yaml (or jev-lint.yaml, .jevlint.yml, any spelling; two in one directory is an error), nearest one searching upwards, a flag beats
it. languages: declares a grammar ast-grep does not have built in (a
tree-sitter parser compiled to a dynamic library — see
the reference;
MoonBit is measured there). files: there lets jev-lint check take no argument; rules: picks the
rules, ESLint-style — fn-name-promises: on, rust/fn-name-promises: off,
comment-describes-block: { threshold: 0.7, severity: error } — from the shipped
packs and the project's own .jev-lint/rules/; a config with no rules:
runs nothing. Unknown keys are errors. A -R run inside a repository that
has a config still merges that config — its rules:, its files: — so pass
--no-config when testing a rule in isolation, and --cache none so
no earlier verdict is reused (the cache is the ledger directory .jev-lint/verdicts/; -c <path> names another).
hooks.precommit can select a separate rule set for review --staged and
commits --staged. extends: true inherits top-level rules: and applies
the hook entries over it; extends: false uses only hook entries. Without the
section, staged runs use top-level rules:. See
the hook guide.
Two output lines that are never noise:
N rules matched nothing — the only place a dead matcher is visible.
Other-language rules are reported as idle. Inspect unmatched rules of the
active languages rather than treating zero matches as successful coverage.N without a verdict — requests failed. A run with failures never reads
as a clean repository.Silencing — any comment syntax, first thing on its line:
// jev-lint-ignore-next-line fn-name-promises, var-name-describes-value
// jev-lint-ignore-file
A suppressed subject is never sent, so it also saves its tokens; every run prints how many were skipped, and calls out a suppression naming a rule id that does not exist.
--retry n asks everything n times and decides on the mean, printing
3/3 passes or 1/3 passes per finding. Use it near a cutoff: pass-to-pass
spread has a median of 0.01 but a maximum of 0.30. It bypasses the verdict
cache and costs n times the tokens. (-r is retry; -R is rules.)
Use writing-project-rules.md for the
rule's location and the steps for a built-in grammar, a custom parser, a
Text block, or a Git change. It links the validated
cookbook, the field reference,
and the calibration procedure. Keep the
--dry-run --show-subjects matcher check separate from the paid, labelled
evaluation; a guessed threshold: is not a calibrated rule.
When you disagree with a finding it is one of three things, and only the third means the tool is wrong:
fixtures/ as a
labelled clean example in expect.yml, run the eval, and refit. A false positive that
is not in the evals comes back.Do not chase the tail: editing a file moves the located state for every
subject in it, so a fix can move unrelated verdicts. Fix what you agree with,
re-measure with --retry 3, and record the residue rather than iterating
against noise.
references/calibration.md (opens in a new tab)references/cookbook.md (opens in a new tab)references/initializing-project.md (opens in a new tab)references/rule-fields.md (opens in a new tab)references/using-shipped-rules.md (opens in a new tab)references/writing-project-rules.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mizchi/jev-lint --plugin jev-lintOther plugins' skills for the same job