·pattern matching
</>

pattern matching

andrueandersoncs/claude-skill-effect-ts

在用户询问"Effect Match"、"模式匹配"、"Match.type"、"Match.tag"、"Match.when"、"Schema.is()"、"Schema.is with Match"、"穷尽匹配"、"判别联合"、"Match.value"、"将 switch 转换为 Match"、"将 if/else 转换为 Match"、"TaggedClass with Match",或需要理解 Effect 如何提供类型安全的穷尽模式匹配时使用。

5安装·0热度·@andrueandersoncs

安装

$npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill pattern matching

SKILL.md

Pattern matching replaces ALL imperative control flow in Effect code. There should be ZERO if/else statements, switch/case blocks, or ternary operators in idiomatic Effect code.

| if/else chains | Match.value + Match.when | | switch/case statements | Match.type + Match.tag | | Ternary operators (? :) | Match.value + Match.when | | Null checks | Option.match | | Error checks | Either.match or Effect.match | | Type guards | Match.when with Schema.is() |

When you encounter imperative control flow, refactor it to pattern matching immediately.

在用户询问"Effect Match"、"模式匹配"、"Match.type"、"Match.tag"、"Match.when"、"Schema.is()"、"Schema.is with Match"、"穷尽匹配"、"判别联合"、"Match.value"、"将 switch 转换为 Match"、"将 if/else 转换为 Match"、"TaggedClass with Match",或需要理解 Effect 如何提供类型安全的穷尽模式匹配时使用。 来源:andrueandersoncs/claude-skill-effect-ts。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill pattern matching
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 pattern matching?

在用户询问"Effect Match"、"模式匹配"、"Match.type"、"Match.tag"、"Match.when"、"Schema.is()"、"Schema.is with Match"、"穷尽匹配"、"判别联合"、"Match.value"、"将 switch 转换为 Match"、"将 if/else 转换为 Match"、"TaggedClass with Match",或需要理解 Effect 如何提供类型安全的穷尽模式匹配时使用。 来源:andrueandersoncs/claude-skill-effect-ts。

如何安装 pattern matching?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill pattern matching 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/andrueandersoncs/claude-skill-effect-ts

详情

分类
</>开发工具
来源
skills.sh
收录时间
2026-02-01