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.
npx agentmods add skills/bklit/bklit-ui/unit-testsnpx skills add bklit/bklit-ui --skill unit-testsgit clone --depth 1 https://github.com/bklit/bklit-uiWrote 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.
[](https://agentmods.dev/skills/bklit/bklit-ui/unit-tests)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00054 | $0.01025 |
| Opus 5 | $0.00027 | $0.00513 |
| Sonnet 5 | $0.00011 | $0.00205 |
| Haiku 4.5 | $0.00005 | $0.00103 |
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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 112 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 | visx, 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, visx, 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);
});
});
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.
- 4d ago First seen · 112 lines · 54 tokens per session scan A b9b41db323b9
unit-tests is a skill published in the GitHub repository bklit/bklit-ui (1,596 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,025 once invoked, about $0.0003 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.
Other skills, from other repositories
lieflat-charts
一套模板驱动的数据可视化与报告生成 skill,既能严格从 Lupi、Basics、Glance、Maps 与 Interactive gallery 的真实实现生成 HTML 图表,也能从 12 套中英文整页报告模板生成可发布的 HTML 报告;以 Mono 为保底,能按数据语义自动选择内置彩色预设,也支持用户明确提供的自定义色板。地图仅在用户明确要求时启用,同一交付禁止混用色系。.
anyviz
Use when 用户请求选择、创建、改进或统一数据可视化,并需按数据与意图选择图表、主题及 D3.js、ECharts、Mapbox、Three.js、Matplotlib、Plotly 或 ggplot2 技术栈。.
chart-description-writer
Writes a precise, accessible text description of a data visualization — covering the chart type, what it shows, the key finding, and the data range — suitable for publication as a caption, alt-text, or standfirst alongside the chart.
nice-figures
Generate matplotlib figures in the soft-pastel + warm-earth visual register used by AI alignment research blogs (Anthropic-style) — bold sans-serif display titles, scatter overlaid with smoothed trends and shaded confidence bands, minimal axes, '↓better' badges, warm coral/peach/sage/blue palettes, white background by…
nveil
NVEIL is an AI-powered data-processing and visualization toolkit — describe joins, aggregations, pivots, resampling, geocoding, time-series analysis, feature engineering, 2D/3D charts, geospatial maps, voxel/volume rendering, medical imaging, and more in plain language; the toolkit plans remotely and executes entirely…
analytics
Queries local analytics across OrchestKit projects for agent usage, skill frequency, hook timing, team activity, session replay, cost estimation, and model delegation trends. Privacy-safe with hashed project IDs. Supports time-range filtering and comparative analysis. Use when reviewing performance, estimating costs…