@r_masseater/masseater-utils
v0.1.2
Published
The small shared libraries of masseater's repositories as subpaths of one package: a chip row for React, Claude Code plugin helpers, Effect entry points for Node.js and GitHub Actions, file import mapping, Node package readers, OTLP assertions for Vitest
Maintainers
Readme
@r_masseater/masseater-utils
The small shared libraries of masseater's repositories in one package. Each library is a subpath, so you import only the one you need and install no more than that library asks for: every dependency a subpath needs besides effect is an optional peer dependency.
It requires Node.js 26 or later.
vp add @r_masseater/masseater-utils| Subpath | What it does |
| ---------------------------------------------- | --------------------------------------------------------------------- |
| @r_masseater/masseater-utils/skerm | A horizontally scrolling row of chips for React. |
| @r_masseater/masseater-utils/plugin-kit | Shared code for Claude Code plugin hooks and scripts. |
| @r_masseater/masseater-utils/node-main | Runs an Effect program as a Node.js entry point. |
| @r_masseater/masseater-utils/github-workflow | Helpers for GitHub Actions steps written with Effect. |
| @r_masseater/masseater-utils/mapped-import | Imports files in your own format from TypeScript. |
| @r_masseater/masseater-utils/kestrion | The Node.js package ecosystem as Effect. |
| @r_masseater/masseater-utils/vitest-otlp | A Vitest plugin that receives OTLP telemetry during tests. |
| @r_masseater/masseater-utils/workers-tracing | Effect, TanStack Start and Elysia spans in Cloudflare Workers traces. |
Install what a subpath needs
Install the peer dependencies of the subpath you import, and nothing else. A subpath that needs no extra package, such as plugin-kit (which bundles what it needs of Effect), installs this package alone.
| Subpath | Install besides this package |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| skerm | react |
| plugin-kit | Nothing. |
| node-main | effect and @effect/platform-node |
| github-workflow | effect |
| mapped-import | effect and ts-content-mapper, plus vite-plus for mapped-import/vite |
| kestrion | effect, plus the readers of the entry you use: @npmcli/package-json for kestrion/npm, the @pnpm/* readers for kestrion/pnpm |
| vitest-otlp | effect, @bufbuild/protobuf and vite-plus |
| workers-tracing | effect, plus @tanstack/react-start, elysia, alchemy or @alchemy.run/cloudflare for the entry that wraps them |
The peerDependencies of package.json are the exact list with ranges.
Examples
Import an entry and call it. Each snippet is the shortest working use.
import { runMain } from "@r_masseater/masseater-utils/node-main";
import { Console } from "effect";
runMain("my-tool")(Console.log("hello"));import { isRecord, parseJson } from "@r_masseater/masseater-utils/plugin-kit";
const parsed = parseJson(text);
if (parsed._tag === "Some" && isRecord(parsed.value)) {
console.log(parsed.value["tool_name"]);
}import { ScrollChipRow } from "@r_masseater/masseater-utils/skerm";
import "@r_masseater/masseater-utils/skerm.css";import { otlp } from "@r_masseater/masseater-utils/vitest-otlp";
import { defineConfig } from "vite-plus";
export default defineConfig({ plugins: [otlp()] });import { providers } from "@alchemy.run/cloudflare";
import { withWorkersTracing } from "@r_masseater/masseater-utils/workers-tracing/alchemy";
const traced = withWorkersTracing()(providers());The agent skills below describe every subpath in full: its API, the failures it reports and the recipes that go with it.
Agent skills
The package ships agent skills in skills/, one per library. Add permissions: { "@r_masseater/masseater-utils": { skills: true } } to pnpm-workspace.yaml and vp install links them into the skill directories of your agents.
| Skill | Library |
| --------------------------- | ----------------- |
| add-scroll-chip-row | skerm |
| read-hook-input | plugin-kit |
| find-cache-folder | plugin-kit |
| run-effect-main | node-main |
| write-actions-steps | github-workflow |
| import-custom-format | mapped-import |
| read-node-ecosystem | kestrion |
| assert-exported-telemetry | vitest-otlp |
| trace-workers | workers-tracing |
