Backend Concurrency Mechanics
Use when the user asks about race conditions, data races, deadlocks, mutex vs atomic, memory model, thread pool sizing, virtual threads, goroutines vs threads or blocking the event loop. Produces an explanation of runtime concurrency mechanics with fixes. Not for distributed locks (use backend-distributed-locking).
Install
npx skills add j4flmao/agent-skills --skill backend-concurrency-mechanicsgit clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/universal/concurrency ~/.claude/skills/backend-concurrency-mechanicsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Concurrency Mechanics
## Purpose
Pick the right concurrency model for a workload and write shared-state code that is correct under the language's memory model. Most production concurrency bugs come from unsynchronized shared state, blocking an event loop, or unbounded parallelism; this skill targets those.
## Agent Protocol
### Trigger
Exact user phrases: "race condition", "data race", "goroutine vs thread", "event loop blocking", "memory barrier", "memory model", "mutex vs atomic", "deadlock", "thread pool sizing", "virtual threads", "async vs threads".
### Input Context
- Language/runtime and version (Go, Java 21+, Node.js, Python, Rust, .NET).
- Workload type: I/O-bound, CPU-bound, or mixed.
- The shared state or code path that misbehaves; any race detector output.
### Output Artifact
Explanation of the execution model plus corrected code. No files unless requested.
### Response Format
```
Model: {OS threads | M:N (goroutines/virtual threads) | event loop}
Workload: {I/O-bound | CPU-bound}
Shared state: {what} -> {mutex | atomic | channel/actor | immutable copy}
Bound: {pool size / semaphore N}
Verify: {go test -race | jcstress | stress test}
```
## Execution Models
| Model | Examples | Scheduling | Cost per unit | Blocking call behaviour |
|---|---|---|---|---|Details
- Skill name
backend-concurrency-mechanics- Repository
- j4flmao/agent-skills
- Path
skills/backend/universal/concurrency/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Backend Concurrency Mechanics skill do?
Use when the user asks about race conditions, data races, deadlocks, mutex vs atomic, memory model, thread pool sizing, virtual threads, goroutines vs threads or blocking the event loop. Produces an explanation of runtime concurrency mechanics with fixes. Not for distributed locks (use backend-distributed-locking).
How do I install the Backend Concurrency Mechanics skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill backend-concurrency-mechanics. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Backend Concurrency Mechanics popular?
It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.
Related skills
Agent Observability
45j4flmao/agent-skills
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
AI Agent Architectures
45j4flmao/agent-skills
Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).
AI Agent Core Loop
45j4flmao/agent-skills
Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).
Backend Cqrs Patterns
45j4flmao/agent-skills
Use when the user asks about CQRS, splitting read and write models, command and query handlers, read models, materialized views or projections for reporting. Produces a CQRS design with handlers and projection updates. Not for event stores (use backend-event-sourcing).
Backend Clean Architecture
45j4flmao/agent-skills
Use when the user asks where code belongs, clean architecture, hexagonal, ports and adapters, domain vs application vs infrastructure layer, or service vs repository. Produces a layer map and dependency rules. Not for GoF pattern choice (use design-patterns) or DDD modeling (use architecture-domain-driven-design).
Backend Data Masking
45j4flmao/agent-skills
Use when the user asks about PII masking, redaction, field-level encryption, tokenization, anonymization or pseudonymization, GDPR erasure or masking production data for test environments. Produces a data protection plan with code. Not for encryption at rest and key management (use security-data-security).
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.