Agent skill

M07 Concurrency

by fjrevoredo in fjrevoredo/mini-diarium

CRITICAL: Use for concurrency/async. An agent skill from fjrevoredo/mini-diarium.

MITAuto-check passedDevelopment

Install M07 Concurrency

skills CLI
$ npx skills add fjrevoredo/mini-diarium --skill m07-concurrency -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install fjrevoredo/mini-diarium m07-concurrency --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/fjrevoredo/mini-diarium.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/m07-concurrency .claude/skills/m07-concurrency && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
m07-concurrency
GitHub stars
308
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
437 words
Files
5
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

CRITICAL: Use for concurrency/async. An agent skill from fjrevoredo/mini-diarium.

  • Works in 3 steps: What's the workload? → What's the sharing model? → What are the Send/Sync requirements?
  • Concurrency/async
  • SKILL.md covers Core Question, Error → Design Question, Thinking Prompt and Trace Up ↑ (MANDATORY), plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

M07 Concurrency is an agent skill from fjrevoredo/mini-diarium. CRITICAL: Use for concurrency/async. Triggers: E0277 Send Sync, cannot be sent between threads, thread, spawn, channel, mpsc, Mutex, RwLock, Atomic, async, await, Future, tokio, deadlock, race condition, 并发, 线程, 异步, 死锁

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `comparison.md`, `examples/thread-patterns.md` and `patterns/async-patterns.md`).

It sits in Development, covering Async programming. The repository describes itself as: A local-only journal with serious encryption. Free, open source, and never touches the internet. The licence is MIT.

When your agent uses it

  • Concurrency/async
  • Tasks that involve Async programming

Example prompts

  • “/m07-concurrency”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. What's the workload?
  2. What's the sharing model?
  3. What are the Send/Sync requirements?

What it can do on your machine

Read from SKILL.md and the folder at commit eed457f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

M07 Concurrency loads about 1.5k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 437 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from fjrevoredo/mini-diarium at commit eed457f, republished under its MIT licence (© fjrevoredo). 437 words, ~1,548 tokens.

Download SKILL.mdSave it as .claude/skills/m07-concurrency/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
m07-concurrency
description
CRITICAL: Use for concurrency/async. Triggers: E0277 Send Sync, cannot be sent between threads, thread, spawn, channel, mpsc, Mutex, RwLock, Atomic, async, await, Future, tokio, deadlock, race condition, 并发, 线程, 异步, 死锁
user-invocable
false

Concurrency

Layer 1: Language Mechanics

Core Question

Is this CPU-bound or I/O-bound, and what's the sharing model?

Before choosing concurrency primitives:

  • What's the workload type?
  • What data needs to be shared?
  • What's the thread safety requirement?

Error → Design Question

ErrorDon't Just SayAsk Instead
E0277 Send"Add Send bound"Should this type cross threads?
E0277 Sync"Wrap in Mutex"Is shared access really needed?
Future not Send"Use spawn_local"Is async the right choice?
Deadlock"Reorder locks"Is the locking design correct?

Thinking Prompt

Before adding concurrency:

  1. What's the workload?

    • CPU-bound → threads (std::thread, rayon)
    • I/O-bound → async (tokio, async-std)
    • Mixed → hybrid approach
  2. What's the sharing model?

    • No sharing → message passing (channels)
    • Immutable sharing → Arc<T>
    • Mutable sharing → Arc<Mutex<T>> or Arc<RwLock<T>>
  3. What are the Send/Sync requirements?

    • Cross-thread ownership → Send
    • Cross-thread references → Sync
    • Single-thread async → spawn_local

Trace Up ↑ (MANDATORY)

CRITICAL: Don't just fix the error. Trace UP to find domain constraints.

Domain Detection Table
Context KeywordsLoad Domain SkillKey Constraint
Web API, HTTP, axum, actix, handlerdomain-webHandlers run on any thread
交易, 支付, trading, paymentdomain-fintechAudit + thread safety
gRPC, kubernetes, microservicedomain-cloud-nativeDistributed tracing
CLI, terminal, clapdomain-cliUsually single-thread OK
Example: Web API + Rc Error
"Rc cannot be sent between threads" in Web API context
    ↑ DETECT: "Web API" → Load domain-web
    ↑ FIND: domain-web says "Shared state must be thread-safe"
    ↑ FIND: domain-web says "Rc in state" is Common Mistake
    ↓ DESIGN: Use Arc<T> with State extractor
    ↓ IMPL: axum::extract::State<Arc<AppConfig>>
