effect-craft
Craft Effect TypeScript APIs with the discipline of the Effect and opencode codebases. Use when modeling data with Schema, building services with Context and Layer, naming operations with Effect.fn, exposing modules through barrels, designing hooks or HTTP surfaces, or writing JSDoc with runnable examples — new code, refactors, and API reviews.
- License 许可
- MIT
- 所属仓库
- hadronomy/skills
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- effect-craft
- description
- Craft Effect TypeScript APIs with the discipline of the Effect and opencode codebases. Use when modeling data with Schema, building services with Context and Layer, naming operations with Effect.fn, exposing modules through barrels, designing hooks or HTTP surfaces, or writing JSDoc with runnable examples — new code, refactors, and API reviews.
02 资源文件 7
- 参考文档agents/openai.yaml137 B
- 参考文档references/docs.md1.5 KB
- 参考文档references/models.md1.7 KB
- 参考文档references/quality.md2.8 KB
- 参考文档references/services.md2.9 KB
- 参考文档references/sources.md5.1 KB
- 参考文档references/surface.md2.2 KB
03 SKILL.md 正文
Effect Craft
Write Effect TypeScript that reads like the call it serves: one consumer line,
one Schema per shape, one narrow service per capability. The rules here are
distilled from the codebases that set the bar: Effect-TS/effect and
sst/opencode on the v2 branch. Read
references/sources.md when you need to check why a
rule exists.
This is a routed skill. Always apply the core contract. Read only the reference layers the task needs.
Core contract
- The consumer line is the whole DX. Write the call before the implementation. If the call needs a comment, rename until it does not. If the call needs three config objects, merge them into one.
- One Schema per shape. A record is a
Schema.Struct, a state is aSchema.Literalunion, an ID is a brand, a failure is aSchema.TaggedErrorwith theSelfgeneric. The declaration is the type, the decoder, and the wire entry. Never triplicate them. - One narrow service per capability. Define it with
Context.Service, build it withLayer.effect, consume it withyield*orEffect.provide. Bind services to named variables. Never nest yields. Never returnEffectfrom a pure helper. - Name every operation. Wrap reusable work in
Effect.fn("Name")and compose bodies withEffect.gen. The name becomes the span and the log field. - Values, not machinery. Config travels through
Configrecipes —process.envstays out of domain code. Failures are tagged data matched withcatchTag. Retries are boundedSchedulevalues, and only transport, rate-limit, and internal faults retry. - Barrels re-export; files implement. One concept per file,
export * as Namefrom a logic-freeindex.ts, deep imports inside the repo, generated sections regenerated and never hand-edited. - Docs earn their place. Document public exports with one practical
paragraph, fixed tag order, and runnable
tsexamples executed as tests. Delete every doc that restates its signature. - Check narrowly. Run the smallest check that covers the change. Touch a public export and its docs travel in the same change.
Branches
| Task | Read |
|---|---|
| Data models, brands, tagged errors | references/models.md |
| Services, layers, named ops, config, retry, streams | references/services.md |
| Barrels, dual call styles, client flavors, protocol and codegen | references/surface.md |
| JSDoc shape, runnable examples, code comments, slop filters | references/docs.md |
| Quality gates, per-artifact checklists, friction fixes | references/quality.md |
| Why behind a rule, with source links | references/sources.md |
Done when
npm run validatepasses for this skill.- Every touched public export carries docs plus a runnable example where the signature does not show the behavior.
- The narrowest check covering the change is green, and the result is reported.
04 同仓库更多 Skills
windows-mcp
Driving the Windows desktop on `workstation` through the windows MCP server. Use before any `mcp__windows__` tool, when a desktop call blocks or returns "Desktop busy", when Snapshot or Screenshot come back empty, or when this agent has no desktop tools and the task needs them.
typst-author
Author idiomatic, compilable Typst documents. Use when creating or editing Typst (.typ) files, when a task involves Typst syntax, packages, templates, or bibliographies, or when a Typst build fails and the error needs a fix.
setup-hadronomy
暂无简介
rust-craft
Craft production Rust the way the top toolchain teams do. Use when writing, reviewing, or restructuring Rust — workspace layout, Cargo manifests, lints, and profiles; type, trait, and error API design; performance, allocation, and profiling work; async and concurrency; CLI construction; test, snapshot, and benchmark suites; crate selection; release, semver, MSRV, and feature flags.
pr-craft
Write pull requests a reviewer can act on. Use when opening, rewriting, or reviewing the body of a pull request — title and description, the problem and approach, call-stack diffs, before-and-after screenshots, verification steps, risks, a review guide, and the tools that produce each part.
docs-craft
Documentation discipline for code comments, API docs, and docs pages. Use when writing or reviewing doc comments, JSDoc or rustdoc, README sections, or framework docs pages — or when comments and docs read as filler and need cutting.