ast-visitor-pattern

Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.

Code quality & reviewOfficial47.8k stars on the repoApache-2.0
share

Install ast-visitor-pattern

npx skills add prisma/orm --skill ast-visitor-pattern -a claude-code

Installs into .claude/skills/ in your project. Add -g to install it for all your projects, in ~/.claude/skills/.

More code quality & review skills