SuperAPI AI 工具集

effect-index

编程与开发

查看项目

更新于 10-16 00:28

技能介绍

用途:作为 Effect 相关技能的统一入口,按任务类型快速路由到聚焦技能,适配编码代理有限的上下文。

主要能力与决策树:编写或重构 Effect 代码导向「Foundations」;错误处理与重试导向「Errors & Retries」;并行与 Fiber 管理导向「Concurrency & Fibers」;数据管道、批处理与背压导向「Streams & Pipelines」;依赖注入、服务与 Layer 及测试/线上接线导向「Layers & Services」;文件、套接字、服务器等资源清理导向「Resources & Scope」;HTTP 端点与 JSON 响应导向「HTTP & Routing」;输入校验与配置解析导向「Config & Schema」;值相等与高性能不可变集合导向「Data Structures」;时间、日志、span 与追踪导向「Time/Tracing/Logging」;队列、PubSub 与后台任务导向「Queues & Background」;服务测试与 mock 导向「Testing & Mocking」;查找具体模式或示例导向「Patterns Hub」(含 130+ 模式)。

跨技能模式示例:瞬时失败重试参考 Errors & Retries + retry-based-on-specific-errors.mdx;资源安全流式处理参考 Streams & Pipelines + stream-manage-resources.mdx;优雅关闭参考 Queues & Background + execute-long-running-apps-with-runfork.mdx;服务层设计参考 Layers & Services + model-dependencies-as-services.mdx;HTTP 服务器搭建参考 HTTP & Routing + build-a-basic-http-server.mdx;Schema 校验参考 Config & Schema + define-contracts-with-schema.mdx;使用 mock 测试参考 Testing & Mocking + mocking-dependencies-in-tests.mdx。遇到“How do I…?”类问题,建议先查 Patterns Hub 决策树。

使用方式:先按决策树读取对应技能,再查看该技能的「Local Source Reference」小节,随后检索本地 Effect 源码,研究实现与类型,最后基于真实实现编码。

本地源码位置:全部 Effect 包位于 docs/effect-source/;核心库 docs/effect-source/effect/src/;平台 API docs/effect-source/platform/src/;SQL docs/effect-source/sql/src/;Schema docs/effect-source/schema/src/。示例:grep -F "Effect.gen" docs/effect-source/effect/src/Effect.ts。完整源码参考指南见 CLAUDE.local.md。

限制:资料未提供该索引技能的收费、价格、平台支持与效果数据,暂未提供。