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 rileyhilliard/claude-essentials --skill fixing-flaky-testsgit clone --depth 1 https://github.com/rileyhilliard/claude-essentialsWrote 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/rileyhilliard/claude-essentials/fixing-flaky-tests)<a href="https://agentmods.dev/skills/rileyhilliard/claude-essentials/fixing-flaky-tests"><img src="https://agentmods.dev/badge/skills/rileyhilliard/claude-essentials/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/rileyhilliard/claude-essentials/fixing-flaky-tests"><img src="https://agentmods.dev/badge/skills/rileyhilliard/claude-essentials/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.00036 | $0.00984 |
| Opus 5 | $0.00018 | $0.00492 |
| Sonnet 5 | $0.00007 | $0.00197 |
| Haiku 4.5 | $0.00004 | $0.00098 |
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 9d 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 — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
If the current repo has its own rules/skills covering this topic (check .claude/rules/ and repo CLAUDE.md), those take precedence — apply this skill only where they're silent.
Fixing Flaky Tests
Target symptom: Tests pass when run alone, fail when run with other tests.
Diagnose first
Test passes alone, fails with others?
│
├─ Same error every time → Shared state
│ └─ Database, globals, files, singletons
│
├─ Random/timing failures → Race condition
│ └─ See async waiting patterns in `writing-tests` skill
│
└─ Resource errors (port, file lock) → Resource conflict
└─ Need unique resources per test/worker
Quick diagnosis:
- Run failing test 10x alone - does it always pass?
- Run failing test 10x with the suite - same error or different?
- Check error message - mentions port/file/connection?
Shared state (deterministic failures)
Tests pollute state that other tests depend on. Fix by isolating state per test.
| State Type | Isolation Pattern |
|---|---|
| Database | Transaction rollback, savepoints, worker-specific DBs |
| Global variables | Reset in beforeEach/afterEach |
| Singletons | Provide fresh instance per test |
| Module state | jest.resetModules() or equivalent |
| Files | Unique paths per test, temp directories |
| Environment vars | Save/restore in setup/teardown |
Database isolation (most common):
# Python: Savepoint rollback - each test gets rolled back
@pytest.fixture
async def db_session(db_engine):
async with db_engine.connect() as conn:
await conn.begin()
await conn.begin_nested() # Savepoint
# ... yield session ...
await conn.rollback() # All changes vanish
// Jest: Reset mocks between tests
beforeEach(() => {
jest.clearAllMocks()
jest.resetModules() // Clear module cache before test
})
afterEach(() => {
jest.restoreAllMocks() // Restore spied functions
})
What ships with it
3 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.
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.
- 9d ago First seen · 148 lines · 36 tokens per session scan A 1f893063a2ba
fixing-flaky-tests is a skill published in the GitHub repository rileyhilliard/claude-essentials (128 stars, last pushed 21d ago), licensed MIT. It adds 36 tokens to every session and 984 once invoked, about $0.0002 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
Scan C# source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File., Directory., Environment., HttpClient, Console., Process., and other untestable statics. Produces a ranked report of static call sites by frequency. USE FOR: find untestable statics, scan for static dependencies, testability audit…
experiment-iterative-coder
Iterative code refinement through plan → code → evaluate → refine cycles. Runs lint checks (ruff), tests (pytest), and structured self-evaluation each cycle, then diagnoses failures and refines. Decomposes complex tasks into sequential phases, iterates up to 3 times per phase (10 total). Use when: the main agent…
testing-blocks
Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.
symbolic-execution-assistant
Performs symbolic execution to detect potential errors by exploring execution paths, solving path constraints, and generating test inputs. Use when you need to analyze code for bugs like null dereferences, division by zero, buffer overflows, or assertion violations. Also use to generate test inputs that exercise…