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.
Concurrency analysis for tractor's trio-based async primitives.
$ npx skills add goodboy/tractor --skill conc-anal -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install goodboy/tractor conc-anal --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/conc-anal .claude/skills/conc-anal && rm -rf skills-srcUse ~/.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/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .claude/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-analType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add goodboy/tractor --skill conc-anal -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install goodboy/tractor conc-anal --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/conc-anal .agents/skills/conc-anal && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .agents/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add goodboy/tractor --skill conc-anal -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install goodboy/tractor conc-anal --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/conc-anal .cursor/skills/conc-anal && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .cursor/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/goodboy/tractor.git --path .claude/skills/conc-anal--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add goodboy/tractor --skill conc-anal -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install goodboy/tractor conc-anal --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/conc-anal .gemini/skills/conc-anal && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .gemini/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install goodboy/tractor conc-analInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add goodboy/tractor --skill conc-anal -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/conc-anal .github/skills/conc-anal && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .github/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add goodboy/tractor --skill conc-anal -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install goodboy/tractor conc-anal --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/goodboy/tractor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/conc-anal .opencode/skills/conc-anal && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "conc-anal" agent skill from https://github.com/goodboy/tractor/tree/main/.claude/skills/conc-anal into .opencode/skills/conc-anal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "conc-anal", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
conc-analConcurrency analysis for tractor's trio-based async primitives.
Conc Anal is an agent skill from goodboy/tractor. Concurrency analysis for tractor's trio-based async primitives. Trace task scheduling across checkpoint boundaries, identify race windows in shared mutable state, and verify synchronization correctness. Invoke on code segments the user points at, OR proactively when reviewing/writing concurrent cache, lock, or multi-task acm code.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Async programming. The repository describes itself as: distributed structured concurrency. The licence is AGPL-3.0.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0c52f27. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGrepGlobTaskFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pytestFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Conc Anal loads about 2.4k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 984 words of instructions outside code blocks.
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.
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.
The full file from goodboy/tractor at commit 0c52f27, republished under its AGPL-3.0 licence (© goodboy). 984 words, ~2,373 tokens.
.claude/skills/conc-anal/SKILL.md (or your agent's skills folder).Perform a structured concurrency analysis on the target code. This skill should be invoked:
_Cache, locks, events, or
multi-task @acm lifecycle managementIf the user provides a file:line-range or function name, read that code. If not explicitly provided, identify the relevant concurrent code from context (e.g. the current diff, a failing test, or the function under discussion).
List every piece of state that is accessed by multiple tasks. For each, note:
_Cache.values, _Cache.resources,
_Cache.users)Format as a table:
| State | Writers | Readers | Guard |
|---------------------|-----------------|-----------------|----------------|
| _Cache.values | run_ctx, moc¹ | moc | ctx_key lock |
| _Cache.resources | run_ctx, moc | moc, run_ctx | UNGUARDED |¹ moc = maybe_open_context
For each code path through the target, mark every
checkpoint — any await expression where trio
can switch to another task. Use line numbers:
L325: await lock.acquire() ← CHECKPOINT
L395: await service_tn.start(...) ← CHECKPOINT
L411: lock.release() ← (not a checkpoint, but changes lock state)
L414: yield (False, yielded) ← SUSPEND (caller runs)
L485: no_more_users.set() ← (wakes run_ctx, no switch yet)Key trio scheduling rules to apply:
Event.set() makes waiters ready but does NOT
switch immediatelylock.release() is not a checkpointawait sleep(0) IS a checkpointfinally blocks CAN have checkpoints
(unlike asyncio)await inside except blocks can be
trio.Cancelled-maskedWrite out the interleaved execution trace for the problematic scenario. Number each step and tag which task executes it:
[Task A] 1. acquires lock
[Task A] 2. cache miss → allocates resources
[Task A] 3. releases lock
[Task A] 4. yields to caller
[Task A] 5. caller exits → finally runs
[Task A] 6. users-- → 0, sets no_more_users
[Task A] 7. pops lock from _Cache.locks
[run_ctx] 8. wakes from no_more_users.wait()
[run_ctx] 9. values.pop(ctx_key)
[run_ctx] 10. acm __aexit__ → CHECKPOINT
[Task B] 11. creates NEW lock (old one popped)
[Task B] 12. acquires immediately
[Task B] 13. values[ctx_key] → KeyError
[Task B] 14. resources[ctx_key] → STILL EXISTS
[Task B] 15. 💥 RuntimeErrorIdentify the race window: the range of steps where state is inconsistent. In the example above, steps 9–10 are the window (values gone, resources still alive).
Categorize what kind of concurrency issue this is:
For each proposed fix, provide:
Rate each fix: [simple|moderate|complex] impl
effort.
Structure the full analysis as:
## Concurrency analysis: `<target>`
### Shared state
<table from step 1>
### Checkpoints
<list from step 2>
### Race trace
<interleaved trace from step 3>
### Classification
<bug type from step 4>
### Fixes
<proposals from step 5>These are known problem areas in tractor's concurrency model. Flag them when encountered:
_Cache lock vs run_ctx lifetimeThe _Cache.locks entry is managed by
maybe_open_context callers, but run_ctx runs
in service_tn — a different task tree. Lock
pop/release in the caller's finally does NOT
wait for run_ctx to finish tearing down. Any
state that run_ctx cleans up in its finally
(e.g. resources.pop()) is vulnerable to
re-entry races after the lock is popped.
values.pop() → acm __aexit__ → resources.pop() gapIn _Cache.run_ctx, the inner finally pops
values, then the acm's __aexit__ runs (which
has checkpoints), then the outer finally pops
resources. This creates a window where values
is gone but resources still exists — a classic
atomicity gap.
_Cache.users as a single int (pre-fix) meant
that users of different ctx_keys inflated each
other's counts, preventing teardown when one key's
users hit zero. Always verify that per-key state
(users, locks) is actually keyed on ctx_key
and not on fid or some broader key.
Event.set() wakes but doesn't switchtrio.Event.set() makes waiting tasks ready but
the current task continues executing until its next
checkpoint. Code between .set() and the next
await runs atomically from the scheduler's
perspective. Use this to your advantage (or watch
for bugs where code assumes the woken task runs
immediately).
except block checkpoint maskingawait expressions inside except handlers can
be masked by trio.Cancelled. If a finally
block runs from an except and contains
lock.release(), the release happens — but any
await after it in the same except may be
swallowed. This is why maybe_open_context's
cache-miss path does lock.release() in a
finally inside the except KeyError.
finallyUnlike asyncio, trio allows checkpoints in
finally blocks. This means finally cleanup
that does await can itself be cancelled (e.g.
by nursery shutdown). Watch for cleanup code that
assumes it will run to completion.
Any await <event>.wait() in a teardown path is
a latent deadlock unless the event's setter is
GUARANTEED to fire. If the setter depends on
external state (peer disconnects, child process
exit, subsequent task completion) that itself
depends on the current task's progress, you have
a mutual wait.
Rule: bound every await X.wait() in cleanup
paths with trio.move_on_after() unless you
can prove the setter is unconditionally reachable
from the state at the await site. Concrete recent
example: ipc_server.wait_for_no_more_peers() in
async_main's finally (see
ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md
"probe iteration 3") — it was unbounded, and when
one peer-handler was stuck the wait-for-no-more-
peers event never fired, deadlocking the whole
actor-tree teardown cascade.
When investigating any hang in the test suite
especially under fork-based backends, first
check whether the hang reproduces under pytest -s (--capture=no). If -s makes it go away
you're not looking at a trio concurrency bug —
you're looking at a Linux pipe-buffer fill.
Mechanism: pytest replaces fds 1,2 with pipe
write-ends. Fork-child subactors inherit those
fds. High-volume error-log tracebacks (cancel
cascade spew) fill the 64KB pipe buffer. Child
write() blocks. Child can't exit. Parent's
waitpid/pidfd wait blocks. Deadlock cascades up
the tree.
Pre-existing guards in tests/conftest.py encode
this knowledge — grep these BEFORE blaming
concurrency:
# tests/conftest.py:258
if loglevel in ('trace', 'debug'):
# XXX: too much logging will lock up the subproc (smh)
loglevel: str = 'info'
# tests/conftest.py:316
# can lock up on the `_io.BufferedReader` and hang..
stderr: str = proc.stderr.read().decode()Full post-mortem +
ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md
for the canonical reproduction. Cost several
investigation sessions before catching it —
because the capture-pipe symptom was masked by
deeper cascade-deadlocks. Once the cascades were
fixed, the tree tore down enough to generate
pipe-filling log volume → capture-pipe finally
surfaced. Grep-note for future-self: if a
multi-subproc tractor test hangs, pytest -s
first, conc-anal second.
© goodboy, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/conc-anal of goodboy/tractor.
Open the folder on GitHubat commit 0c52f27
Conc Anal 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Conc Anal this skillgoodboy/tractor | 310 | — | ~2.4k | Automated safety check: Pass | AGPL-3.0 | |
| YugabyteDB ASH Instrumentationyugabyte/yugabyte-db | 11k | — | ~4.5k | Automated safety check: Pass | Custom licence | |
| Mirage VFS Adapter Authoringstrukto-ai/mirage | 3.7k | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| Golang Patternsantoniopaya22/go-rest-template | 172 | 9 repos | ~3.5k | Automated safety check: Pass | None | |
| Rust Async Patternsdiodeme/Gold-Band | 143 | 10 repos | ~3.1k | Automated safety check: Pass | AGPL-3.0 | |
| Swift Concurrencyhenrypldev/react-native-nitro-mlx | 100 | 3 repos | ~3.1k | Automated safety check: Pass | MIT |
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.
strukto-ai/mirage
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.
antoniopaya22/go-rest-template
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
diodeme/Gold-Band
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.
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…
farm-fe/farm
Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions.
Categories
Concurrency analysis for tractor's trio-based async primitives. Conc Anal is an agent skill from goodboy/tractor. Concurrency analysis for tractor's trio-based async primitives.
Conc Anal fits situations like: tasks that involve Async programming.
Run `npx skills add goodboy/tractor --skill conc-anal -a claude-code`. Or copy the skill folder (.claude/skills/conc-anal in goodboy/tractor) into .claude/skills/conc-anal in your project. Claude Code loads it when a task matches its description.
Run `npx skills add goodboy/tractor --skill conc-anal -a codex`. Or copy the skill folder (.claude/skills/conc-anal in goodboy/tractor) into .agents/skills/conc-anal in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add goodboy/tractor --skill conc-anal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/conc-anal, .gemini/skills/conc-anal, .github/skills/conc-anal and .opencode/skills/conc-anal in your project.
Going by SKILL.md and its folder, Conc Anal needs the command-line tools its instructions call (pytest). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Grep, Glob, Task.
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.
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.
Conc Anal is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Conc Anal: 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.
goodboy (a GitHub user) maintains it in goodboy/tractor, which has 310 GitHub stars. The repository was last updated on October 8, 2026.
Source: goodboy/tractor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.