/varar:vararfrom Varar
Manages Varar oaths — Markdown documents whose sentences run as tests against code. Handles writing, editing, renaming, and running oaths, step definitions, and drift diagnostics for projects using varar.dev.
Ships in Varar. 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.
An oath is a Markdown document that is also a test. A sentence that matches a step expression runs; a sentence that doesn't is prose. The document is the specification, the test and the documentation at once, so it has to read like something a person wants to read, not a test script wearing a hat. Its reader, a person or an agent, should be able to predict what the system does from it. Write for that reader, not for the test runner.
This skill holds the mechanics: facts about how Varar behaves. Matters of taste — how sentences are phrased, how long expressions are, how tables are shaped, where oaths live, how examples are named — belong to the project.
Before writing or reviewing an oath, look for a ## Varar style section in the
project's AGENTS.md or CLAUDE.md (and any oath-writing guidance near it).
Where it disagrees with a style suggestion below, the project wins. It can
never change the mechanics: those are how the tool works.
If the varar MCP tools are available, use them. Otherwise the same engine is
on the command line (npx @varar/cli …, Node.js required, any project language):
| Need | MCP tool | CLI |
|---|---|---|
| Which steps exist, and how often each is used | list_steps | — |
| What's wrong across the oaths (drift, ambiguity, broken references, near misses) | diagnostics | varar lint (TypeScript projects) |
| Preview a rename | plan_rename | varar rename --dry-run '<old>' '<new>' |
| Rename a step and every sentence it matches | rename_step | varar rename '<old>' '<new>' |
| Accept deliberate drift for one oath | accept_drift | the runner's update flag (below) |
list_steps before writing a step. Reuse an existing one rather
than adding a near-duplicate that splits the vocabulary.diagnostics afterwards..md files after each edit.Hold this one mechanic in mind, because it explains nearly every surprise: each sentence is scanned for the step expression as a case-sensitive substring. Text around the match is skipped.
Narration around a step is free. Unable to choose, the visitor puts these shares in the basket: matches puts these shares in the basket:.
One sentence can run several steps, every non-overlapping match, left to
right: Ben checks out the basket, "[email protected]" completes the payment, and the process order workflow is done.
A sentence can't open with a lowercase expression. The visitor checks out
does not match the visitor checks out, and nothing errors: the sentence
quietly becomes prose. Either write the expression verb-first so the document
supplies the subject (checks out the basket, written after "The visitor …"),
or give the first word an alternation: The/the visitor checks out the basket.
The near-miss diagnostic catches the mistake.
Prose that contains a step's words runs it. A sentence of explanation that
happens to contain the payment is captured becomes an example, with no setup
behind it. Reword the prose.
Matching runs on the raw text, markup included. I withdraw *30* is not
I withdraw 30. A list item's - and a blockquote's > are not part of it.
Sentences split on ., !, ? and hard line breaks, except inside
backticks or double quotes, in numbers (3.14), known abbreviations (e.g.)
or before a lowercase letter.
A paragraph (or list item, or blockquote) with at least one matching sentence
is an example. An example runs from one delimiter to the next, and there are
exactly three: a heading, a thematic break (---), and a paragraph
that matches no step.
--- or a heading.Tables and fenced blocks attach to the paragraph directly above them, and go to the last step matched in it. End that paragraph with the step that takes the table.
A fenced block tagged error marks the example as expected to fail; its
text must appear in the failure message.
Shared setup is a link. A paragraph that is entirely a Markdown link to an oath section splices that section's steps in at that point, sharing state:
[The market](#the-market)
Ben puts these shares in the basket:
It works across files (./other.md#section) and renders as an ordinary link on
GitHub. A link with words around it is just a link. The referenced section stops
running on its own. Keep the chain shallow: one level, two at most.
the balance is {int}, not the balance should be {int}.checks out the basket is safe; a bare checks out will match prose somewhere.A step translates a sentence into a call on the domain code and returns what it saw. Logic belongs in the code under test, not in the step, or the oath verifies the test suite instead of the system.
No conditionals in stimuli or sensors. A step maps words to calls. An if,
a ? : or a lookup that asks "which kind of example is this?" means two rules
share one step, and its parameters mean different things in different examples.
Split it into two steps, each with plain wording.
Read the project's existing step files first and follow them. In TypeScript:
import { steps } from '@varar/varar'
const { stimulus, sensor } = steps(() => ({ account: new Account() }))
stimulus('I deposit {int}', (state, amount) => state.account.deposit(amount))
sensor('the balance is {int}', (state) => state.account.balance)
Each example gets fresh state from the factory. Every port has the same two roles bound to a per-example state; its example project at https://github.com/varar-dev/varar-examples shows the spelling.
A sensor returns what it observed, and Varar compares it with what the document says, failing on the exact span. Its slots are its parameters in order, then a trailing table or doc string:
With one slot or more, returning nothing is an error: a typo'd property must not pass while checking nothing. A whole table can be returned as rows of arrays (every column) or of records (only the columns returned). Reference: https://varar.dev/reference/sensors/
varar.lock records which paragraphs were examples. Commit it. When one
stops matching, the run fails with drift instead of letting a test decay into
documentation.
accept_drift or by re-running with
VARAR_UPDATE=1 (pytest: --varar-update; JUnit/Kotest:
-Dvarar.update=true), and commit varar.lock.A run that records the baseline names any paragraph that became an example: read those lines, since explanation may have been captured by a new expression.
If VARAR_UPDATE=1 seems to do nothing, the variable isn't reaching the test
process. Sandboxed runners (the Cloudflare Workers vitest pool, for instance)
need it passed through the test config.
Oaths run through the project's own test runner (npx vitest run, pytest,
mvn test, go test, …). There is no separate Varar run command. A failure
points at the cell or span in the Markdown that was wrong, so read the document,
not the stack trace.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub varar-dev/varar --plugin vararOther plugins' skills for the same job