Generic Trace
"Send not satisfied for my type"
    ↑ Ask: What domain is this? Load domain-* skill
    ↑ Ask: Does this type need to cross thread boundaries?
    ↑ Check: m09-domain (is the data model correct?)
SituationTrace ToQuestion
Send/Sync in Webdomain-webWhat's the state management pattern?
Send/Sync in CLIdomain-cliIs multi-thread really needed?
Mutex vs channelsm09-domainShared state or message passing?
Async vs threadsm10-performanceWhat's the workload profile?

Trace Down ↓

From design to implementation:

"Need parallelism for CPU work"
    ↓ Use: std::thread or rayon

"Need concurrency for I/O"
    ↓ Use: async/await with tokio

"Need to share immutable data across threads"
    ↓ Use: Arc<T>

"Need to share mutable data across threads"
    ↓ Use: Arc<Mutex<T>> or Arc<RwLock<T>>
    ↓ Or: channels for message passing

"Need simple atomic operations"
    ↓ Use: AtomicBool, AtomicUsize, etc.

Send/Sync Markers

MarkerMeaningExample
SendCan transfer ownership between threadsMost types
SyncCan share references between threadsArc<T>
!SendMust stay on one threadRc<T>
!SyncNo shared refs across threadsRefCell<T>
Show full SKILL.md (158 more words)Show less

Quick Reference

PatternThread-SafeBlockingUse When
std::threadYesYesCPU-bound parallelism
async/awaitYesNoI/O-bound concurrency
Mutex<T>YesYesShared mutable state
RwLock<T>YesYesRead-heavy shared state
mpsc::channelYesOptionalMessage passing
Arc<Mutex<T>>YesYesShared mutable across threads

Decision Flowchart

What type of work?
├─ CPU-bound → std::thread or rayon
├─ I/O-bound → async/await
└─ Mixed → hybrid (spawn_blocking)

Need to share data?
├─ No → message passing (channels)
├─ Immutable → Arc<T>
└─ Mutable →
   ├─ Read-heavy → Arc<RwLock<T>>
   └─ Write-heavy → Arc<Mutex<T>>
   └─ Simple counter → AtomicUsize

Async context?
├─ Type is Send → tokio::spawn
├─ Type is !Send → spawn_local
└─ Blocking code → spawn_blocking

Common Errors

ErrorCauseFix
E0277 Send not satisfiedNon-Send in asyncUse Arc or spawn_local
E0277 Sync not satisfiedNon-Sync sharedWrap with Mutex
DeadlockLock orderingConsistent lock order
future is not SendNon-Send across awaitDrop before await
MutexGuard across awaitGuard held during suspendScope guard properly

Anti-Patterns

Anti-PatternWhy BadBetter
Arc<Mutex<T>> everywhereContention, complexityMessage passing
thread::sleep in asyncBlocks executortokio::time::sleep
Holding locks across awaitBlocks other tasksScope locks tightly
Ignoring deadlock riskHard to debugLock ordering, try_lock

Async-Specific Patterns

Avoid MutexGuard Across Await
rust
// Bad: guard held across await
let guard = mutex.lock().await;
do_async().await;  // guard still held!

// Good: scope the lock
{
    let guard = mutex.lock().await;
    // use guard
}  // guard dropped
do_async().await;
Non-Send Types in Async
rust
// Rc is !Send, can't cross await in spawned task
// Option 1: use Arc instead
// Option 2: use spawn_local (single-thread runtime)
// Option 3: ensure Rc is dropped before .await

WhenSee
Smart pointer choicem02-resource
Interior mutabilitym03-mutability
Performance tuningm10-performance
Domain concurrency needsdomain-*

© fjrevoredo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in .agents/skills/m07-concurrency of fjrevoredo/mini-diarium.

  • SKILL.md
  • comparison.md
  • examples/thread-patterns.md
  • patterns/async-patterns.md
  • patterns/common-errors.md

Open the folder on GitHubat commit eed457f

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in fjrevoredo/mini-diarium, which our catalogue first saw on October 7, 2026.

Compare with similar skills

M07 Concurrency next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

