- Home
- Skills
- Agents & Orchestration
- Repair Async Context Leakage
Works with the AI tools you already use
Repair Async Context Leakage
Repair lost or stale async context, cross-request/tenant contamination, ThreadLocal leaks, detached task inheritance, and over-broad context propagation.
$5
Repair Async Context Leakage
Example session with this skill installed
Our Node/TypeScript SaaS uses AsyncLocalStorage for requestId, tenantId, userId, and traceId. A webhook handler schedules work with setImmediate, one helper caches the current context object in module scope, and a background email task is started with void sendEmail(). Under concurrency we occasionally see a log line with the correct requestId but the wrong tenantId. One detached task also keeps userId after the HTTP response is finished. Repair the repository with synthetic tenants and deterministic concurrency tests. Do not access production logs/data, change auth policy, or copy tokens into context.
- Read your context and instructions
- Compiled the repair async context
Async context leakage found. A module-level cached context can outlive its request, detached work inherits request identity, and logging can combine mismatched ownership paths. The repair removes global context reuse, makes durable metadata explicit, restores/clears context at owned boundaries, and adds deterministic cross-tenant concurrency tests. Production isolation remains unverified.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Async context bugs are difficult because the code often looks correct in one request and fails only under concurrency. A cached AsyncLocalStorage object can cross tenant boundaries, a reused worker thread can retain ThreadLocal state, or a detached task can inherit request identity long after the request ends.
Repair Async Context Leakage gives an AI coding agent a repository workflow for mapping context sources and lifetimes, repairing propagation and cleanup, separating tracing from authorization, minimizing durable job metadata, and proving isolation with deterministic concurrent tests.
It does not inspect production logs/data, change authorization policy, or copy secrets into diagnostic context.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 month ago
- Passed all security checks, Safe to install