Token导航 LogoToken导航

Agent Skill · 开发

building-with-effect(有效果的建筑)

building-with-effect 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

building-with-effect 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 21,023。

总安装 196周安装 8GitHub Stars 公开资料未说明下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:building-with-effect(有效果的建筑)
来源仓库:https://github.com/felixnorden/skills
仓库路径:skills/building-with-effect
安装命令:
npx skills add https://github.com/felixnorden/skills --skill building-with-effect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/felixnorden/skills --skill building-with-effect

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

building-with-effect 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理时使用。

通过 Effect.fn 创建类型安全函数,支持错误处理、依赖注入和并发管理。安装前建议确认权限范围和维护状态,注意可能触发联网或文件读写操作。可结合来源仓库和原始 README 进一步核验具体用法和实现细节。

来源仓库内路径:skills/building-with-effect

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/felixnorden/skills --skill building-with-effec…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

building-with-effect 怎么安装?

在终端执行 npx skills add https://github.com/felixnorden/skills --skill building-with-effect。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

building-with-effect 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

building-with-effect 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

building-with-effect 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

building-with-effect 用的人多吗?

公开数据是累计安装 196 次,近一周安装 8 次,下载 63 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

building-with-effect 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
building-with-effect

有效果的建筑 · 本页

196—需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Building with Effect

Effect is a powerful TypeScript library for building complex, type-safe programs with composable abstractions for error handling, dependency injection, concurrency, and resource management.

Quick Start

Using Effect.fn (Recommended)

import { Effect, Schema } from "effect";

// Define errors with Schema.TaggedErrorClass
class FetchError extends Schema.TaggedErrorClass<FetchError>()("FetchError", {
  message: Schema.String,
}) {}

// Create functions with Effect.fn
export const fetchUser = Effect.fn("fetchUser")(
  function* (id: number) {
    yield* Effect.logInfo("Fetching user:", id);

    // Always return when raising an error
    return yield* new FetchError({ message: "Failed to fetch" });
  },
  // Add combinators as additional arguments (no .pipe needed)
  Effect.catch((error) => Effect.logError(`Error: ${error}`)),
  Effect.withSpan("fetchUser", { attributes: { method: "Effect.fn" } }),
);

Generator Style

const program = Effect.gen(function* () {
  const a = yield* Effect.succeed(10);
  const b = yield* Effect.succeed(20);
  return a + b;
});

Running Effects

// As Promise
Effect.runPromise(program).then(console.log);

// With NodeRuntime (recommended for apps)
import { NodeRuntime } from "@effect/platform-node";
NodeRuntime.runMain(program);

// Using Layer.launch as entry point
Layer.launch(WorkerLayer).pipe(NodeRuntime.runMain);

Degrees of Freedom

Match the level of specificity to the task's fragility:

Low Freedom (specific patterns, consistency critical)

These operations have a narrow safe path - follow exactly:

  • Error definition: Always use Schema.TaggedErrorClass with descriptive _tag
  • Service structure: Extend Context.Service with static layer property
  • Effect.fn usage: Always use Effect.fn("name") for functions returning Effects
  • Resource cleanup: Always use acquireUseRelease or Effect.addFinalizer
  • Resource pattern selection: Use acquireUseRelease for external resources, Ref for shared mutable state, addFinalizer for cleanup within existing scope
  • Error recovery vs propagation: Use catchTags/orElse to recover; use return yield* new Error() to propagate (ALWAYS use return yield* to signal the function stops)

Medium Freedom (preferred patterns, some variation acceptable)

These have recommended approaches but context matters:

  • Combinator selection: Choose based on need - catchTag for specific errors, catchTags for multiple, catch for all
  • Layer composition: Use Layer.provide for dependency injection, order matters for overrides
  • Concurrency control: Use Effect.all or Effect.forEach with appropriate concurrency option
  • Error recovery: Select retry schedules based on failure characteristics

High Freedom (multiple valid approaches, context-dependent)

These depend on application needs:

  • Application architecture: Service boundaries, layer organization, entry point structure
  • Testing strategies: Test at service level, effect level, or integration level based on needs
  • Performance optimization: Caching strategies, batching decisions, bundle size tradeoffs
  • Observability setup: Logging granularity, tracing scope, metric selection

Core Type

Effect<Success, Error, Requirements>;
  • Success: Value type on success
  • Error: Type-tracked errors
  • Requirements: Services needed (use never if none)

Key Operators

Transformation

  • map - Transform success value
  • flatMap / andThen - Chain effects
  • tap - Side effects without changing value
  • mapError - Transform error type

Error Handling

  • catch - Handle all errors (renamed from catchAll in earlier versions)
  • catchTag - Handle specific error types
  • catchTags - Handle multiple tagged errors at once
  • catchReason / catchReasons - Handle errors with reasons
  • catchFilter - Handle filtered errors (renamed from catchSome in earlier versions)
  • orElse - Fallback effect
  • retry - Retry with policy

Composition

  • all - Run multiple effects
  • forEach - Map over collection
  • zip / zipWith - Combine effects
  • provide - Supply dependencies

