Skip to complete skill
Free community skill@KingBootoshi

Meaningful-test ESLint rules

Independently compiled by XSkills from public material by KingBootoshi.

Turn one of KingBootoshi's recurring weak-test patterns into a custom ESLint rule that prevents an agent from finishing through that pattern.

Skill brief

Is this the right skill?

Use it when

  • You see the same low-value testing pattern recur in agent-authored changes.
  • You can express the pattern structurally in the repository's lint tooling.
  • You can validate the rule against representative positive and negative fixtures before blocking work.

What you get

  • Selected source pattern and reported severity
  • Installed rule or honest proposal-only fallback
  • Fixture and bounded-suite validation

Workflow

5 moves
  1. 01

    Name one weak pattern

  2. 02

    Build and wire the rule

  3. 03

    Preserve the reported severity

  4. 04

    Force a deliberate repair

  5. 05

    XSkills adaptation: validate the rule

Complete instruction set

Complete SKILL.md

Read every instruction below or copy the complete file directly into your agent.

Meaningful-test ESLint rules

Source workflow

Select the weak pattern

Choose a recurring, mechanically recognizable test pattern that agents use to finish without proving behavior.

KingBootoshi's central example is mock echo: configure a mock to return a value, call the subject, then compare `result.data` with the exact value supplied to the mock.

The source's implemented set also includes:

  • no-unscoped-service-test: flag a test that creates a mock Supabase client without asserting organization or user scope;
  • require-error-code-assertion: flag a failed-result test that checks only `ok === false` without the specific error code;
  • no-mock-echo: flag the mock-echo comparison.

Build and wire the custom rules

Have the coding agent create the repository-specific ESLint rules and wire them into the project's lint gate. Preserve the source's reported configuration: no-unscoped-service-test is an error; require-error-code-assertion and no-mock-echo are warnings.

Let the gate force a real repair

When the rule reports, the agent cannot finish through that prohibited pattern. It must replace the weak test with one that clears the repository's rule. The source presents this enforcement as the mechanism that makes the slop pattern impossible to commit.

XSkills operational adaptations

Preflight the repository's ESLint version, parser, configuration, custom-rule location, rule-test harness, and lint command. If custom rules cannot be loaded, return the rule design and exact missing integration step instead of claiming the gate is wired.

Create positive and negative fixtures for the selected syntax relationship, run the rule tests, and audit a bounded sample of the real suite before relying on the rule. Use structural syntax relationships rather than broad text matching. These validation mechanics come from XSkills, not the source.

XSkills safety adaptations

Do not create an autofix that invents assertions, test data, or behavior. Require authorization before changing repository-wide lint enforcement. Keep ordinary tests and review in the quality gate; a custom ESLint rule proves only that its prohibited static pattern was not detected.

Return

Return the selected source pattern, installed or proposed rule, reported severity, fixture and sample-audit results, lint output, and any missing integration capability.

Source attribution

Independently compiled by XSkills from KingBootoshi's post about using custom ESLint rules to prevent low-value agent-authored tests. KingBootoshi did not author or review this skill. Capability fallback, fixture and sample validation, structural-detection guidance, no-autofix boundary, repository-change authority, and the lint-versus-behavior limitation are XSkills adaptations. Attribution does not imply endorsement.

Keep exploring

Related agent skills

Browse software engineering skills

Turn an X workflow into your own skill.

Paste a public X post and get a free SKILL.md.

Build one free

Evidence and package

Source, changes, and version

Source

XSkills independently compiled this from public material by KingBootoshi. Attribution does not imply endorsement.

Open source evidence ↗

What XSkills changed

XSkills additions are labeled in the complete SKILL.md.

Limitations

  • Do not claim custom lint rules guarantee meaningful tests or complete behavioral coverage.
  • Do not block the repository until positive, negative, and edge fixtures pass and real-suite findings are reviewed.
  • Do not add autofixes that invent assertions or alter test semantics.

Version

Package version
Not assigned
Fingerprint
80c7001413f0
Last reviewed
Not recorded
License
Not specified