Contextvar Remediation Skill

Convert explicit user_id parameters to ambient context using Python contextvars.

476|42|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/taylorsatula/mira-OSS --skill contextvar-remediation-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Contextvar Remediation Skill
Source: https://github.com/taylorsatula/mira-OSS/tree/main/.claude/skills/contextvar-remediation
Command: npx skills add https://github.com/taylorsatula/mira-OSS --skill contextvar-remediation-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a guided approach to converting explicit user_id parameters to ambient context using Python's contextvars, with a decision framework and migration steps.

Core Features & Use Cases

  • Investigation Phase: identify all explicit user_id usages across code paths.
  • Decision Guide Adherence: determine the best pattern (constructor vs ambient context) based on architecture.
  • Categorization & Migration: classify code, update services and call sites, and handle background tasks properly.
  • Validation Guidance: ensure background tasks set context and that active flows inherit ambient context.

Quick Start

Read the decision guide completely, categorize code by context type, and apply remediation steps to migrate to ambient context.