contextvar-opportunity-finder
Detect explicit user_id parameters in functions to identify potential opportunities for using ambient context. This is an investigation tool that flags instances for human review, not a prescriptive analyzer.
npx skills add majiayu000/claude-skill-registry --skill contextvar-opportunity-finder --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Contextvar Opportunity Finder An intelligent grep tool that finds all explicit `user_id` usage patterns in Python code. Reports findings with context for human review. --- ## Core Principle This is a **detection-only** skill - It finds and reports all instances of explicit user_id usage without making judgments about correctness. Read every file completely, one at a time, and report findings for EACH file before moving to the next. No shortcuts, no grep tricks, no "I'll infer from patterns". Complete reads only! **What it does**: Scans code, detects patterns, reports everything it finds. **What it doesn't do**: Make recommendations, filter results, or determine what's "right" or "wrong". --- ## Detection Patterns ### Pattern 1: Direct user_id Parameter Look for functions with `user_id` in their parameters: ```python def function_name(..., user_id: str, ...): def function_name(..., user_id: Optional[str], ...): def function_name(..., user_id=None, ...): ``` ### Pattern 2: user_id Extraction from Dicts/Objects Look for functions extracting user_id from parameters: ```python def function_name(self, context: Dict[str, Any]): user_id = context.get('user_id') def function_name(self, ev
- Core Principle
- Detection Patterns
- Pattern 1: Direct userid Parameter
- Pattern 2: userid Extraction from Dicts/Objects
- Pattern 3: Redundant Context Setting
- Pattern 4: Threading Through Layers
- Pattern 5: Bad Dual-Mode Pattern
- Pattern 6: Convenience Function Wrappers
- Pattern 7: Request Body User IDs
- Context Clues to Report
- Class/Inheritance Context
- Function Context
- Call Context
- Code Patterns
What does the contextvar-opportunity-finder skill do?
Detect explicit user_id parameters in functions to identify potential opportunities for using ambient context. This is an investigation tool that flags instances for human review, not a prescriptive analyzer.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill contextvar-opportunity-finder --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
