npx skills add smithery/mepuka --skill effect-foundations
mepuka/effect-ontology · Archived
effect-foundations
Core Effect foundations and style for a coding agent. Use when starting an Effect task, choosing operators, or structuring a small pipeline.
Installation
npx skills add mepuka/effect-ontology --skill effect-foundations
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Skill index and decision guide. Use to pick the right Effect Skill quickly and follow a minimal…
331 installsComplete catalog of 130+ Effect-TS patterns from EffectPatterns repository. Use when looking fo…
50 installsError modeling and recovery with TaggedError, catchTag(s), mapError, and retry schedules. Use w…
43 installsConcurrency with Effect.all, forEach concurrency, Fiber lifecycle, race and timeouts. Use for p…
41 installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsAlso in this package
Other skills from mepuka/effect-ontology · top by installs.
npx skills add mepuka/effect-ontology
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
Read, Grep, Glob, Edit, Write, mcp__effect-docs__effect_docs_search, mcp__effect-docs__get_effect_docPackage contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md5,863 B -
docs
SUMMARY.md166 B
History
- First seen on skills.sh
- First recorded snapshot · 34 installs
SKILL.md
Effect Foundations & Style
Purpose: Provide a compact, go-to checklist for writing idiomatic Effect TypeScript with data-first pipe style, minimal imperative code, and strong typing. Optimized for a coding agent with limited context.
Triggers
- New Effect implementation or refactor
- Selecting map/flatMap/andThen/tap operators
- Converting promise/callback to Effect
When to use
- You’re unsure which operator to pick (map vs flatMap vs andThen vs tap)
- You need a minimal template for sequential vs parallel code
- You want to keep error and context channels explicit (
Effect<E, A, R>)
Checklist (Do First)
- Prefer data-first
.pipe()style for readability - Use
Effect.genfor sequential logic;Effect.allfor parallelism - Lift values with
Effect.succeed, failures withEffect.fail - Declare errors as
Data.TaggedErrorand recover withcatchTag(s) - Keep effects small, composable, and typed—avoid
any - If
R(requirements) is notnever, provide layers explicitly
Minimal Patterns
- Creation
const value = Effect.succeed(42)
const failure = Effect.fail(new MyError())
- Transform
const result = value.pipe(
Effect.map((n) => n * 2),
Effect.tap((n) => Effect.log(`n=${n}`))
)
- Sequential
const program = Effect.gen(function* () {
const a = yield* getA()
const b = yield* getB(a)
return b
})
- Parallel
const both = yield* Effect.all([left(), right()], { concurrency: "unbounded" })
Operator Selection Guide
- Map value:
Effect.map - Chain effect:
Effect.flatMap - Ignore previous result:
Effect.andThen - Side-effect only:
Effect.tap - Provide context:
Effect.provide/layers (see layers skill)
- Combine layers: Layer.merge, Layer.provide
Key APIs (intuition)
Effect.gen: write sequential code withyield*for each EffectEffect.all(values, { concurrency }): run independent Effects concurrentlyEffect.catchTags(...): recover only specific typed errorsLayer.merge(a, b): compose dependencies once, reuse everywhereEffect.runPromise(...): bridge Effects to async workflows
Real-world snippet: Branching with Match and TaggedError
import { Effect, Match, Data } from "effect"
class UnsupportedPlatformError extends Data.TaggedError("UnsupportedPlatformError")<{
readonly platform: string
readonly arch: string
}>{}
const detectPlatform = (rawPlatform: string, rawArch: string) => Effect.gen(function* () {
const platform = yield* Match.value(rawPlatform).pipe(
Match.when("darwin", () => Effect.succeed("darwin" as const)),
Match.when("linux", () => Effect.succeed("linux" as const)),
Match.orElse(() => Effect.fail(new UnsupportedPlatformError({ platform: rawPlatform, arch: rawArch })))
)
const arch = yield* Match.value(rawArch).pipe(
Match.when("x64", () => Effect.succeed("x64" as const)),
Match.when("arm64", () => Effect.succeed("aarch64" as const)),
Match.when("aarch64", () => Effect.succeed("aarch64" as const)),
Match.orElse(() => Effect.fail(new UnsupportedPlatformError({ platform: rawPlatform, arch: rawArch })))
)
return { platform, arch }
})
Recovery (Quick)
program.pipe(
Effect.catchTag("DomainError", () => Effect.succeed(fallback)),
Effect.catchAll((e) => Effect.fail(new WrappedError({ cause: e })))
)
Tooling Steps (with effect-engineer)
- Grep local examples:
Effect.gen,Effect.all,.pipe( - Search docs MCP for operator specifics when unsure
- Consult EffectPatterns for canonical idioms (https://github.com/PaulJPhilp/EffectPatterns)
Pitfalls
- Don't mix promises and effects—wrap with
Effect.try/tryPromise - Don't return raw values inside
Effect.gen—alwaysyield*an Effect
- Unsatisfied R requirements → provide layers or adjust architecture
Local Source Reference
CRITICAL: Search local Effect source before implementing
The full Effect source code is available at docs/effect-source/. Always search the actual implementation before writing Effect code.
Key Source Files
- Core Effect:
docs/effect-source/effect/src/Effect.ts - Layer:
docs/effect-source/effect/src/Layer.ts - Data:
docs/effect-source/effect/src/Data.ts - Match:
docs/effect-source/effect/src/Match.ts
Example Searches
# Find Effect.gen implementation and patterns
grep -rF "Effect.gen" docs/effect-source/effect/src/
# Find all map/flatMap/andThen variants
grep -rF "export" docs/effect-source/effect/src/Effect.ts | grep -F "map"
grep -rF "export" docs/effect-source/effect/src/Effect.ts | grep -F "flatMap"
grep -rF "export" docs/effect-source/effect/src/Effect.ts | grep -F "andThen"
# Study error handling patterns
grep -rF "catchTag" docs/effect-source/effect/src/
grep -rF "catchAll" docs/effect-source/effect/src/
grep -rF "TaggedError" docs/effect-source/effect/src/
# Find Effect.all concurrency patterns
grep -rF "Effect.all" docs/effect-source/effect/src/
Workflow
- Identify the API you need (e.g., Effect.gen, Effect.all)
- Search
docs/effect-source/effect/src/Effect.tsfor the implementation - Study the types, overloads, and patterns
- Look at test files in
docs/effect-source/effect/test/for usage examples - Write your code based on real implementations
Real source code > documentation > assumptions
References
- Agent Skills overview: https://www.anthropic.com/news/skills
- Skills guide: https://docs.claude.com/en/docs/claude-code/skills
- EffectPatterns: https://github.com/PaulJPhilp/EffectPatterns