bklit-ui: Skill for Claude Code

.agents/skills/unit-tests/SKILL.md

unit-tests is a skill for Claude Code, Codex from bklit/bklit-ui. It costs 54 tokens per session (1,031 once invoked), scanned A, original, MIT.

Testing guidance for bklit-ui, a chart-building codebase, focused on unit tests: small tests of individual functions or modules. It recommends testing stable behavior and skipping fragile tests that add little value.

In plain words
What is it for?
Use it when deciding whether to add tests or writing tests with tools such as Vitest or Jest. It is especially relevant for formatters, parsers, calculations, exporters, and edge cases.
Why use it?
It helps contributors avoid spending time on brittle tests or adding tests only to increase coverage. The guidance focuses testing on behavior that can silently break.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is bklit/bklit-ui's own configuration. It tells Claude Code and Codex how to work on bklit-ui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bklit-ui configures →

About the project

Bklit UI is an open-source collection of customizable interface components and charts for building React applications with shadcn. Developers use it to add data visualizations such as funnels, gauges, maps, financial charts, and other interactive displays. The catalogue add-ons provide workflows for using its components and chart registry.

bklit/bklit-ui · 1,898 stars · on GitHub · bklit.com

Reuse

Borrowing it

Nothing to install: this file belongs to bklit/bklit-ui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bklit/bklit-ui/main/.agents/skills/unit-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bklit/bklit-ui

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 unit-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/bklit/bklit-ui/unit-tests/github.svg)](https://agentmods.dev/skills/bklit/bklit-ui/unit-tests)
Your own site
<a href="https://agentmods.dev/skills/bklit/bklit-ui/unit-tests"><img src="https://agentmods.dev/badge/skills/bklit/bklit-ui/unit-tests/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 unit-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/bklit/bklit-ui/unit-tests"><img src="https://agentmods.dev/badge/skills/bklit/bklit-ui/unit-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,031 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. Third-party audits
  • Socket pass 15 Oct 2026
  • Snyk pass 15 Oct 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original 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.00054 $0.01031
Opus 5.5 $0.00022 $0.00412
Sonnet 5.5 $0.00011 $0.00206
Haiku 4.5 $0.00005 $0.00103

Measured 6d ago against content hash b52d6ed49e26, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

unit-tests 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 6d ago.

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.

.agents/skills/unit-tests/SKILL.md · 114 lines

How it starts

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

Unit Tests (bklit-ui)

Read this skill before proposing or writing tests. Default stance: fewer, higher-signal tests.


When to add tests

Add tests when they lock in behavior that is easy to break silently:

Worth testing Why
Pure functions / modules Stable inputs → outputs; fast; no DOM
Formatters, parsers, scale math, bounds Regression on string/number output is user-visible
Codegen / export / registry helpers Output shape is the contract
Non-obvious edge cases Empty data, reversed ranges, clamping

Examples in this repo: chart-formatters.test.ts, highlight-segment-bounds.test.ts, animation.test.ts, apps/web/lib/studio/__tests__/*.


When NOT to add tests (unless explicitly requested)

Do not add tests just to increase coverage or “be thorough”:

Skip Why
React component render smoke tests SVG, motion, portals → brittle; manual/docs check is cheaper
memo() / guard extractions (#65-style) Structural perf refactors; output unchanged; RTL mount assertions are heavy
Default prop passthrough formatValue = intFmt — types + formatter tests cover it
Third-party library behavior Don’t re-test d3, Motion, or React
Trivial getters / one-line wrappers No regression signal
Snapshot entire chart SVG/JSX High churn, low signal

If the user asks “should we test X?” — say no when X falls in this table, and suggest a lighter alternative (pure helper test, manual check, CI build).


Repo conventions

Runner: Node built-in test runner + tsx (not Jest/Vitest unless the repo adopts them later).

pnpm test              # root — turbo runs packages with a test script
pnpm --filter @bklitui/ui test
cd apps/web && pnpm test

Place tests: **/__tests__/**/*.test.ts next to the code under test.

Pattern:

import assert from "node:assert/strict";
import { describe, it } from "node:test";
import { myFn } from "../my-module";

describe("myFn", () => {
  it("handles empty input", () => {
    assert.equal(myFn([]), expected);
  });
});

Read the full file on GitHub · 114 lines

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. 6d ago Changed b52d6ed49e26
  2. 21d ago Changed · +2 lines d9124fc04387
  3. 2mo ago First seen · 112 lines · 54 tokens per session scan A b9b41db323b9

Subscribe to this mod's changes

unit-tests is a skill published in the GitHub repository bklit/bklit-ui (1,898 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 1,031 once invoked, about $0.0002 per session on Opus 5.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.

Related

unit-tests compared with skills from other repositories

unit-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
unit-testsbklit/bklit-uiSkill1.9k5d agoMITA54Claude Code, Codex
chart-defaultsag-grid/ag-chartsSkill489todaynoneA60Claude Code, Codex
write-testsuhop/console-toolkitSkill1015d agoBSD-3-ClauseA31Claude Code
oma-refactorgracefullight/krdsSkill471mo agononeA71Claude Code, Codex
oma-debuggracefullight/krdsSkill471mo agononeA42Claude Code, Codex
test-masterJeffallan/claude-skillsSkill12k7d agoMITA104Claude Code
migrate-xunit-to-xunit-v3dotnet/skillsSkill5.8kyesterdayMITA149Claude Code