vibe-concurrent-test-safety

vibe-concurrent-test-safety is a skill for Claude Code from ash1794/vibe-engineering. It costs 42 tokens per session (649 once invoked), scanned A, original, MIT.

A testing checklist for concurrency safety, meaning safe behavior when several goroutines or asynchronous operations run at the same time. It focuses on races, shared mock state, and cleanup order.

In plain words
What is it for?
Use it when writing or debugging tests with goroutines, async work, shared mocks, daemons, servers, or the Go race detector.
Why use it?
It helps find test bugs that cause intermittent failures, especially when background processes access shared data or are stopped during cleanup.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the vibe-engineering plugin — 38 skills shipped together

Install

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.

agentmods
npx agentmods add skills/ash1794/vibe-engineering/concurrent-test-safety
Any agent
npx skills add ash1794/vibe-engineering --skill concurrent-test-safety
Clone the repo
git clone --depth 1 https://github.com/ash1794/vibe-engineering

Made for: Claude Code.

Or install vibe-engineering, the plugin that ships this one along with the rest of its 38 skills.

Wrote 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.

agentmods badge for vibe-concurrent-test-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/ash1794/vibe-engineering/concurrent-test-safety.svg)](https://agentmods.dev/skills/ash1794/vibe-engineering/concurrent-test-safety)
Your own site
<a href="https://agentmods.dev/skills/ash1794/vibe-engineering/concurrent-test-safety"><img src="https://agentmods.dev/badge/skills/ash1794/vibe-engineering/concurrent-test-safety.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 649 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash 037799cff1a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 6d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/vibe-engineering/skills/concurrent-test-safety/SKILL.md · 91 lines

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 -race flag 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 -race flag)
  • 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 (<-done or wg.Wait())
  • No time.Sleep for synchronization (use channels, waitgroups, or polling)
  • Assertions use Eventually or polling for async results
  • Test passes with -race flag
  • Test passes when run 100 times (-count=100)

Read the full file on GitHub · 91 lines

Changes

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.

  1. 6d ago First seen · 91 lines · 42 tokens per session scan A 037799cff1a6

Subscribe to this mod's changes

vibe-concurrent-test-safety is a skill published in the GitHub repository ash1794/vibe-engineering (10 stars, last pushed 3mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

verify

Runs this project's check chain through scripts/verify.py and reads the receipt it writes. Fires when tracked changes are finished, when the user asks whether work passes, before a commit, and before reporting a task done. Stays dormant in repositories with no detectable check chain, during read-only audits, and for…

cwinvestments/memstack · 71 tokens

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

create-test-plan

Analyze what changed and generate a structured test plan at .turbo/test-plans/ .md covering four escalating levels: basic functionality, complex operations, adversarial testing, and cross-cutting scenarios. Use when the user asks to "create a test plan", "plan tests", "what should I test", "generate test scenarios"…

tobihagemann/turbo · 87 tokens

feature-verify

Feature verification (READ-ONLY, P0-P5). Use when: verifying feature behavior after deployment, validating API responses, diagnosing production issues, post-deploy smoke test. Not for: modifying data (use feature-dev), code review (use codex-review-fast), writing tests (use codex-test-gen), security audit (use…

sd0xdev/sd0x-harness · 75 tokens

test-review

Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report.

sd0xdev/sd0x-harness · 56 tokens

test-deep

Context-aware test orchestration. Use when: smart test selection, failure triage, progressive test ladder, test failure analysis. Not for: writing tests (use post-dev-test), reviewing tests (use codex-test-review), generating tests (use codex-test-gen), full manual run (use verify). Output: test results + triage…

sd0xdev/sd0x-harness · 77 tokens