M07 Concurrency compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
M07 Concurrency this skillfjrevoredo/mini-diarium3081 repos~1.5kAutomated safety check: PassMIT
YugabyteDB ASH Instrumentationyugabyte/yugabyte-db11k—~4.5kAutomated safety check: PassCustom licence
Mirage VFS Adapter Authoringstrukto-ai/mirage3.7k—~2.5kAutomated safety check: PassApache-2.0
Golang Patternsantoniopaya22/go-rest-template1729 repos~3.5kAutomated safety check: PassNone
Rust Async Patternsdiodeme/Gold-Band14310 repos~3.1kAutomated safety check: PassAGPL-3.0
Swift Concurrencyhenrypldev/react-native-nitro-mlx1003 repos~3.1kAutomated safety check: PassMIT

Similar skills

  • YugabyteDB ASH Instrumentation

    yugabyte/yugabyte-db

    Procedure for adding or changing YugabyteDB Active Session History wait states in TServer and DocDB C++ code, including the macro to use for sync and async paths.

    11k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.

    3.7k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Golang Patterns

    antoniopaya22/go-rest-template

    Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.

    172 GitHub starsUsed in 9 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Rust Async Patterns

    diodeme/Gold-Band

    Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.

    143 GitHub starsUsed in 10 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Swift Concurrency

    henrypldev/react-native-nitro-mlx

    Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or…

    100 GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Rust Engineer

    farm-fe/farm

    Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions.

    5.6k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed

More from fjrevoredo/mini-diarium

All 41 skills in this repo
  • Manual Planning

    fjrevoredo/mini-diarium

    Create, update, review, and execute manual Markdown implementation plans when harness planning mode is not being used.

    308 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • M10 Performance

    fjrevoredo/mini-diarium

    CRITICAL: Use for performance optimization. An agent skill from fjrevoredo/mini-diarium.

    308 GitHub starsUsed in 2 repos~1k tokens
    Auto-check passed
  • Solidjs

    fjrevoredo/mini-diarium

    SolidJS framework development skill for building reactive web applications with fine-grained reactivity.

    308 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Tauri V2

    fjrevoredo/mini-diarium

    Tauri v2 cross-platform app development with Rust backend. An agent skill from fjrevoredo/mini-diarium.

    308 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Exploration Mode

    fjrevoredo/mini-diarium

    Enter exploration mode: a thinking partner for researching and thinking through ideas and problems before implementation.

    308 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Coding Guidelines

    fjrevoredo/mini-diarium

    A skill your agent uses when asking about Rust code style or best practices.

    308 GitHub starsUsed in 1 repo~759 tokens
    Auto-check passed

Categories

Questions about M07 Concurrency

What does M07 Concurrency do?

CRITICAL: Use for concurrency/async. An agent skill from fjrevoredo/mini-diarium. M07 Concurrency is an agent skill from fjrevoredo/mini-diarium. CRITICAL: Use for concurrency/async.

When should I use M07 Concurrency?

M07 Concurrency fits situations like: concurrency/async; tasks that involve Async programming.

How do I install M07 Concurrency in Claude Code?

Run `npx skills add fjrevoredo/mini-diarium --skill m07-concurrency -a claude-code`. Or copy the skill folder (.agents/skills/m07-concurrency in fjrevoredo/mini-diarium) into .claude/skills/m07-concurrency in your project. Claude Code loads it when a task matches its description.

How do I install M07 Concurrency in Codex?

Run `npx skills add fjrevoredo/mini-diarium --skill m07-concurrency -a codex`. Or copy the skill folder (.agents/skills/m07-concurrency in fjrevoredo/mini-diarium) into .agents/skills/m07-concurrency in your project. Codex loads it when a task matches its description.

Can I use M07 Concurrency in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fjrevoredo/mini-diarium --skill m07-concurrency -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/m07-concurrency, .gemini/skills/m07-concurrency, .github/skills/m07-concurrency and .opencode/skills/m07-concurrency in your project.

What does M07 Concurrency need to run?

SKILL.md names no scripts, command-line tools or credentials: M07 Concurrency is instructions for the agent only.

Does M07 Concurrency access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is M07 Concurrency safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does M07 Concurrency use?

M07 Concurrency is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does M07 Concurrency use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to M07 Concurrency?

Skills that share tags, products or a category with M07 Concurrency: YugabyteDB ASH Instrumentation (yugabyte/yugabyte-db, 11k stars), Mirage VFS Adapter Authoring (strukto-ai/mirage, 3.7k stars), Golang Patterns (antoniopaya22/go-rest-template, 172 stars) and Rust Async Patterns (diodeme/Gold-Band, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains M07 Concurrency?

fjrevoredo (a GitHub user) maintains it in fjrevoredo/mini-diarium, which has 308 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 9, 2026.

Source: fjrevoredo/mini-diarium on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.