list-rule-test

List and filter test IDs from markuplint rule spec files with statistics.

611|63|Updated Sep 26, 2017
One-click install
npx skills add https://github.com/markuplint/markuplint --skill list-rule-test
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: list-rule-test
Source: https://github.com/markuplint/markuplint/tree/main/.claude/skills/list-rule-test
Command: npx skills add https://github.com/markuplint/markuplint --skill list-rule-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Maintaining consistent test ID prefixes across dozens of rule spec files in the markuplint repository is error-prone. This Skill scans all rule test files to list existing IDs, detect tests missing the mandatory [rule-name-category-NNN] prefix, and help pick the next available ID number.

Core Features & Use Cases

  • Test ID Listing: Enumerates every test ID from packages/@markuplint/rules/src*.spec.ts with file and line references.
  • Filtering and Stats: Filter by rule name or category, show summary statistics by rule and category, or output results as JSON.
  • Missing ID Detection: The --no-id flag surfaces tests lacking the mandatory ID prefix, distinguishing exempt repo-wide meta specs from violations inside rule directories.
  • Use Case: Before adding a new test to the wai-aria rule, run the script with --rule wai-aria to see existing IDs and choose the next available number.

Quick Start

Ask the AI to list all test IDs for a specific rule or to find tests missing their ID prefix in the markuplint rules package.

Frequently Asked Questions about list-rule-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list all test IDs in markuplint rule spec files?▼

Run the script with node .claude/skills/list-rule-test/scripts/list-rule-test.mjs from the repository root. It recursively scans packages/@markuplint/rules/src for .spec.ts files and prints each test ID with its file path and line number.

How to find tests missing the rule-name-category-NNN ID prefix?▼

Use the --no-id flag to show only tests without an ID. Legitimate results are limited to repo-wide meta specs directly under src/; any hit inside a rule directory indicates a test missing its mandatory ID prefix.

Can I filter markuplint test IDs by rule or category?▼

Yes, use --rule <name> to filter by rule name such as wai-aria, or --category <name> to filter by category such as issue. These flags can be combined with --stats or --json for aggregated or machine-readable output.

Does the test ID listing script require external npm dependencies?▼

No, the script uses only Node.js built-in modules (node:fs and node:path) for file traversal and parsing. It runs directly with any modern Node.js runtime without installing additional packages.

What output formats does the rule test listing support?▼

The default output is tab-separated lines of ID, file location, and test name. The --stats flag prints summary counts by rule and category, while --json outputs the full structured test list as JSON.