Skip to content
Back to skills

Bench Virtual Rule

ASecurity

Mirror a preset virtual rule (selectors under `nodeRules` in preset.html-standard.jsonc and similar) into bench/config.ts so the benchmark exercises it. Use when a new disallowed-element / similar selector lands in a preset and the matching nu fixtures remain stuck at nu-only despite the new rule existing in markuplint. Trigger keywords: virtual rule, nodeRules, disallowed-element, preset html-standard, bench config mirror, rule does not fire on bench, preset rule not exercised.

  • 632 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 7, 2026
developmentnode

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add markuplint/markuplint --skill bench-virtual-rule --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bench Virtual Rule?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bench Virtual Rule
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/markuplint-bench-virtual-rule/badge)](https://www.skillsdirectory.com/skills/markuplint-bench-virtual-rule)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bench-virtual-rule
metadata:
  internal: true
description: >
  Mirror a preset virtual rule (selectors under `nodeRules` in
  preset.html-standard.jsonc and similar) into bench/config.ts so
  the benchmark exercises it. Use when a new disallowed-element /
  similar selector lands in a preset and the matching nu fixtures
  remain stuck at nu-only despite the new rule existing in markuplint.
  Trigger keywords: virtual rule, nodeRules, disallowed-element,
  preset html-standard, bench config mirror, rule does not fire on bench,
  preset rule not exercised.
---

# Bench Virtual Rule Mirror Skill

`bench/config.ts` does **not** `extends: ['markuplint:html-standard']`.
It curates rules explicitly so the bench surface stays scoped to
nu-validator capability. Consequence: any new entry in a preset's
`nodeRules[]` is invisible to the benchmark until the same selectors
are mirrored into `bench/config.ts`. Symptom: fixtures the new
virtual rule should detect remain at `nu-only` and look like a
markuplint coverage gap when the rule already exists.

## Procedure

1. Add the selector(s) to the relevant preset
   (`preset.html-standard.jsonc` or similar).
2. Mirror the same selectors into `bench/config.ts` `nodeRules[]`
   with a comment naming the source preset rule (e.g.
   `// Mirrors html-standard/no-duplicate-charset`).
3. Run `yarn bench:update:ml`.
4. Verify the target fixtures flipped from `nu-only` →
   `match-error`. If they didn't, the selectors don't actually
   match those fixtures — check selector syntax (caveats below).
5. If the rule does not map onto any nu-validator capability, skip
   step 2 and add a `// not mirrored: <reason>` comment to the
   preset rule's JSDoc so the next maintainer knows it was a
   conscious decision.

## Selector caveats

- HTML attribute *names* are matched ASCII case-insensitively
  (`[charset]` matches `<meta CHARSET>`). Use lowercase to match
  HTML's normative form.
- The `i` flag (e.g. `[name="description" i]`) only applies to
  attribute *values* — it is unnecessary for the *name*, which is
  already case-folded for HTML.
- Sibling selectors (`~`) only match elements after the anchor.
  Coexistence-style constraints typically need both directions
  (`a ~ b` *and* `b ~ a`) so the rule fires regardless of source order.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.