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 skills add ANcpLua/ancplua-claude-plugins --skill improving-weak-testsgit clone --depth 1 https://github.com/ANcpLua/ancplua-claude-pluginsWrote 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/ancplua/ancplua-claude-plugins/improving-weak-tests)<a href="https://agentmods.dev/skills/ancplua/ancplua-claude-plugins/improving-weak-tests"><img src="https://agentmods.dev/badge/skills/ancplua/ancplua-claude-plugins/improving-weak-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.
<a href="https://agentmods.dev/skills/ancplua/ancplua-claude-plugins/improving-weak-tests"><img src="https://agentmods.dev/badge/skills/ancplua/ancplua-claude-plugins/improving-weak-tests.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00075 | $0.01332 |
| Opus 5.5 | $0.00030 | $0.00533 |
| Sonnet 5.5 | $0.00015 | $0.00266 |
| Haiku 4.5 | $0.00007 | $0.00133 |
Grade A, and why
improving-weak-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 19d 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 — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Improving Weak Tests
Core principle
Every rewrite must answer: what plausible mutation does the new test catch that the old one did not? If you cannot name that mutation in one sentence, the rewrite is not done.
The catalogue below is written in TypeScript against jest/vitest matchers
(toEqual, toHaveBeenCalledWith, expect.any), but the weak-assertion
patterns are language-agnostic — the same rewrites apply to pytest in Python
(see the pytest note under rule 1).
The catalogue
1. toBeTruthy() → exact shape
// WEAK
expect(await saveUser(input)).toBeTruthy();
// STRONG
const result = await saveUser(validInput);
expect(result).toEqual({
id: expect.any(String),
email: validInput.email,
createdAt: expect.any(Date),
});
Catches: saveUser returning {} or echoing the input.
The same weakness in pytest is a bare truthy assert; rewrite it to pin the
exact shape:
# WEAK
assert save_user(valid_input)
# STRONG
from datetime import datetime
result = save_user(valid_input)
assert result.email == valid_input.email
assert isinstance(result.id, str)
assert isinstance(result.created_at, datetime)
2. "mock was called" → state + args + output
// WEAK
await vm.saveUser(input);
expect(httpClient.post).toHaveBeenCalled();
// STRONG
await vm.saveUser(input);
expect(httpClient.post).toHaveBeenCalledWith(`${baseUrl}/users`, input);
expect(vm.users()).toContainEqual(expect.objectContaining({ email: input.email }));
expect(vm.isFormVisible()).toBe(false);
expect(vm.errorMessage()).toBeNull();
Catches: the handler not reloading, not closing the form, or silently failing.
3. Happy path only → add failure path + negative space
it('keeps form open and exposes error when create fails', async () => {
vm.openCreateForm();
const promise = vm.saveUser(validInput);
httpTesting.expectOne('POST', `${baseUrl}/users`)
.error(new ProgressEvent('error'));
await promise;
expect(vm.isFormVisible()).toBe(true);
expect(vm.errorMessage()).toMatch(/create failed|error/i);
expect(vm.isSaving()).toBe(false);
expect(vm.users()).toEqual([]);
});
it('does not issue a write when input is invalid', async () => {
const promise = vm.saveUser(invalidInput);
await promise;
httpTesting.expectNone('POST', `${baseUrl}/users`);
expect(vm.errorMessage()).toMatch(/invalid/i);
});
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.
- 19d ago First seen · 203 lines · 75 tokens per session scan A 83c8237eaaa4
improving-weak-tests is a skill published in the GitHub repository ANcpLua/ancplua-claude-plugins (6 stars, last pushed 2d ago), licensed MIT. It adds 75 tokens to every session and 1,332 once invoked, about $0.0003 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-10-01.
Other skills, from other repositories
test-master
Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
dart-test
DART Test: unit tests, integration tests, CI validation, and debugging.
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.