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 porcupine-md/jonggrang --skill fixing-flaky-testsgit clone --depth 1 https://github.com/porcupine-md/jonggrangWrote 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/porcupine-md/jonggrang/fixing-flaky-tests)<a href="https://agentmods.dev/skills/porcupine-md/jonggrang/fixing-flaky-tests"><img src="https://agentmods.dev/badge/skills/porcupine-md/jonggrang/fixing-flaky-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/porcupine-md/jonggrang/fixing-flaky-tests"><img src="https://agentmods.dev/badge/skills/porcupine-md/jonggrang/fixing-flaky-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00026 | $0.00810 |
| Opus 5 | $0.00013 | $0.00405 |
| Sonnet 5 | $0.00005 | $0.00162 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
fixing-flaky-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 10d 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 — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Root Cause Categories
1. Timing Dependency
// BUG: assumes operation completes within 100ms
await new Promise(r => setTimeout(r, 100));
expect(result).toBe('done');
// FIX: wait for the actual condition
await vi.waitFor(() => expect(result).toBe('done'), { timeout: 5000 });
// or
await waitFor(() => screen.getByText('Done'));
2. Test Pollution (Shared State)
// BUG: test 1 creates user, test 2 fails because user already exists
it('test 1', () => createUser({ email: '[email protected]' }));
it('test 2', () => createUser({ email: '[email protected]' })); // CONFLICT
// FIX: clean up after each test
afterEach(async () => {
await db.user.deleteMany({ where: { email: '[email protected]' } });
});
// BETTER FIX: use unique values per test
const email = `test-${Date.now()}@example.com`;
3. Async Leak
// BUG: async operation continues after test ends
it('fetches data', () => {
const result = [];
fetchData().then(data => result.push(data)); // not awaited!
// test ends, but fetchData is still running
// it might complete and affect the next test
});
// FIX: always await async operations
it('fetches data', async () => {
const data = await fetchData();
expect(data).toBeDefined();
});
4. Global State / Singleton Pollution
// BUG: EventEmitter accumulates listeners across tests
const emitter = new EventEmitter(); // global singleton
// FIX: reset global state in beforeEach/afterEach
beforeEach(() => { emitter.removeAllListeners(); });
// BETTER: inject dependencies instead of using singletons
5. Order Dependency
// BUG: test B relies on state set by test A
describe('CartService', () => {
it('test A: adds item', () => { cart.add(item); });
it('test B: removes item', () => { cart.remove(item.id); }); // fails if A didn't run
});
// FIX: each test is self-contained
describe('CartService', () => {
beforeEach(() => { cart = new Cart(); }); // fresh state
it('test B: removes item that exists', () => {
cart.add(item); // set up in this test
cart.remove(item.id);
expect(cart.items).toHaveLength(0);
});
});
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.
- 10d ago First seen · 116 lines · 26 tokens per session scan A f4455e9790df
fixing-flaky-tests is a skill published in the GitHub repository porcupine-md/jonggrang (11 stars, last pushed 2d ago), licensed MIT. It adds 26 tokens to every session and 810 once invoked, about $0.0001 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
testing
Skill validation framework PLUS daily test-suite health and regression intelligence. Validates skill conformance (frontmatter, manifest coverage, resolver coverage). Runs the project test suite in tiered phases (unit / evals / integration / system health), classifies failures, and produces a regression-aware report.
verify
Verify that a change really works before you claim completion.
detect-static-dependencies
ACTIVATION PREREQUISITE: the request or discovered target must explicitly identify C#, .NET, .cs, or .csproj; otherwise stay dormant without invoking this skill. USE FOR: locating System.DateTime.Now/UtcNow, System.IO.File/Directory, System.Environment, HttpClient, Console, or Process usage in C#; auditing C# code for…
working-effectively-with-legacy-code
Apply Michael Feathers-inspired legacy-code rules when changing hard-to-test code safely with characterization tests, seams, sprout methods, or wrap methods.
refactoring-guru
Apply Refactoring.Guru-inspired rules when diagnosing code smells, choosing refactoring techniques, and stopping cleanup before uncontrolled redesign.
refactoring
Apply Martin Fowler-inspired refactoring rules when improving existing code structure while preserving observable behavior.