Best Practices

  1. Use Effect.fn for functions that return Effects (not Effect.gen alone)
  2. Define errors with Schema.TaggedErrorClass for type safety
  3. Use Context.Service for dependency injection
  4. Build layers explicitly with Layer.effect and compose with Layer.provide
  5. Use ExecutionPlan for AI provider fallback strategies
  6. Handle interruptions with acquireRelease for resources
  7. Use Layer.launch as application entry point for long-running apps
  8. Enable dual APIs when appropriate (data-first + data-last)
  9. Choose resource patterns deliberately: See Resource Pattern Selector
  10. Use error recovery for resilience: See Error Handling Decision Tree
  11. Prefer Effect.forEach with concurrency: See Concurrency Anti-Patterns

Workflows

Use these checklists for complex multi-step tasks:

Creating a New Service

Copy this checklist and track progress:

Service Creation Progress:
- [ ] Step 1: Define error types with Schema.TaggedErrorClass
- [ ] Step 2: Create service class extending Context.Service
- [ ] Step 3: Implement methods using Effect.fn
- [ ] Step 4: Build Layer.effect with service implementation
- [ ] Step 5: Provide dependencies via Layer.provide
- [ ] Step 6: Test the service layer

Step 1: Define error types

class ServiceError extends Schema.TaggedErrorClass<ServiceError>()(
  "ServiceError",
  { cause: Schema.Defect },
) {}

Step 2: Create service class

export class MyService extends Context.Service<
  MyService,
  {
    method(): Effect.Effect<ReturnType, ServiceError>;
  }
>()("namespace/MyService") {}

Step 3: Implement methods

const method = Effect.fn("MyService.method")(function* () {
  // Implementation
});

Step 4-6: Build and test layer

See Services & Layers for complete examples.

Setting Up AI Integration

Copy this checklist and track progress:

AI Setup Progress:
- [ ] Step 1: Install provider packages (@effect/ai-openai, @effect/ai-anthropic)
- [ ] Step 2: Configure client layers with API keys
- [ ] Step 3: Define ExecutionPlan for fallback strategy
- [ ] Step 4: Create AI service with Effect.fn
- [ ] Step 5: Implement error handling with mapError
- [ ] Step 6: Provide client layers to service layer

See AI Modules for detailed implementation.

Error Handling Strategy

Copy this checklist and track progress:

Error Handling Progress:
- [ ] Step 1: Define all error types with Schema.TaggedErrorClass
- [ ] Step 2: Use catchTags for multiple specific error handlers
- [ ] Step 3: Add catch for final fallback if needed
- [ ] Step 4: Consider retry with Schedule for transient failures
- [ ] Step 5: Log errors at appropriate layers
- [ ] Step 6: Test error scenarios

See Error Handling for patterns and examples.

Common Patterns

Service with Effect.fn

import { Effect, Context, Layer, Schema } from "effect";

class DatabaseError extends Schema.TaggedErrorClass<DatabaseError>()(
  "DatabaseError",
  { cause: Schema.Defect },
) {}

export class Database extends Context.Service<
  Database,
  {
    query(sql: string): Effect.Effect<unknown[], DatabaseError>;
  }
>()("app/Database") {
  static readonly layer = Layer.effect(
    Database,
    Effect.gen(function* () {
      const query = Effect.fn("Database.query")(function* (sql: string) {
        yield* Effect.log("Executing SQL:", sql);
        return [{ id: 1, name: "Alice" }];
      });
      return Database.of({ query });
    }),
  );
}

// Exported type with proper inference
export type DatabaseService = Database["Service"];

Error Handling with catchTags

const configWithFallback = loadConfig().pipe(
  Effect.catchTags({
    ParseError: () => Effect.succeed(defaultConfig),
    FileError: () => Effect.succeed(defaultConfig),
  }),
);

Resource Safety

const program = Effect.acquireUseRelease(
  openFile("data.txt"),
  (file) => processFile(file),
  (file) => closeFile(file),
);

Package Structure

Core Package

import { Effect } from "effect";

Unstable Modules (may have breaking changes in minor releases)

import { Schema } from "effect/unstable/schema";
import { HttpClient } from "effect/unstable/http";
import { LanguageModel } from "effect/unstable/ai";
import { PubSub } from "effect/unstable/pubsub";

Platform-Specific Packages (separate packages)

import { NodeRuntime } from "@effect/platform-node";
import { SqlClient } from "@effect/sql-pg";
import { OpenAiClient } from "@effect/ai-openai";

References

Dive deeper into specific topics and patterns:

Anti-Patterns to Avoid

  • Using try/catch with Effect (defeats type safety)
  • Mixing Promise-based and Effect-based code without conversion
  • Not handling all error cases (use catch or match)
  • Ignoring resource cleanup (always use acquireRelease)
  • Running effects at module level (breaks composability)
  • Using global state instead of Services
  • Overusing Effect for simple synchronous operations
  • Using Effect.gen alone instead of Effect.fn for functions

Troubleshooting

Type errors with Requirements

  • Ensure all services are provided via Effect.provide
  • Check Layer composition matches service dependencies
  • Use Effect.provideService for quick inline provisions

Effects not executing

  • Effects are lazy - must be run with runPromise, runSync, or runFork
  • Check that effect is actually yielded in generator context

Performance issues

  • Avoid excessive allocations in hot loops
  • Use Effect.cached for expensive computations
  • Consider Micro module for bundle-size sensitive apps

Example Files

Browse detailed examples in the effect-smol/ai-docs/src/ directory:

平台分布

Codex

36.64%
按下载量换算23

Claude

30.38%
按下载量换算19

Cursor

15.95%
按下载量换算10

Gemini CLI

8.61%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills