mracal/vibe-engineering/concurrent-test-safety
Claude Code and agent skill by mracal/vibe-engineering
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Audits tests for concurrency safety — race conditions, shared mock state, cleanup ordering. Use when writing tests that involve goroutines, async operations, or shared mutable state.
Install
npx vskill@latest install mracal/vibe-engineering/concurrent-test-safetySKILL.md
The same SKILL.md was published earlier as mracal/vibe-engineering/concurrent-test-safety.
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
2. Missing Context Cancellation Before Cleanup
3. Assertions on Timing
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)
Output Format
Concurrent Test Safety Audit: [Test File]
Issues Found: X
| # | Issue | Line | Fix | |
|---|---|---|---|---|
| 1 | Direct mock access | :42 | Use mock.RequestCount() | |
| 2 | Missing cancel before Close | :15 | Add cancel() before defer |
Suggested Fixes
[Code snippets for each fix]
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/concurrent-test-safety/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mracal/vibe-engineering/concurrent-test-safety)