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 mracal/vibe-engineering --skill concurrent-test-safetygit clone --depth 1 https://github.com/mracal/vibe-engineeringWrote 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/mracal/vibe-engineering/concurrent-test-safety)<a href="https://agentmods.dev/skills/mracal/vibe-engineering/concurrent-test-safety"><img src="https://agentmods.dev/badge/skills/mracal/vibe-engineering/concurrent-test-safety.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.1 | $0.00042 | $0.00649 |
| Opus 5 | $0.00021 | $0.00324 |
| Sonnet 5 | $0.00008 | $0.00130 |
| Haiku 4.5 | $0.00004 | $0.00065 |
Grade A, and why
vibe-concurrent-test-safety 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 8d 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.
This is a copy
100% identical to vibe-concurrent-test-safety — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
vibe-concurrent-test-safety
Flaky tests are almost always concurrency bugs in the test, not the code.
When to Use This Skill
- Writing tests that launch goroutines or async operations
- Tests use shared mock objects accessed by multiple goroutines
- Tests that fail intermittently ("flaky")
- After adding
-raceflag and getting failures - Tests that involve daemon/server startup and shutdown
When NOT to Use This Skill
- Purely synchronous tests with no concurrency
- Tests that are already race-free (verified with
-raceflag) - Simple mock-based tests with single-threaded access
Common Concurrency Bugs in Tests
1. Direct Mock State Access
// BAD: Race condition -- mock.Requests accessed while goroutine writes
go daemon.Run(ctx)
time.Sleep(100 * time.Millisecond)
assert.Equal(t, 3, len(mock.Requests)) // RACE!
// GOOD: Thread-safe accessor
go daemon.Run(ctx)
time.Sleep(100 * time.Millisecond)
assert.Equal(t, 3, mock.RequestCount()) // Safe
2. Missing Context Cancellation Before Cleanup
// BAD: Close bus while daemon goroutine still using it
go daemon.Run(ctx)
defer bus.Close() // daemon may still be writing!
// GOOD: Cancel context first, wait, then cleanup
go daemon.Run(ctx)
defer func() {
cancel() // Signal daemon to stop
<-daemon.Done() // Wait for it
bus.Close() // Now safe
}()
3. Assertions on Timing
// BAD: Relies on timing
go startServer()
time.Sleep(50 * time.Millisecond) // May not be enough
resp := callServer()
// GOOD: Wait for readiness
go startServer()
waitForReady(server) // Poll or use channel
resp := callServer()
Audit Checklist
- No direct access to shared mock fields (use accessors)
- Context cancelled before resource cleanup
- Goroutines joined before test ends (
<-doneorwg.Wait()) - No
time.Sleepfor synchronization (use channels, waitgroups, or polling) - Assertions use
Eventuallyor polling for async results - Test passes with
-raceflag - Test passes when run 100 times (
-count=100)
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.
- 8d ago First seen · 91 lines · 42 tokens per session scan A 037799cff1a6
vibe-concurrent-test-safety is a skill published in the GitHub repository mracal/vibe-engineering (3 stars, last pushed 2d ago), licensed MIT. It adds 42 tokens to every session and 649 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to vibe-concurrent-test-safety, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
build-and-runtime-verification
Use when running build, compile, test, launch, or runtime checks and producing a verdict tied to exact commands, exit codes, artifact paths, limitations, and fresh evidence.
evidence-first-debugging
Use when debugging a crash, lỗi, failing game, tool, build, service, script, or reproducible local code failure requires repro or reproduction, giả thuyết or ranked hypotheses, instrumentation, root-cause isolation, a minimal fix, regression proof, and a regression test.
load-soak-capacity-verification
Use when servers or online game services need controlled load, soak, concurrency, capacity, saturation, leak, queue, failover, recovery, and scaling verification with baselines and stop conditions; not for client frame budgets.
platform-device-compatibility-matrix
Use when a game needs a platform and device compatibility matrix across OS, hardware, GPU, memory, resolution, input, network, storefront, certification, test evidence, and support policy; not for store metadata preparation.
playtest-evidence
Use when planning or reviewing game playtests that need structured scenarios, participant context, observations, reproduction evidence, severity, and honest separation of observed findings from conclusions.
qa-test-strategy-and-coverage
Use when a game project, milestone, or feature needs a QA test strategy and coverage matrix across risk, test levels, platforms, environments, ownership, automation, regression, evidence, and exit criteria; not for one playtest session.