nemo-relay-instrument-context-isolation
Skill238 starsChanged 2 months agoApache-2.0View on GitHub
Use this skill when concurrent requests, async tasks, threads, workers, goroutines, or agents need independent NeMo Relay scope stacks and correct ancestry propagation.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NVIDIA/skillsword for word, first seen Oct 1, 2026
Other versions1 project uses a version of this.
Word for word · 1
- NVIDIA/skills★ 3.9k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-binding-featureSkill
- add-middlewareSkill
- check-release-deploymentsSkill
- contribute-docsSkill
- contribute-integrationSkill
- create-beta-tagSkill
- create-rc-tagSkill
- create-release-tagSkill
- draft-release-notesSkill
- maintain-ciSkill
- maintain-dynamic-pluginsSkill
- maintain-observabilitySkill
- maintain-optimizerSkill
- maintain-packagingSkill
- prepare-code-freezeSkill
- prepare-prSkill
- rename-surfacesSkill
- review-doc-styleSkill
- update-project-versionSkill
- nemo-relay-debug-runtime-integrationSkill
- nemo-relay-get-startedSkill
- nemo-relay-installSkill
- nemo-relay-instrument-callsSkill
- nemo-relay-instrument-typed-wrappersSkill
- nemo-relay-integrate-upstreamSkill
- nemo-relay-migrate-from-flowSkill
- nemo-relay-plugin-adaptive-tuningSkill
- nemo-relay-plugin-buildSkill
- nemo-relay-plugin-observabilitySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when an application runs concurrent requests, worker pools, async tasks, goroutines, or multiple agents in the same process.
- Distinctive: line 13
Treat scope-stack ownership as part of the request boundary.
- Very specific: line 42
Rust core: use runtime helpers such as create_scope_stack(), current_scope_stack(), and set_thread_scope_stack(...) when an integration …
- Very specific: line 45
Go: use NewScopeStack() and ScopeStack.Run(...) for goroutine-safe usage
- Very specific: line 47
Node.js: create and set a scope stack explicitly for the current execution path with createScopeStack() and setThreadScopeStack(...)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Use Context Isolation
Use this skill when an application runs concurrent requests, worker pools, async tasks, goroutines, or multiple agents in the same process. Treat scope-stack ownership as part of the request boundary.
Core Rule
Each independent request, agent, or workflow needs its own scope stack. Do not share one mutable stack across unrelated concurrent work unless you want shared ancestry and shared scope-local middleware.
Embedded Scope Model
- A root scope is always present, and pushed scopes form a parent-child tree beneath it.
- Scope hierarchy determines event parentage, lifetime boundaries, and visibility for scope-local middleware and subscribers.
- Standard scope types include
Agent,Function,Tool,Llm,Retriever,Embedder,Reranker,Guardrail,Evaluator,Custom, andUnknown. - Scope start and end events can carry semantic
inputandoutputpayloads when the scope represents a request, task, or meaningful result boundary. - Scope-local registrations disappear when the owning scope closes; use them for behavior that should not outlive a request or agent run.
- Mark events are useful for retries, checkpoints, interrupts, and important state transitions that are not full spans.
Per-Language Defaults
- Python: rely on task-local behavior via
get_scope_stack()andcontextvars, or explicitly propagate when work leaves the current execution context - Rust core: use runtime helpers such as
create_scope_stack(),current_scope_stack(), andset_thread_scope_stack(...)when an integration needs explicit stack ownership - Go: use
NewScopeStack()andScopeStack.Run(...)for goroutine-safe usage - Node.js: create and set a scope stack explicitly for the current execution
path with
createScopeStack()andsetThreadScopeStack(...)
Common Failures
- Events from different requests appear under one root UUID
- Scope-local middleware leaks across requests
- Worker-thread work runs without the expected active scope
- Integrations activate NeMo Relay without an explicitly initialized stack
- Relying on a thread-local stack after crossing async tasks, goroutines, or JS worker boundaries
Related Skills
nemo-relay-instrument-callsnemo-relay-plugin-observabilitynemo-relay-debug-runtime-integration
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

