test-coverage

test-coverage is a skill for Claude Code, Codex from scott-fryxell/brayness. It costs 78 tokens per session (1,735 once invoked), scanned A, original, MIT.

A testing workflow for Vue 3 JavaScript projects that uses Vitest, a test runner, plus tools for simulating a browser and testing Vue components.

In plain words
What is it for?
It is for testing Vue components and composables, creating mocks, improving coverage, and prioritising refactors based on test results.
Why use it?
It helps write or repair tests, inspect V8 code coverage, and find areas where tests are weak or missing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit It is for testing Vue components and composables, creating mocks, improving coverage, and prioritising refactors based on test results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scott-fryxell/brayness/test-coverage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add scott-fryxell/brayness --skill test-coverage
Clone the repo
git clone --depth 1 https://github.com/scott-fryxell/brayness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/scott-fryxell/brayness/test-coverage/github.svg)](https://agentmods.dev/skills/scott-fryxell/brayness/test-coverage)
Your own site
<a href="https://agentmods.dev/skills/scott-fryxell/brayness/test-coverage"><img src="https://agentmods.dev/badge/skills/scott-fryxell/brayness/test-coverage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-coverage

Your own site · 80×15
<a href="https://agentmods.dev/skills/scott-fryxell/brayness/test-coverage"><img src="https://agentmods.dev/badge/skills/scott-fryxell/brayness/test-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01735
Opus 5 $0.00039 $0.00868
Sonnet 5 $0.00016 $0.00347
Haiku 4.5 $0.00008 $0.00173

Measured 9d ago against content hash 7edc90743a45, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

test-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/lib/coverage-metrics.js, scripts/prioritize-refactor-risk.js, scripts/summarize-coverage.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/test-coverage/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tests, coverage, and refactor risk

Canonical reference: work/realness (@realness.online/web). Run every command below from that directory.

Match tests/**/*.spec.js there. Do not introduce Jest, React Testing Library, TypeScript test files, or co-located *.test.ts.

Two jobs:

  1. Write specs - patterns below; detail in references/web-realness.md
  2. Prioritize - npm run test:risk before refactors; not a blind chase for 100%

Stack

Piece What we use
Runner Vite Plus - vp test, import ... from 'vite-plus/test'
Engine Vitest (vite-plus-test alias)
DOM happy-dom
Vue @vue/test-utils - prefer shallowMount
Language JavaScript + JSDoc
Coverage V8, 80% global, all: true

Commands

vp test run --reporter=dot          # npm run test
vp test watch                       # npm run test:watch
vp test run --coverage              # npm run test:coverage
vp test run --bail=1 --reporter=dot # npm run test:fail-fast
npm run test:risk                   # coverage + fallow + risk report

Pre-commit: vp check --fix && vp run type && vp test run.

Writing specs

Layout

  • All specs in tests/**/*.spec.js mirroring src/ (not co-located)
  • describe('@/utils/itemid', ...) or view/component name
  • @/ -> src/; @@/ -> tests/mocks/
  • Config: vite.config.js -> test block; setup: tests/setup.js, tests/mocks/

Skeleton

import { describe, it, expect, vi, beforeEach } from 'vite-plus/test'
import { fn_under_test } from '@/utils/example'

describe('@/utils/example', () => {
  beforeEach(() => {
    vi.clearAllMocks()
  })

  it('describes behavior in plain language', () => {
    expect(fn_under_test('input')).toBe('output')
  })
})

Test behavior, not internals (JS style: AGENTS.md).

Key patterns

Pattern Approach Reference spec
Pure utils Input/output, nested describe tests/utils/itemid.spec.js
Module mocks Top-level vi.mock(); vi.clearAllMocks() in beforeEach tests/utils/itemid.spec.js
Vue components shallowMount, stubs, semantic queries tests/components/account/as-notifications.spec.js
Composable mocks vi.hoisted() refs for vi.mock closures tests/views/Account.spec.js
Composables with_setup() + mount(defineComponent(...)) tests/use/poster.spec.js
Async errors await expect(...).rejects.toThrow() tests/utils/itemid.spec.js

Read the full file on GitHub · 204 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 204 lines · 78 tokens per session scan A 7edc90743a45

Subscribe to this mod's changes

test-coverage is a skill published in the GitHub repository scott-fryxell/brayness (120 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,735 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.